Beiträge von ras

    Hi Carel,


    Many thanks for that. The single change that made the most difference, is the buffer_size=65536 one. When I added that, I was able to play 1-2 second bursts and I've since spent some time playing with fifo_size as well as a few others but nothing so far is perfect, but have a couple of other ideas. Looking in the plugin info page shows the buffer filling to 10-15% and then draining to zero. The only time I can get uninterupted play, is with low bitrate portions of video and then only if I use the -re option, which I am a bit confused about, as it's only recommended for playing files rather than streaming.


    Anyway, very much appreciate the advice and will carry on tinkering - the options in ffmpeg are quite formidable. I haven't found any reference to one you used here, -flush_packets 0.


    Edit: Some hours later. Well I'm still not sure of the exact relationship between ffmpeg's fifo, buffer and packet size, IPTV plugin's buffer and maybe vdr's buffer as well, but am now getting a perfect result with pretty much the settings you gave me:


    ffmpeg -loglevel fatal -probesize 10M -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" -re -i https://i.mjh.nz/nz/tv.9.m3u8 -map 0:20 -map 0:21 -vcodec copy -acodec copy -metadata service_name=tv.9 -flush_packets 0 -f mpegts udp://127.0.0.1:${PORT}?pkt_size=1316&reuse=1&overrun_nonfatal=1&buffer_size=65536 &


    I'll add the PID extras later. Thanks again.


    Kind regards

    Thanks for the reply. I'm not familiar with mpv, but it looks like it's a software decoder. The TT S2 6400 card I have, is a hardware MPEG/H264 decoder as well as doing the OSD, so using IPTV would make sense if I can use it. I'm only using ffmpeg for remultiplexing, which is a pretty lightweight task.


    Edit later: Software decoder not true, as it can use GPU hardware, but I have a low powered system and would like to stick with the TT card as the backend.

    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.

    Ah, so that would be 40MB/s, which may be too slow.

    When I run the rsync test that provokes the error, the data transfer rate is almost 100MB/s. The writing on the remote host goes to an SSD, so the Gigabit-Ethernet is probably the limiting factor.

    OK. I only have a couple of rather full spinning drives at the vdr end and rsync doesn't accept either /dev/zero or /dev/null as source or destination so cannot stress the network further.


    Regards,


    Richard


    Thanks for the link, it looks like a very useful resource.


    Regards,

    Richard

    Sure,


    01:00.0 Multimedia controller: Digital Devices GmbH Cine V7

    Subsystem: Digital Devices GmbH Device 0024

    Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx+

    Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-

    Latency: 0

    Interrupt: pin A routed to IRQ 124

    Region 0: Memory at 91400000 (64-bit, non-prefetchable) [size=64K]

    Capabilities: [50] Power Management version 3

    Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA PME(D0-,D1-,D2-,D3hot-,D3cold-)

    Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-

    Capabilities: [70] MSI: Enable+ Count=1/2 Maskable- 64bit+

    Address: 00000000fee02004 Data: 4022

    Capabilities: [90] Express (v2) Endpoint, MSI 00

    DevCap: MaxPayload 128 bytes, PhantFunc 0, Latency L0s <64ns, L1 <1us

    ExtTag- AttnBtn- AttnInd- PwrInd- RBE+ FLReset- SlotPowerLimit 0.000W

    DevCtl: Report errors: Correctable- Non-Fatal- Fatal- Unsupported-

    RlxdOrd+ ExtTag- PhantFunc- AuxPwr- NoSnoop-

    MaxPayload 128 bytes, MaxReadReq 512 bytes

    DevSta: CorrErr- UncorrErr- FatalErr- UnsuppReq- AuxPwr- TransPend-

    LnkCap: Port #0, Speed 2.5GT/s, Width x1, ASPM L0s, Exit Latency L0s unlimited, L1 <1us

    ClockPM- Surprise- LLActRep- BwNot- ASPMOptComp-

    LnkCtl: ASPM Disabled; RCB 64 bytes Disabled- CommClk+

    ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-

    LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt-

    DevCap2: Completion Timeout: Range A, TimeoutDis+, LTR-, OBFF Not Supported

    AtomicOpsCap: 32bit- 64bit- 128bitCAS-

    DevCtl2: Completion Timeout: 50us to 50ms, TimeoutDis-, LTR-, OBFF Disabled

    AtomicOpsCtl: ReqEn-

    LnkCtl2: Target Link Speed: 2.5GT/s, EnterCompliance- SpeedDis-

    Transmit Margin: Normal Operating Range, EnterModifiedCompliance- ComplianceSOS-

    Compliance De-emphasis: -6dB

    LnkSta2: Current De-emphasis Level: -6dB, EqualizationComplete-, EqualizationPhase1-

    EqualizationPhase2-, EqualizationPhase3-, LinkEqualizationRequest-

    Capabilities: [100 v1] Vendor Specific Information: ID=0000 Rev=0 Len=00c <?>

    Kernel driver in use: ddbridge

    Kernel modules: ddbridge


    Regards,


    Richard