1

I want to transmit HLS stream to RTP multicast via FFmpeg and use the following command:

ffmpeg -re -i HLSstream -c copy -f rtp_mpegts rtp://ip:port

But the output source сrumbles sometimes (I can't understand periodicity of it). I playing it via VLC and it shows the following errors:

[00007fe17800b508] ts demux error: libdvbpsi error (PSI decoder): TS discontinuity (received 7, expected 2) for PID 0

[00007fe17800b508] ts demux error: libdvbpsi error (PSI decoder): TS discontinuity (received 7, expected 2) for PID 4096

[00007fe17800b508] ts demux error: libdvbpsi error (PSI decoder): TS discontinuity (received 8, expected 7) for PID 17

[00007fe17800b508] ts demux error: libdvbpsi error (PSI decoder): TS discontinuity (received 2, expected 14) for PID 0

[00007fe17800b508] ts demux error: libdvbpsi error (PSI decoder): TS discontinuity (received 2, expected 14) for PID 4096

It works well when I copy the HLS stream to local file and play it.
Is the way to fix it? Or please advice other tool to transmit HLS to UDP.

2
  • 1
    RTP/UDP is a lossy protocol. You should expect lost packets.
    – SlimSCSI
    Commented Aug 9, 2017 at 20:18
  • ok. thanks! I routed output from ffmpeg to vlc2 with the following command: ffmpeg -re -i HLSstream -c copy -f mpegts - 2>/dev/null | vlc - --ttl=255 -I dummy --sout '#rtp{access=rtp,mux=ts,dst=IP,port=PORT}' :sout-all :sout-keep And it works without errors. In previous variant I saw crumbles each 5-40 seconds. Commented Aug 10, 2017 at 6:44

1 Answer 1

0

It's not the best variant, but in my case it helped. I getting data with ffmpeg then routing output to vlc2 via pipe and transmitting it to rtp with the following command:

ffmpeg -re -i HLSstream -c copy -f mpegts - 2>/dev/null | vlc - --ttl=255 -I dummy --sout '#rtp{access=rtp,mux=ts,dst=IP,port=PORT}' :sout-all :sout-keep

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.