[FFmpeg-user] confusion with "-vsync 1" / "-vsync cfr" and "-map" (to sync audio to video)

tracey jaquith tracey at archive.org
Wed Jan 16 01:53:48 CET 2013


On Jan 15, 2013, at 1:00 PM, Carl Eugen Hoyos <cehoyos at ag.or.at> wrote:

> tracey jaquith <tracey <at> archive.org> writes:
> 
>> I was about to say, "will do", but it turns out I had 
>> been using "-async" properly before, but had various issues 
> 
>> (especially came up with MPEG-TS with 5.1 audio that dropped
>> down to stereo and lower quality local affiliate commercials for us).
> 
> This is hard to believe / unrelated to .sync / please 
> provide a report and a sample.

OK, i've got a 24MB MPEG-TS sample of this.  Before I reply w/ the long console output,
can you just quick glance over my lines here so that you end up with a sample/report that you are expecting?
(The only difference between the two is $V1)
V1="-async 88200";
ffmpeg -y -i *.mpg -vcodec libx264 -vf yadif,scale=640:360   -wpredp 0 -profile:v baseline -x264opts 'cabac=0:bframes=0:ref=1:level=30:bitrate=700:vbv_maxrate=768:vbv_bufsize=1400'   -ac 2 -b:a 128k -ar 44100     -acodec aac -strict experimental            x.mp4;    qt-faststart x.mp4 none.mp4;
ffmpeg -y -i *.mpg -vcodec libx264 -vf yadif,scale=640:360   -wpredp 0 -profile:v baseline -x264opts 'cabac=0:bframes=0:ref=1:level=30:bitrate=700:vbv_maxrate=768:vbv_bufsize=1400'   -ac 2 -b:a 128k -ar 44100     -acodec aac -strict experimental   $V1  x.mp4;    qt-faststart x.mp4 v1.mp4;

The first output seems fine for me in html5 and flash plugin "modes" (in chrome browser).
The second output gets rather weird in both html5 and flash around the time of the 5.1 => stereo change.
(I'll leave this up for a bit in case it's helpful   http://archive.org/~tracey/_/t/flash-v-html5.htm  )


> 
>> For completion / archiving / in hopes of helping someone 
>> else down the line, as of now I am going with:
>>   -vsync 1
> 
> I would be extremely glad if you could share a sample that needs 
> vsync 1, I don't think we have one (or at least I don't know 
> of one).

bleah, I've spent about 3 hours combing through my own set of programs and notes about issues and at least now,
for just about every sample I've tried, either [nothing] or "-vsync 1" seem to output acceptable A/V sync
(whereas I've got tons of samples with issues with either "-vsync 0" or "-async 88200").
So maybe lots of my previous attempts to combat A/V sync (before "-vsync 1") made de-sync
*or* in the meantime (ie: over last 18 months) ffmpeg code has improved A/V sync issues?

On the other hand, this is great that I'm not finding anything so far of past TV with issues that
are still having issues (we, of course, have some stuff that is so garbage-y from a tuner or satellite going bad
for a spell -- but every tool won't be happy with those).

Sorry that I can't find a show/sample (at least as of now) that seems to *need* "-vsync 1" instead of [nothing].
If I find a show/sample in the future that does, I'll try to make sure I get back to the community and get a sample up.

best,
--Tracey



More information about the ffmpeg-user mailing list