Skip to content

Proper MPEG-TS file freezes upon playback after being remuxed with VLC

Short description:

I have a .ts file which I created myself using ffmpeg. It plays in VLC perfectly fine.

When I remux .ts to another .ts with VLC without transcoding (just output to access=file with sout-all), playback of the resulting file freezes VLC, always on the same playback time (~00:00:04 and ~00:00:19).

The console output in this moment as follows:

[00007ff1b8000c80] main input error: ES_OUT_SET_(GROUP_)PCR  is called too late (pts_delay increased to 1000 ms)
[h264 @ 0x7ff1b0023440] get_buffer() failed
[h264 @ 0x7ff1b0023440] thread_get_buffer() failed
[h264 @ 0x7ff1b0023440] decode_slice_header error
[h264 @ 0x7ff1b0023440] no frame!
[00007ff1bcc020d0] main decoder error: buffer deadlock prevented

Additional information:

This file contains DVB subtitles, which seems to be the cause of the issue in this exact file (but this issue is not limited or linked to subtitles per se). Generally, files with many audio tracks and additional data cause this issue more or less, while "simple" files with single video and audio track are less error-prone.

I tried to analyze the file with TS Doctor and TSDuck, both utilities report 0 warnings, 0 errors. However, TS Packet Timing in TS Doctor shows anomaly on 7 and 19 seconds of the video (the screenshot attached).

Steps to reproduce (100% reproducibility with VLC 3.0.10):

  1. Download vlc-hiccip.tar.gz, unpack
  2. Download original.ts, copy to the same directory
  3. Run ./runvlc.sh, wait 2 seconds, press ctrl+c
  4. Try to play remuxed.sh in VLC

Expected result: Video file plays smoothly, just as original file.

Actual result: Video file stutters on 00:00:03 and 00:00:19. Video audio stops playing for a second, then resumes.

Related to #20785. And for some strange reason, it also freezes on ~00:00:04 and ~00:00:19.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information