Hello!
I tried to stream my desktop with output.youtube.live. I had to make
fiddle a bit with the pipelines but I sort of got it working.
When I used input.pulseaudio, it crashed after a minute or so. With
input.gstreamer.audio, it worked better.
Hope the script below can be useful for somebody.
Regards,
Per Gunnarsson
set("frame.video.width", 1920)
set("frame.video.height", 1080)
set("log.file.path","/tmp/vlc-radio.log")
set("log.level",5)
#hideo=input.v4l2()
#kideo=input.pulseaudio(clock_safe=false)
# I had problems using input.pulseaudio directly, at least before I
changed the video pipeline.
# Also I have a mono microphone.
hideo=input.gstreamer.video(pipeline="ximagesrc use-damage=0 !
video/x-raw,framerate=30/1")
kideo=input.gstreamer.audio(pipeline="pulsesrc ! audio/x-raw,
rate=48000, channels=1")
#lideo=audio_to_stereo(kideo)
source = mux_video(video=hideo,kideo)
source = mksafe(source)
def output.youtube.live(~id="",
# ~video_bitrate=4000,
# I set pass=quant instead, I don't understand what it means. I got it
from the plugin docs, guess it means "maximum bitrate"
~audio_encoder="fdkaacenc",
# I chose voaacenc, I did not have fdkaacenc on Debian
# Also I added some queues to the video pipeline, maybe just out of
superstition.
~audio_bitrate=128000,
~url="rtmp://a.rtmp.youtube.com/live2",
~key,
source) =
video_pipeline = "videoconvert ! queue ! \
x264enc pass=quant ! queue ! \
video/x-h264,profile=main ! queue ! mux."
audio_pipeline = "audioconvert ! #{audio_encoder}
bitrate=#{audio_bitrate} ! queue ! mux."
pipeline = "flvmux streamable=true name=mux ! rtmpsink
location=\"#{url}/#{key} app=live2\""
output.gstreamer.audio_video(id=id,video_pipeline=video_pipeline,
audio_pipeline=audio_pipeline,pipeline=pipeline,source)
end
output.youtube.live(key="top_secret_youtube_key",
audio_encoder="voaacenc",
source)
_______________________________________________
Savonet-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/savonet-users