4

I would like to build a module to broadcast a fake-live playlist dynamically to an rtmp server. There are may playlist broadcaster like Xsplit, VirtualCam with FFMLE, Wirecast but each of them need a good graphical card to work while cloud server may not have graphical cards. I tried both Liquidsoap with the following congif:

set("frame.video.width", 1280)
set("frame.video.height", 720)
set("frame.video.samplerate", 25)
set("gstreamer.add_borders", false)

s = single("/home/user/singlevideo.mp4")

s = fallback([s, blank()])

output.gstreamer.audio_video(
  video_pipeline=
    "videoconvert ! x264enc bitrate=2000 ! video/x-h264,profile=baseline ! queue ! mux.",
  audio_pipeline=
    "audioconvert ! voaacenc bitrate=96000 ! queue ! mux.",
  pipeline=
    "flvmux name=mux ! rtmpsink location=\"rtmp://127.0.0.1:1930/live/live live=1\"",
  s)

This is working well, but when I change it from single to playlist("/home/user/playlist.m3u") I got only a black screen (which is the fallback). If someone ever used Liquidsoap with video playlist what to change in this config to get it working?

For FFMPEG also it's working for single video file by cannot stream playlist. If someone have a script that can monitor ffmpeg process and change source 3 secs before end of current file or something like that?

Ilimaan
  • 43
  • 1
  • 2
  • 6
  • according to the link in https://trac.ffmpeg.org/ticket/1199 I suppose you could download the .m3u file, parse it for url's, then pass those to ffmpeg using some type of concat demuxer. GL! – rogerdpack Sep 18 '14 at 16:08

3 Answers3

1

I'm using it like this:

videosource = playlist(reload=3600, "/home/user/videostreams/videos.txt")
videoplaylist = mksafe(videosource)
theoracodec = %ogg(%theora(quality=25), %vorbis)

And then I'm outputting it to Icecast:

output.icecast(theoracodec,id="icecast_ogv",host="localhost",port=8000,password="passw",mount="video",description="Description",public=false,url="my_url",videoplaylist)
LAamanni
  • 177
  • 2
  • 13
1

maybe this can help you

Libav/FFMPEG streaming solution to RTMP with a dynamic playlist.

https://github.com/fyroc/RTMP-Playlist

Jim
  • 1,037
  • 11
  • 18
0

try

playlist.safe("/home/user/playlist.m3u")
Taryn
  • 242,637
  • 56
  • 362
  • 405