VideoHelp Forum
+ Reply to Thread
Results 1 to 7 of 7
Thread
  1. Hello there,

    I made a .3gp video with my phone and the audio ends earlier than the video. During the time when there is audio though, it's out of sync in such a way that the audio is faster than the video and ends sooner.

    video +++++++++++++++++++ 1144 seconds
    audio +++++++++++++++ 1092 s
    => 52 seconds difference

    I'm not into audio/video processing so I'm asking your help!
    How can I expand the audio to the original length? Maybe periodically inserting gaps?

    I'm on Linux so i would prefer using ffmpeg commands or Avidemux or similar tools.
    Quote Quote  
  2. Member Budman1's Avatar
    Join Date: Jul 2012
    Location: NORTHWEST ILLINOIS, USA
    Search Comp PM
    Did a quick check and using your example, the speed of your audio needs to be 0.95454 (1092/1144) current speed (I am assuming the speed is actually playing too fast and SOUNDS fast). You can use ffmpeg:

    ffmpeg -i input.3gp -filter:a atempo=0.95454 -vcodec copy output.3gp

    Bear in mind, if your video is variable frame rate there may still be a difference in length and sync issue, although not as bad as the current one of almost a minute.

    There may be other methods with programs such as Virtualdub but this works fairly well
    Quote Quote  
  3. Thank you very much!

    It gave me an error when applying it to the .3gp file - something about the only available sample rate as 8000Hz but I extracted the audio as .ogg with Avidemux, applied the command on that one and then replaced the original audio track with the corrected one. It has some glitches but it's ok. (~1 minute out of 20 is quite alot after all - camera app of my phone went crazy after installing an unofficial ROM)

    Thanks again!
    Quote Quote  
  4. Member Budman1's Avatar
    Join Date: Jul 2012
    Location: NORTHWEST ILLINOIS, USA
    Search Comp PM
    It is possible if the audio codec is like AAC. Since no codec was assigned it will use default for 3GP. Try:

    ffmpeg -i input.3gp -filter:a atempo=0.95454 -vcodec copy -acodec libvo_aacenc output.3gp

    This will use AAC codec or you can substitute whatever you are using from original but I can only guess because there is no MediaInfo information on the original audio. I had the exact same error because my 3gp had AVC video codec AND AAC audio codec and worked after I changed as above. Guess I should have added that for you in my original post... my error.
    Quote Quote  
  5. I tried the new command but I don't have the libvo_aacenc or at least this is what the error says. I'm on ArchLinux (so pretty much I get the latest or close to latest packages) with ffmpeg 2.1.1.

    I searched the web but I couldn't find a solution. But you don't need to bother with this unless you really want to.

    $ ffmpeg -codecs | grep aac
    DEA.L. aac AAC (Advanced Audio Coding)
    D.A.L. aac_latm AAC LATM (Advanced Audio Coding LATM syntax)

    If I replace libvo_aacenc in your command with aac I get this error:
    The encoder 'aac' is experimental but experimental codecs are not enabled, add '-strict -2' if you want to use it.

    And if I add -strict -2, oddly enough I get the exact same error suggesting to add '-strict -2'.
    Last edited by misomosi; 11th Jan 2014 at 06:26.
    Quote Quote  
  6. Member Budman1's Avatar
    Join Date: Jul 2012
    Location: NORTHWEST ILLINOIS, USA
    Search Comp PM
    Since I do not have ArchLinux there may be some differences but I downloaded the latest FFMpeg from this site (Zeranoes) and it worked in both cases.
    Name:  ScreenHunter_51 Jan. 11 08.26.jpg
Views: 138
Size:  11.5 KB
    Name:  ScreenHunter_51 Jan. 11 08.28.jpg
Views: 112
Size:  13.9 KB

    Any chance the line you entered was incorrect? BTW you should be able to use any codec that is valid for 3GP (MP4). The level shown in the screen shots is the level I downloaded from videohelp and is shown in the images
    Quote Quote  
  7. I certainly typed it correctly.
    You know, just leave it as it is - it may have something to do with the Windows vs Linux ffmpegs load their libraries or whatever... The idea is that I synced my audio (with that longer process but it's fixed)

    So thx again and sorry for bothering
    Quote Quote  



Similar Threads