Ticket #2210 (closed defect: fixed)
AC3 channel layout change midstream causes severe errors
|Reported by:||agni451||Owned by:|
|Blocking:||Reproduced by developer:||yes|
|Analyzed by developer:||no|
Summary of the bug:
How to reproduce:
% ffmpeg -v verbose -y -i "C:\PATH\ORIG.ts" -c:v mpeg2video -q:vscale 0 -flags +ilme+ildct -top 1 -c:a ac3 -ab 384k -ac 6 -async 48000 "C:\PATH\FIX.ts" ffmpeg version N-46469-gc995644 built on Nov 5 2012
The input I'm using is a TV program recorded in Media Center, so it has an MPEG2 stream and a 6ch ac3 stream. I use the commandline above in an effort to correct for missing audio/video frames, and it works great if I've already removed the commercials from the stream (using DGIndexNV to copy the pieces I want). However, I've noticed that DGIndexNV does not compensate for the initial audio delay in the stream, so the end of the audio cuts out before the video. I want to start trimming at specific frames, and the only way to do that is to fix the stream first using the above commandline. Then I find the frames at which I need to cut, and use tsmuxer to do it. Since the commandline above also fixes the initial delay, I don't have to worry about the audio being off.
However, some of the recorded shows with commercials experience an audio channel number and layout change around the commercials, going from 6ch 48000 --> 2ch stereo, then switching back. This causes extreme problems with the fixed stream using the above commandline, as I suddenly start getting messages like " st:0 PTS: 100320 DTS: 100320 < 64387716 invalid, clipping" and adding very large segments of silent audio (like 10 minutes).
In the log I am attaching, you will see that the audio changes from 6ch to stereo or vice versa a total of 6 times. The one that takes place at 44:17.120 results in the entire rest of the clip being silent. I don't think I'm missing any features that might fix this, so I'm posting it as a bug.
- Component changed from FFmpeg to undetermined
- Keywords async added
- Version changed from unspecified to git-master
comment:15 follow-up: ↓ 16 Changed 3 months ago by agni451
comment:21 in reply to: ↑ 20 ; follow-up: ↓ 22 Changed 3 months ago by cehoyos
- Cc agni451 added
- Status changed from new to open
- Reproduced by developer set
comment:23 Changed 3 months ago by cehoyos
- Status changed from open to closed
- Resolution set to fixed