Opened 2 years ago

Last modified 2 years ago

#8889 new defect

mpegts with dvb_subtitle on udp output broken?

Reported by: barhom Owned by:
Priority: normal Component: undetermined
Version: git-master Keywords: mpegts dvb_subtitle
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no


Summary of the bug:

Input video has dvb_subtitles;
Use mpegts muxer and copy subtitles to output using udp;
The output is bad.

Does not happen when outputting to file instead of udp. And it does not happen if you choose to omit the subtitles.

How to reproduce:
Unfortunately I could not make the test file small and still present the issue. The input.ts file you need to download is 53M.

The following reproduces the bug.

ffmpeg -re -i "input.ts" -c copy -map 0:v -map 0:a:0 -map 0:s:0 -f mpegts "udp://"

In order to "watch" the issue I recommend watching the output using either VLC or MPV using the link "udp://@".

Should you choice to remove the subtitles like this,

ffmpeg -re -i "input.ts" -c copy -map 0:v -map 0:a:0 -f mpegts "udp://"

The issue will not present itself.

You might want to remove the "-re" and record the multicast using the "multicat" tool back to file if you need to investigate further.

Change History (3)

comment:1 by barhom, 2 years ago

I think I found out why I see a "glitch". It seems like when outputting to UDP there is some "waiting" time when there are no packets.

Here is an example from tcpdump. Notice how there is a 3 second delay between packets.

09:57:38.262954 IP > UDP, length 1316
09:57:38.262964 IP > UDP, length 1316
09:57:38.262974 IP > UDP, length 1316
09:57:38.262982 IP > UDP, length 752
09:57:38.262992 IP > UDP, length 1316
09:57:38.263002 IP > UDP, length 376
09:57:38.263035 IP > UDP, length 188
09:57:41.544091 IP > UDP, length 1316
09:57:41.544109 IP > UDP, length 1316
09:57:41.544119 IP > UDP, length 1316
09:57:41.544129 IP > UDP, length 1316
09:57:41.544138 IP > UDP, length 1316
09:57:41.544148 IP > UDP, length 1316

There is no such "delay" of 3 seconds when omitting the dvb_subtitles.

comment:2 by barhom, 2 years ago

Patch provided by rcombs seems to solve this issue,

comment:3 by barhom, 2 years ago

I've added the patch in this fork,

Not sure when the patch will be released to ffmpeg.

Note: See TracTickets for help on using tickets.