[FFmpeg-user] Unresolved concatenation and subtitle problems

Mark Filipak markfilipak.imdb at gmail.com
Wed Dec 27 03:01:58 EET 2023


On 12/26/23 17:30, Mark Filipak wrote:
> Maybe that was too much information. I'll try again.
> 
> When ffmpeg's '-vf showinfo' and ffprobe's '-show_streams' disagree, which should I trust?

How about this?

I'm trying to remux-join all 4 episodes of Bergman's 5-hour "FANNY AND ALEXANDER". I want to cut the 
intros of 2 3 & 4 and the credits of 1 2 & 3 so it's continuous. I first tried it via an "ffconcat 
version 1.0" text that did all the remuxing-trimming-joining. I made bean soup. Not only was the 
join messed up, the episodes behaved like they'd been put through a temporal blender.

I tried MKVToolNix and made a slightly different flavor of bean soup, one that had no ending PTS so 
running time was listed as over 5000 hours. Yikes!

Obviously, something about the packet PTSs or how they were handled was not right.

Now I'm trying to trim-remux one at a time, then craft smoothed & shifted PTSs, then join them via a 
simple "ffconcat version 1.0" text.

Combining segments 1 & 2, all is Joy except the join. The join is 2 seconds of 5 stop-start 
'stutters' showing 3 flashes of the opening frame of segment 2. Rather than add a few black frames 
to the beginning of segment 2, I'm actually trying to fix things.

I thought I'd made it so that segment 1 would join seamlessly with segment 2 without ffmpeg having 
to do anything. It appears the packets are out of order. But so what? FFmpeg can handle that, can't it?

Then I discovered that ffmpeg's '-vf showinfo' and ffprobe's '-show_streams' disagree on the 
starting PTSs for video. How about the audio, and subs? They appear to be okay: No sync issues.
Is the 2 seconds of 'stutters' and flashes taken into account in the audio & sub PTSs? Apparently, 
yes. Will they be in sync if I overcome the 'stutters' and flashes? Who knows? If the 2 seconds is 
real, then probably. If the 2 seconds is bogus, then maybe not.

But first, I need to find what the 'true' start_pts is. It's been my experience that ffmpeg may be 
right, or ffprobe may be right, or they may both be wrong.

If the sources were VOBs, then I could look in the packet headers and find out. But they're M2TSs.

Have YOU been through this? Do you have any experience/advice to share? I'll send you a mental hug 
if you do. I'm getting frazzled.

-- Mark.




More information about the ffmpeg-user mailing list