15.03.2020

Streaming a live-stream... [ffmpeg + vlc for m3u8]

After writing about how to stream a file to some smartphones or tablets, now the commands for streaming a live-stream to other devices.

And like before: VLC is needed.


But in addition to vlc you have to use ffmpeg:
A complete, cross-platform solution to record, convert and stream audio and video.

First thing you need is the url of the live-stream you want to re-stream. In my case is took the "Zweites Deutsches Fernsehen" (secondary channel of germany) and their url is
https://zdf-hls-01.akamaized.net/hls/live/2002460/de/high/master.m3u8
(In most of the tv channels it is something like "master.m3u8")
m3u is the acronym for MP3 URL and m3u8 uses UTF-8.

So the command for streaming is:
ffmpeg -i https://zdf-hls-01.akamaized.net/hls/live/2002460/de/high/master.m3u8 -c copy -f nut - | vlc - :sout=#transcode\{vcodec=h264,scale=Auto,scodec=none\}:http\{mux=ffmpeg\{mux=flv\},dst=:8080/test\} :no-sout-all :sout-keep
 which consists of

ffmpeg -i https://zdf-hls-01.akamaized.net/hls/live/2002460/de/high/master.m3u8 -c copy -f nut - 
which is piped into
 vlc - :sout=#transcode\{vcodec=h264,scale=Auto,scodec=none\}:http\{mux=ffmpeg\{mux=flv\},dst=:8080/test\} :no-sout-all :sout-keep
(this is the command i build up in the last posting.)

Have fun!

Keine Kommentare:

Kommentar posten