Ticket #6753 (closed defect: fixed)
Opened 3 years ago
Last modified 22 months ago
Some DVB subtitles are delayed
| Reported by: | otto at kolsi dot fi | Owned by: | janne |
|---|---|---|---|
| Priority: | minor | Milestone: | 0.23 |
| Component: | MythTV - Video Playback | Version: | 0.22-fixes |
| Severity: | medium | Keywords: | |
| Cc: | Ticket locked: | yes |
Description
Probably because of the ffmpeg sync, current trunk shows some DVB subtitles delayed. When the delay happens, it is something like 1-3 secs.
Sample file can be downloaded from here (you need couple of annoying clicks and some waiting): http://www.zshare.net/video/62954529d73feefb/
In sample, when there is a cut in the program and the camera turns, the first subtitles should be displayed immediately when guy starts to speak. Correct timing can be verified with e.g. VLC (linux/win).
I've used "mythtv" to play the sample file but the same problem can be seen with mythfrontend also.
Attachments
Change History
comment:1 Changed 3 years ago by janne
- Owner changed from ijr to janne
- Status changed from new to accepted
- Milestone changed from unknown to 0.22
comment:2 Changed 3 years ago by otto at kolsi dot fi
Here is another sample for DVB subtitle problem. When this one is played with "mythtv", the subtitles are shown only very briefly (some tens of milliseconds?). The delay problem described earlier in this ticket happens to all(?) programs while this millisecond problem is quite rare.
I've seen this happening already before ffmpeg sync so it might not be related to that. Again tested with VLC and it can show the subs correctly for this sample.
comment:3 Changed 3 years ago by jheikkal@…
Same problem here. Subtitle appearance duration is really annoying because it happens constantly on some channels. Another sample : Subtitle Duration sample
Subtitle delay problem sample : Subtitle Sync sample
Both play nicely with vlc.
Changed 3 years ago by janne
-
attachment
avfd_packet_queues_v1.diff
added
implements packet queues for avformatdecoder
comment:4 Changed 3 years ago by jheikkal@…
Patch breaks seeking. Crashes when trying to fast forward or skip or anything...
comment:5 Changed 2 years ago by jheikkal@…
Did a bit more digging and testing because some channels are useless because of this bug(damn wife doesn't understand english well ;)
That patch fixes subtitle displaying duration but delay is still there. One problem is that patch breaks back/ff skipping.
Skipping backards log http://mythtv.pastebin.ca/1579286
Skipping backwards crash log http://mythtv.pastebin.ca/1579287
Skpping forwards log http://mythtv.pastebin.ca/1579288
comment:6 Changed 2 years ago by janne
(In [22320]) try to fix timestamps of delayed subtitles. Refs #6753
this should ensure that the subtiltes have a resonable display time it does not fix the cause, the subtitle packets are returned very late from the mpeg ts demuxer. It's a regression of the ffmpeg sync in [20797] the upstream demuxer behaves in the same way. I intend to make the demuxing independent of the GetFrame? for 0.23 so that we handle improperly interleaved streams better
comment:8 Changed 2 years ago by Martin R Mortensen <martin.rene.mortensen@…>
After upgrading to 0.22 I seem to problem also. in DK DVB channels DR1, DR2 have fine subtitles, but TV2 has consistently delayed subtitles. I checked both 22-fixes and trunk. This makes one channel unwatchable so far. Was there a temporary fix for this? It seems that 22320 didnt make it better.
Changed 2 years ago by anonymous
-
attachment
dvb_subtiles_workaround.patch
added
A temporary solution is to revert to an older version of mpegts.{h,c}. Attaced patch works for me.
comment:9 Changed 2 years ago by Martin R Mortensen <martin.rene.mortensen@…>
patch is rejected partially when patching 22-fixes(22864m): root@darkmedia:/usr/local/src/22-fixes/mythtv# patch -p0 <dvb_subtiles_workaround.patch patching file libs/libavformat/mpegts.c Hunk #2 FAILED at 19. 1 out of 80 hunks FAILED -- saving rejects to file libs/libavformat/mpegts.c.rej patching file libs/libavformat/mpegts.h
And I think reverting to before the ffmpeg sync will break the LATM AAC patch, which I need for sound. I'm a bit at a loss here.
comment:10 Changed 2 years ago by Klavs Klavsen <kl@…>
Subscribing - bitten by same bug :(
comment:11 Changed 2 years ago by anonymous
Does anybody know when this patch (or other) will be added to the 22-fixes tree?
comment:12 Changed 2 years ago by mlgim
Same problem here - I also need the ffmpeg sync patched level AND I'm bitten by this bug :0(
comment:13 Changed 2 years ago by stuartm
- Ticket locked set
Discussion belongs on the mailing lists NOT in trac.
comment:15 Changed 22 months ago by janne
comment:16 Changed 22 months ago by janne
comment:17 Changed 22 months ago by janne
(In [24251]) backports [24242:24243] from trunk
libav: emit pes packets from the mpeg-ts demuxer on completion Emitting the packets on the start of the next pes packet causes delayed DVB subtitles. Refs #6753
comment:18 Changed 22 months ago by janne
- Status changed from accepted to closed
- Version changed from head to 0.22-fixes
- Resolution set to fixed
- Milestone changed from 0.24 to 0.23
closing as fixed, if anyone still using 0.22-fixes reports success with ticket_6753_fix_dvb_subtitle_delay.diff, I'll commit it to 0.22-fixes.
