Opened 4 years ago
Last modified 4 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 |
Description
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.
https://drive.google.com/file/d/1J90X1zlzQf-LiMwBTnMs-HcCwiFjtHG7/view?usp=sharing.
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://239.200.0.1:1231?pkt_size=1316"
In order to "watch" the issue I recommend watching the output using either VLC or MPV using the link "udp://@239.200.0.1:1231".
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://239.200.0.1:1231?pkt_size=1316"
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 , 4 years ago
comment:2 by , 4 years ago
Patch provided by rcombs seems to solve this issue,
https://gist.github.com/rcombs/632c1767a3e5036f0480f380e04c062b
comment:3 by , 4 years ago
I've added the patch in this fork,
https://github.com/barhom/FFmpeg/commit/6f0d90df886310fd7f7ae6e63e167269508ded6d
Not sure when the patch will be released to ffmpeg.
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.
There is no such "delay" of 3 seconds when omitting the dvb_subtitles.