Project

General

Profile

Stream Playback (FFMPEG/FFPLAY)

Added by Dario M over 5 years ago

Hi everyone,
Having trouble finding information on stream playback compatibility.

What i have;
- 5x Multicast MPTS addresses carrying all TV channels from each network (Sydney Australia). (Product is Chameleon WISI - [[https://www.wisi.de/en/communications/products/chameleon/]])
EG: udp::1234

What works;
- TvHeadEnd working well, all channels, EPG, Recording all working.
- Playback in VLC directly from multicast udp::1234
- Playback in VLC from TvHeadend (playlist and direct channels - all ok)

What doesnt work;
- Any other player, will not play a stream from TvHeadend. Want to use FFMPEG to transcode the stream to H264 (if not already) and feed to FFSERVER for RTSP output.
But FFMPEG/FFPLAY can not get the stream from TvHeadend.
I cant find any information as to why it cant playback?

Final Goal;
- RTSP Stream Output - (not achieved)
- need output as RTSP, in order to add TV channels to a CCTV Surveillance software. (CCTV software can accept RTSP streams, RTP with more difficulty)

Supporting info;
- Playlist URL: http://163.189.30.167:9981/playlist (working)
- Channel URL: http://163.189.30.167:9981/stream/channelid/604520767 (individual urls working)
- Platform: UBUNTU 18.04 Core
- Version: HTS Tvheadend 4.2.8-23~g74cdf3f16~bionic

Can you please help answer as why i cant get a stream from TvHeadend in FFMPEG for further transcoding?
Why cant i use FFPLAY to see the TvHeadend stream? (nothing on google - all i found is that ffplay can/should)
Is there an easier way to achieve RTSP (preferred) or RTP output?

Thanks in advance...


Replies (5)

RE: Stream Playback (FFMPEG/FFPLAY) - Added by Dario M over 5 years ago

Just to add,
I had NO success with WOWZA receiving the TvHeadend stream either...

RE: Stream Playback (FFMPEG/FFPLAY) - Added by saen acro over 5 years ago

Read how to use TSHTTP stream with FFSERVER
You can transcode inside TVH also.

RE: Stream Playback (FFMPEG/FFPLAY) - Added by Dario M over 5 years ago

Thanks for your reply, but it didnt help. :(
FFMPEG TSHTTP TS over HTTP, HTTP TS FFMPEG - none yield any useful results on google.

RE: Stream Playback (FFMPEG/FFPLAY) - Added by clint jones almost 5 years ago

You can use VLC player to restream a tvheadend channel command line or from the interface to an RTMP port

Since you asked about FFMPEG try from the command line

/usr/bin/ffmpeg -i http://web:[email protected]:9981/stream/channelid/1990892898? \-c:v libx264 -crf 35 -preset veryfast -g 24 -sc_threshold 0 \-c:a aac -b:a 128k -ac 2 \-f hls -hls_time 4 /var/www/html/live/live2/mystream2.m3u8 -async 1 -vsync 1

this has been working ok making an M3u8 file

I have been using VLC to stream a directory then using FFMPEG to make it available on the web like this
VLC
vlc -vvv /disk13/ --loop --sout '#standard{access=http,mux=ts,dst=192.168.1.201:30000}'

FFMPEG

/usr/bin/ffmpeg -i http://192.168.1.201:30000 \-c:v libx264 -crf 21 -preset veryfast \-c:a aac -b:a 128k -ac 2 \-f hls -hls_time 4 /var/www/html/live/mystream.m3u8

you will have to adjust for your file names and locations and you channel with user and password, interestingly enough the output can then be sent to your tvheadend as an IPTV mux or your friends

Clint

RE: Stream Playback (FFMPEG/FFPLAY) - Added by Gene Pratt almost 5 years ago

clint jones wrote:

You can use VLC player to restream a tvheadend channel command line or from the interface to an RTMP port

Since you asked about FFMPEG try from the command line

/usr/bin/ffmpeg -i http://web:[email protected]:9981/ valentines day gifts for her stream/channelid/1990892898? \-c:v libx264 -crf 35 -preset veryfast -g 24 -sc_threshold 0 \-c:a aac -b:a 128k -ac 2 \-f hls -hls_time 4 /var/www/html/live/live2/mystream2.m3u8 -async 1 -vsync 1

this has been working ok making an M3u8 file

I have been using VLC to stream a directory then using FFMPEG to make it available on the web like this
VLC
vlc -vvv /disk13/ --loop --sout '#standard{access=http,mux=ts,dst=192.168.1.201:30000}'

FFMPEG

/usr/bin/ffmpeg -i http://192.168.1.201:30000 \-c:v libx264 -crf 21 -preset veryfast \-c:a aac -b:a 128k -ac 2 \-f hls -hls_time 4 /var/www/html/live/mystream.m3u8

you will have to adjust for your file names and locations and you channel with user and password, interestingly enough the output can then be sent to your tvheadend as an IPTV mux or your friends

Clint

Thank you for detailed explanation!
It was helpful

    (1-5/5)