[CinCV TNG] Streaming over network

Andrew Randrianasulu randrianasulu at gmail.com
Fri Jun 8 20:19:37 CEST 2018


В сообщении от Friday 08 June 2018 18:45:14 Phyllis Smith написал(а):
> On Thu, Jun 7, 2018 at 4:58 AM, KhazAkar <damianzrb at gmail.com> wrote:
> > How to stream from Cinelerra to YouTube or other services or over local
> > network? Screen record works well, but adding streaming capabilities will
> > be a really nice thing to have.
> >
> > This was actually looked into about 3 years ago but there was not much
>
> enthusiasm for adding this capability at that time.
> Apparently there is an API that makes this feasible for cin5 and this
> stands a better chance of being implemented at some future time.  I do not
> see it on the immediate horizon though.  Phyllis

Hello. Not sure if those links will be useful or not, but apparently Youtube 
uses rtmp protocol, and ffmpeg can encode/encapsulate compatible stream:


https://www.arrow.com/en/research-and-events/articles/pi-bandwidth-with-video

---------command line for streaming from h264-encoding webcam---------

ffmpeg -ar 44100 -ac 2 -f alsa -i hw:1,0 -f v4l2 -codec:v h264 -framerate 
30 -video_size 1920x1080 -itsoffset 0.5 -i /dev/video0 -copyinkf -codec:v 
copy -codec:a aac -ab 128k -g 10 -f flv rtmp://a.rtmp.youtube.com/live2/(Your 
Stream Key Here)

--------------------------quote end---


https://learn.adafruit.com/ultimate-youtube-live-camera/streaming-to-youtube

---------quote------
Streaming To Youtube 
 
by  Daniel Davis  
 
Although I'm using Youtube in this tutorial, the concept should also work with 
other streaming services like Twitch.tv and FacebookLive. Most of these 
streaming services use a protocol called Real-Time Messaging Protocol (RTMP). 
So in order to stream to Youtube, we'll need the RTMP URL as well as a private 
key for our specific stream.

----------quote end-------

https://askubuntu.com/questions/893499/how-to-stream-desktop-and-audio-with-ffmpeg-in-youtube


---------------from x11 to youtube-------
Now use ffmpeg to stream to YouTube:
ffmpeg -f x11grab -framerate 30 -video_size 1280x720 -i :0.0 -f pulse -i 
default -c:v libx264 -preset fast -cfr 26 -maxrate 2500k -bufsize 5000k -g 
60 -vf format=yuv420p -c:a aac -b:a 128k -f flv rtmp://youtube

-------------------qute end----


so, in theory if you just set Cinelerra to output to external encoder/ffmpeg and 
add to this ffmpeg command line all those encoding parameters ..it will work at 
least for video? (not sure if Cinelerra can output synchronized audio at the 
same time. But may be output to fifo file with something like mp4_faststart  or 
mkv will work? (I was able to watch growing file with mplayer while Cinelerra 
was rendering it). Or just integrate this ffmpeg line as profile, with prompt 
asking user to enter stream URL?



More information about the Cinelerra mailing list