NilsGey wrote:
This works well to stream video witha audio to my rtmp account.
Sweet!
I do not do any conversion except the framerate here because I am recording my second X server which is already set to a low resolution.
Good call. I have lots of conversions in there, because I am mixing a 16:9 and 4:3 ratio... but the less conversion, the better quality, and the less CPU.
With twitch.tv I get around 8 seconds delay which is still ok for a live stream. The important thing is: Audio and video are in sync and I can use JACK, that was not possible with ffmpeg at all. Even using alsa with ffmpeg generated audio that was
4 seconds behind the video!
Glad the sync is working well for you, too. I had the same trouble. The 8 second delay is the lag of network traffic to the server, but it is good in one way because it does allow you a killswitch - if you stop gstreamer, the video stops almost instantly, meaning that the viewers never see or hear the last 8 seconds of your broadcast.
I get a few x-run, or the gstreamer equivalent since I don't see any in qjackctl:
Code: Select all
gstbaseaudiosrc.c(840): gst_base_audio_src_create (): /GstPipeline:pipeline0/GstJackAudioSrc:jackaudiosrc0:
Dropped 114176 samples. This is most likely because downstream can't keep up and is consuming samples too slowly.
This is where the 'queue' commands for gstreamer come in. Each of those, causes the prior input to be handled in it's own thread. The leaky=1, allows the buffer to become empty, and it will just fill the space with zeros. By using that before the network-facing sinks, the viewer would still get a glitch, but, the sync is still good. It's not a 'must', but it's recommended anywhere you have a mixer, muxer, tee, etc, where things could get messed up.
Maybe If reduce the audio-quality here I can still improve things.
I would also try a lower framerate. It really effects things (even when the high framerate does not overload the CPU). Especially if you are only making flash video, and not capturing raw data locally, the higher framerate won't count for much.
Now all I need is the webcam overlay
Any comments or advices?
I would do this first by adding the video mixer. Note the way I specify the inputs to the mixer, by 'sink_0' and 'sink_1'. This is the trick to making it work. By doing this, you can use '::zorder=' to force the Z-order of the images - in other words, you can tell it to put your webcam on top, and the background on the bottom; and you can use '::xpos=' and '::ypos=' to position the image. This is the hardest part, after this you'll cruise through it
To make it easier, don't try to add both video sources. The mixer will happily run with just one, so you can get each one working separately and then add them when it is convenient.
HTH!