I have spent some days with Rolf's IPTV plugin, attempting to use ffmpeg as the transcode/streaming alternative to the VLC based script that is included and I am wondering if anyone else has succeeded?
The channel I'm receiving is an HTTP Live (HLS) one, which plays without issue in a few standalone media players and am using the following ffmpeg command to produce a UDP mpegts stream:
ffmpeg -loglevel fatal -probesize 10M -analyzeduration 0 -fpsprobesize 0 -headers "X-Forwarded-For:\ 202.89.4.222\r\nUser-Agent:\ Mozilla/5.0\ (Windows\ NT\ 10.0;\ Win64;\ x64)\ AppleWebKit/537.36\ (KHTML,\ like\ Gecko)\ Chrome/84.0.4147.105\ Safari/537.36\r\n" -i https://i.mjh.nz/nz/tv.9.m3u8 -map 0:20 -map 0:21 -vcodec copy -acodec copy -metadata service_name=tv.9 -f mpegts udp://127.0.0.1:${PORT} &
This takes the highest resolution audio and video streams, does no re-encoding and remulitplexes them. If I run this script locally and enable logging, I get the following:
Output #0, mpegts, to 'udp://127.0.0.1:4321':
Metadata:
service_name : tv.9
encoder : Lavf57.37.101
Stream #0:0: Video: h264 ([27][0][0][0] / 0x001B), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], q=2-31, 25 fps, 25 tbr, 90k tbn, 90k tbc
Metadata:
variant_bitrate : 2929080
Stream #0:1: Audio: aac (LC) ([15][0][0][0] / 0x000F), 48000 Hz, stereo, 140 kb/s
Metadata:
variant_bitrate : 2929080
Stream mapping:
Stream #0:20 -> #0:0 (copy)
Stream #0:21 -> #0:1 (copy)
Press [q] to stop, [?] for help
[hls,applehttp @ 0x1785420] No longer receiving playlist 0
[hls,applehttp @ 0x1785420] No longer receiving playlist 1
[hls,applehttp @ 0x1785420] No longer receiving playlist 2
[hls,applehttp @ 0x1785420] No longer receiving playlist 3
frame= 374 fps=0.0 q=-1.0 size= 2506kB time=00:00:14.88 bitrate=1379.5kbits
frame= 544 fps=520 q=-1.0 size= 4985kB time=00:00:21.68 bitrate=1883.8kbits
frame= 600 fps= 91 q=-1.0 size= 5961kB time=00:00:24.02 bitrate=2033.0kbits
frame= 750 fps= 58 q=-1.0 size= 7445kB time=00:00:30.01 bitrate=2031.9kbits
frame= 900 fps= 47 q=-1.0 size= 9626kB time=00:00:36.00 bitrate=2189.8kbits
frame= 1050 fps= 42 q=-1.0 size= 11326kB time=00:00:42.00 bitrate=2209.0kbits
frame= 1199 fps= 38 q=-1.0 Lsize= 12746kB time=00:00:48.02 bitrate=2174.4kbits/s
speed=1.53x
and I can connect a local player which works fine, but so far no combination of options and tweaks to the channels.conf file yield anything other than very intermittent bursts of recognisable audio. The log consistently outputs:
Jul 5 09:53:55 vdr vdr: [1078] IPTV: Skipped 60 bytes to sync on TS packet
Jul 5 09:53:55 vdr vdr: [1078] IPTV: Skipped 96 bytes to sync on TS packet
Jul 5 09:53:55 vdr vdr: [1078] IPTV: Skipped 156 bytes to sync on TS packet
Jul 5 09:53:55 vdr vdr: [1078] IPTV: Skipped 156 bytes to sync on TS packet
Jul 5 09:53:55 vdr vdr: [1078] IPTV: Skipped 81 bytes to sync on TS packet
Jul 5 09:53:55 vdr vdr: [1078] IPTV: Skipped 75 bytes to sync on TS packet
Jul 5 09:53:55 vdr vdr: [1078] IPTV: Skipped 156 bytes to sync on TS packet
Jul 5 09:53:55 vdr vdr: [1078] IPTV: Skipped 156 bytes to sync on TS packet
Jul 5 09:53:55 vdr vdr: [1078] IPTV: Skipped 50 bytes to sync on TS packet
Jul 5 09:53:55 vdr vdr: [1078] IPTV: Skipped 106 bytes to sync on TS packet
I've attached the output of DVB Inspector, which to my admittedly inexperienced eye, doesn't show an obvious problem.
The channels conf entry is: TV6;IPTV:60:S=1|P=1|F=EXT|U=iptvstream.sh|A=0:I:0:256:257=@4:0:0:1:1:1:0
and I'm using vdr 2.4.6 and a TT S2 6400 card.
Any help/advice much appreciated and I apologise for no German. Please feel free to reply in German and I can translate.
Regards.