Hello!

I am trying to mix an audio file and a image file and stream it to youtube.

Script with some log file output, followed by working script where I use
a playlist of video files instead
of a single image.

    #!/home/per/.opam/4.05.0/bin/liquidsoap
    # XTRadio Video
    # Standard settings
    set("log.file.path","/tmp/vlc-radio.log")
    set("log.level",4)
    set("server.telnet",false)
    # Stream Settings

audio_file = "/tmp/bla.mp3"
 video_file = "/tmp/bla.jpg"


 # Create a video source with the image for video track
 video = single(video_file)

audio = single(audio_file)

 # Mux audio and video
 #source = mux_audio(audio=audio,video)
 source = mux_video(video=video,audio)

 # Disable real-time processing, to process with the maximun speed
 #source = clock(sync=false,source)


output.gstreamer.audio_video(fallible=true,
      video_pipeline=
        "videoconvert ! timeoverlay ! x264enc bitrate=2000 !
video/x-h264,profile=main ! queue ! mux.",
      audio_pipeline=
        "audioconvert ! voaacenc bitrate=128000 ! queue ! mux.",
      pipeline=
        "flvmux streamable=1 name=mux ! rtmpsink
location=\"rtmp://a.rtmp.youtube.com/live2/z69k
b187-zx59-aaw2\"",
      source)

I get this in the log file:

2018/07/14 21:38:28 [single_7453:3] "/tmp/bla.mp3" is static, resolving
once for all...
2018/07/14 21:38:28 [/tmp/bla(dot)mp3:4] Content kind is
{audio=2;video=0;midi=0}.
2018/07/14 21:38:28 [/tmp/bla(dot)mp3:4] Activations changed:
static=[mux_7455:output(dot)gstreamer:output(dot)gstreamer], dynamic=[].
2018/07/14 21:38:28 [source:4] Source single_7451 gets up.
2018/07/14 21:38:28 [single_7451:3] "/tmp/bla.jpg" is static, resolving
once for all...
2018/07/14 21:38:28 [clock.wallclock_gstreamer:2] Error when starting
output(dot)gstreamer: Req_simple.Invalid_URI!
2018/07/14 21:38:28 [clock.wallclock_gstreamer:3] Raised at file
"sources/req_simple.ml", line 37, characters 6-23
2018/07/14 21:38:28 [clock.wallclock_gstreamer:3] Called from file
"source.ml", line 388, characters 6-18
2018/07/14 21:38:28 [clock.wallclock_gstreamer:3] Called from file
"list.ml", line 85, characters 12-15
2018/07/14 21:38:28 [clock.wallclock_gstreamer:3] Called from file
"source.ml", line 388, characters 6-18
2018/07/14 21:38:28 [clock.wallclock_gstreamer:3] Called from file
"outputs/output.ml", line 130, characters 4-20
2018/07/14 21:38:28 [clock.wallclock_gstreamer:3] Called from file
"source.ml", line 388, characters 6-18
2018/07/14 21:38:28 [clock.wallclock_gstreamer:3] Called from file
"clock.ml", line 221, characters 15-26
2018/07/14 21:38:28 [output(dot)gstreamer:1] Got ill-balanced
activations (from output(dot)gstreamer)!
2018/07/14 21:38:28 [clock:2] Error when leaving output
output(dot)gstreamer: File "source.ml", line 414, characters 10-16:
Assertion failed!
2018/07/14 21:38:28 [clock:3] Raised at file "source.ml", line 414,
characters 10-22
2018/07/14 21:38:28 [clock:3] Called from file "source.ml", line 421,
characters 30-58
2018/07/14 21:38:28 [clock:3] Called from file "clock.ml", line 79,
characters 6-13
2018/07/14 21:38:28 [clock:4] Main phase starts.
2018/07/14 21:38:28 [main:3] Shutdown started!
2018/07/14 21:38:28 [main:3] Waiting for threads to terminate...
2018/07/14 21:38:28 [main:3] Threads terminated.
2018/07/14 21:38:28 [threads:3] Shutting down scheduler...
2018/07/14 21:38:28 [threads:3] Scheduler shut down.
2018/07/14 21:38:28 [main:3] Cleaning downloaded files...
2018/07/14 21:38:28 [main:3] Freeing memory...
2018/07/14 21:38:28 >>> LOG END

When I try to stream a playlist of video files instead, it works:

    #!/home/per/.opam/4.05.0/bin/liquidsoap
    # XTRadio Video
    # Standard settings
    set("log.file.path","/tmp/vlc-radio.log")
    set("log.level",4)
    set("server.telnet",false)
    # Stream Settings

audio_file = "/tmp/bla.mp3"
 video_file = "/tmp/playlist.txt"


 # Create a video source with the playlist for video track
 video = playlist(video_file)

audio = single(audio_file)

 # Mux audio and video
 #source = mux_audio(audio=audio,video)
 source = mux_video(video=video,audio)

 # Disable real-time processing, to process with the maximun speed
 #source = clock(sync=false,source)


output.gstreamer.audio_video(fallible=true,
      video_pipeline=
        "videoconvert ! timeoverlay ! x264enc bitrate=2000 !
video/x-h264,profile=main ! queue ! mux.",
      audio_pipeline=
        "audioconvert ! voaacenc bitrate=128000 ! queue ! mux.",
      pipeline=
        "flvmux streamable=1 name=mux ! rtmpsink
location=\"rtmp://a.rtmp.youtube.com/live2/z69k-b187-zx59-aaw2\"",
      source)






------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Savonet-users mailing list
Savonet-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/savonet-users

Reply via email to