VideoHelp Forum




Results 1 to 8 of 8
  1. Member
    Join Date
    Oct 2006
    Location
    Germany
    Search Comp PM
    I'm not sure if it's just me... Everytime I try to encode a video with ffmpeg (not mencoder!), it gradually gets out of sync toward the end of the film (or rather in the middle; anyway, the sound faster than the video); the same issue occurs with the ffmpeg binary included in burn (http://burn-osx.sourceforge.net/).

    Edit: I should maybe mention that the synchronisation is not lost on my Linux PC; so it might be an (Intel?) Mac specific problem.

    I managed to write a wrapper script for ffmpeg which adds the option
    Code:
    -async 2
    to enable audio synchronisation. It seems that this works. Would it be a good idea to include such a sync option in ffmpegx anyway?

    (Or is it really just me, or can't I google well!? Apologies, just in case...)

    Cheers,
    Theorik

  2. Explorer Case's Avatar
    Join Date
    Feb 2004
    Location
    Middle Earth
    Search Comp PM
    Is the loss on sync that you experienced the same on various players? E.g. QuickTime, MPlayer, VLC, hardware players.

    And just out of curiosity, what does this "-async 2" do on a lower level, i.e. what is done to secure sync? Does it have any side-effects on playback compatibility?

  3. Member
    Join Date
    Feb 2005
    Location
    Canada
    Search Comp PM
    Originally Posted by theorik
    I managed to write a wrapper script for ffmpeg which adds the option
    Code:
    -async 2
    to enable audio synchronisation. It seems that this works. Would it be a good idea to include such a sync option in ffmpegx anyway?
    I'd love to see such an option included in ffmpegX. I have no idea what a wrapper script is, and my current method of extracting the audio separately in wav format and treating it as an external source is tedious.

  4. Member
    Join Date
    Oct 2006
    Location
    Germany
    Search Comp PM
    Originally Posted by Case
    Is the loss on sync that you experienced the same on various players? E.g. QuickTime, MPlayer, VLC, hardware players.
    On all these software players, yes. I haven't tried on a hardware player.

    And just out of curiosity, what does this "-async 2" do on a lower level, i.e. what is done to secure sync? Does it have any side-effects on playback compatibility?
    No idea, really. I tried, and it seemed to work in this case. Strangely, it does not work for another file, so it may not be such a good solution as I thought – sorry! (But because I only occasionally encode, and encoding takes time, I'll stick with mencoder or xvid for now.)

    Cheers,
    Theorik

  5. Member
    Join Date
    Feb 2005
    Location
    Canada
    Search Comp PM
    Originally Posted by theorik
    No idea, really. I tried, and it seemed to work in this case. Strangely, it does not work for another file, so it may not be such a good solution as I thought – sorry! (But because I only occasionally encode, and encoding takes time, I'll stick with mencoder or xvid for now.)
    Dug this up (here):

    `-async samples_per_second'
    Audio sync method. "Stretches/squeezes" the audio stream to match the timestamps, the parameter is the maximum samples per second by which the audio is changed. -async 1 is a special case where only the start of the audio stream is corrected without any later correction.
    Perhaps changing the samples_per_second parameter to a higher value would help.

    Major, I'd love for this option to be included in ffmpegX (or perhaps a section to add command line switches manually).

  6. Member
    Join Date
    Oct 2006
    Location
    Germany
    Search Comp PM
    Perhaps changing the samples_per_second parameter to a higher value would help.
    Yes, indeed, probably (somehow I misread the instruction completely so that I thought that a smaller number would be better); I also noted the
    Code:
    -map
    parameter (say which stream should by synced with what stream), which ffmpegX already uses, but which is not yet configurable through the GUI (?).

    In the meantime I've found out that my problem (or at least one of them?) seems to be that my DVB-T recordings have some ‘dropped’ video frames (seems to be inevitable because it happens to each and every movie), so that I decided to sync the video stream to the audio stream.

    Cheers,
    Theorik

  7. Member
    Join Date
    Feb 2005
    Location
    Canada
    Search Comp PM
    Originally Posted by theorik
    In the meantime I've found out that my problem (or at least one of them?) seems to be that my DVB-T recordings have some ‘dropped’ video frames (seems to be inevitable because it happens to each and every movie), so that I decided to sync the video stream to the audio stream.
    Are you just using the -vsync command in ffmpeg to do this? Also, if it's not too difficult, can you explain how your wrapper script works?

    Thanks,
    Bucho

  8. Member
    Join Date
    Oct 2006
    Location
    Germany
    Search Comp PM
    Yes, trying again, I found "-map"ping to have strange effects (jumpy video); there's nearly no documentation on vsync, so I only played around. I went back to xvid for a very bad recording. (jumpy with mapping and vsync, with async sounded like an irregularly running tape.)

    The wrapper script seems to be necessary because "-vsync" or "-ascync" are an outfile option; so I go through the options, wait until "-i" (the input file option), and place my "sync" options immediately after it.

    Cheers,
    b




Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!