VideoHelp Forum
+ Reply to Thread
Results 1 to 6 of 6
Thread
  1. I am attempting to convert a live TV recorded FLV which according to MediaInfo has the following:

    Format : Flash Video
    File size : 177 MiB
    Duration : 2h 30mn
    Overall bit rate mode : Variable
    Overall bit rate : 164 Kbps
    _videocodecid : avc1
    _videodatarate : 280.000
    _avclevel : 31.000
    _avcprofile : 66.000
    _audiosamplerate : 11025.000
    _audiochannels : 1.000
    _audioinputvolume : 75.000
    _audiocodecid : .mp3
    _audiodatarate : 20.000
    Frame rate mode : Variable
    Frame rate : 30.000 fps

    Now basically I'm attempting to use Pazera FLV to AVI converter which has worked basically flawlessly for me with similar FLVs from other sites.

    Now what appears to be happening this time is ffmpeg is claiming that audio timestamps are invalid and it is clipping them.

    This seems to result in the end video sounding broken at times like a phone with a bad connection like parts are missing.

    I attempted to use mencoder in command line and it gets the video and audio sounding looking/sounding great but then A/V sync is not maintained.

    Should I attempt to make some changes to ffmpeg or mencoder?
    Image Attached Files
    Last edited by RedPenguin; 6th Sep 2012 at 22:07. Reason: Added Sample
    Quote Quote  
  2. I made some progress.

    It appears that taking off -async 1 removes all the audio artifacts but then totally destroys the A/V sync.

    EDIT: One site claims try -async 44000 which not exactly sure what it does but it appears it may be working from my tests so far.
    Quote Quote  
  3. about async:
    Code:
    ‘-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. This option has been deprecated. Use the asyncts audio filter instead.
    source: http://ffmpeg.org/ffmpeg.html#Advanced-options
    -> since '-async' is deprecated, you should use asyncts
    Code:
    25.17 asyncts
    
     Synchronize audio data with timestamps by squeezing/stretching it and/or dropping samples/adding silence when needed. 
     The filter accepts the following named parameters: 
     ‘compensate’Enable stretching/squeezing the data to make it match the timestamps. 
      ‘min_delta’Minimum difference between timestamps and audio data (in seconds) to trigger adding/dropping samples. 
      ‘max_comp’Maximum compensation in samples per second. 
      ‘first_pts’Assume the first pts should be this value. This allows for padding/trimming at the start of stream. By default, no assumption is made about the first frame’s expected pts, so no padding or trimming is done. For example, this could be set to 0 to pad the beginning with silence if an audio stream starts after the video stream.
    source: http://ffmpeg.org/ffmpeg.html#asyncts
    -> try:
    Code:
    -af asyncts=compensate=1
    Quote Quote  
  4. Thank You.

    I found all that info but I just can't seem to wrap my head around what it exactly means.
    Quote Quote  
  5. These two options are ment to assure audio synchronism by stretching/squeezing the audio stream to match the timestamps embedded in the video, I'm not sure what's unclear so giving a helping hint isn't really easy.
    here's how I understand the two options:
    'async' allowed to specify how many samples/parts of the audio are allowed to be changed to reach synchronism.
    'asyncts' adds some additional features to this. Setting 'max_comp' with the value from 'async' should do the same as async.
    Setting 'first_pts' does only some padding/trimming to sync audio&video on the first timestamp.
    Setting 'compensate' basically allows ffmpeg to change as many samples as needed to sync the audio with the video timestamps, so it's basically an automated 'max_comp'.
    Quote Quote  
  6. Originally Posted by Selur View Post
    These two options are ment to assure audio synchronism by stretching/squeezing the audio stream to match the timestamps embedded in the video, I'm not sure what's unclear so giving a helping hint isn't really easy.
    here's how I understand the two options:
    'async' allowed to specify how many samples/parts of the audio are allowed to be changed to reach synchronism.
    'asyncts' adds some additional features to this. Setting 'max_comp' with the value from 'async' should do the same as async.
    Setting 'first_pts' does only some padding/trimming to sync audio&video on the first timestamp.
    Setting 'compensate' basically allows ffmpeg to change as many samples as needed to sync the audio with the video timestamps, so it's basically an automated 'max_comp'.
    Thank You.

    That definitely clears up a lot.
    Quote Quote  



Similar Threads

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