VideoHelp Forum




+ Reply to Thread
Results 1 to 4 of 4
  1. Member
    Join Date
    Mar 2011
    Location
    Paris, France
    Search PM
    Hello

    I googled before asking but am still not sure how to doctor a video where the audio is slighty late and must be advanced by 0.2s:
    Code:
        Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 640x426 [SAR 213:176 DAR 20:11], 759 kb/s, 20 fps, 20 tbr, 10240 tbn, 40 tbc (default)
    
        Stream #0:1(eng): Audio: aac (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 128 kb/s (default)
    Is the following command the right solution?

    Code:
    ffmpeg -i input.mp4 -itsoffset 0.2 -i input.mp4 -map 0:0 -map 1:1 -vcodec libx264 -r 20 -b:v 300k -acodec copy -f mp4 output.mp4
    Ideally, I'd like to avoid introducing yet more loss by re-encoding.

    Thank you.

    ---
    Found it:

    Code:
    ffmpeg -i input.mp4 -itsoffset 0.2 -i input.mp4 -map 0:0 -map 1:1 -c copy -f mp4 output.m4
    Last edited by yetanotherlogin; 8th Dec 2015 at 04:11.
    Quote Quote  
  2. I'm a MEGA Super Moderator Baldrick's Avatar
    Join Date
    Aug 2000
    Location
    Sweden
    Search Comp PM
    Thanks for posting the solution...
    Quote Quote  
  3. https://www.ffmpeg.org/ffmpeg-filters.html#setpts_002c-asetpts

    seem to be more appropriate

    Apply an offset of 10 seconds to the input PTS:

    setpts=PTS+10/TB
    so asetpts=PTS+0.2/TB should work (less complex ffmpeg syntax)
    Quote Quote  
  4. Member
    Join Date
    Mar 2011
    Location
    Paris, France
    Search PM
    I guess setpts is a more recent option.
    Quote Quote  



Similar Threads

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