[FFmpeg-user] -istoffset and -vcodec copy

Jonathan Addleman jono at redowl.ca
Mon Nov 28 17:51:49 CET 2011


On 11-11-28 10:56 AM, Jonathan Addleman wrote:
> On 11-11-28 05:16 AM, Carl Eugen Hoyos wrote:
>>  Jonathan Addleman<jono<at>   redowl.ca>   writes:
>>
>>>   >>    With the 'veryslow' preset, the results are abysmal - nasty artifacts
>>>   >>    everywhere. Utterly unusable.
>>>   >
>>>   >   You have to either define a low constant quantiser or a target bitrate.
>>>
>>>   Even with -qscale 1, it looked awful. (I assume that's what you mean?)
>>
>>  (Command line and complete, uncut output missing.)
>>  -qscale 2 works fine with -vcodec mpeg2video and -vcodec mpeg4, I suspect you
>>  have to use a x264 option for -vcodec libx264.
>
> Ah, I didn't realize these options didn't apply to the libx264 codec.
> It's awfully complicated! I'm going to do some more reading, and try to
> get the newer version of ffmpeg compiled to see if -vcodec copy works there.

No luck with a freshly compiled version. This command line:

ffmpeg -i F1jv6V5aYGk.mp4 -itsoffset 0.5 -i F1jv6V5aYGk.mp4 -map 0:0 
-map 1:1 -vcodec copy -acodec copy fixed.mp4

resulted in the same out-of-sync audio as the original. I expect that 
simply copying the raw encoded video results in the itsoffset flag being 
ignored.


Here's the console output:

ffmpeg version 0.8.7, Copyright (c) 2000-2011 the FFmpeg developers
   built on Nov 28 2011 11:13:25 with gcc 4.6.1
   configuration: --enable-libx264 --enable-gpl
   libavutil    51.  9. 1 / 51.  9. 1
   libavcodec   53.  8. 0 / 53.  8. 0
   libavformat  53.  5. 0 / 53.  5. 0
   libavdevice  53.  1. 1 / 53.  1. 1
   libavfilter   2. 23. 0 /  2. 23. 0
   libswscale    2.  0. 0 /  2.  0. 0
   libpostproc  51.  2. 0 / 51.  2. 0
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'F1jv6V5aYGk.mp4':
   Metadata:
     major_brand     : mp42
     minor_version   : 0
     compatible_brands: isommp42
     creation_time   : 2011-08-19 22:04:25
   Duration: 00:03:15.06, start: 0.000000, bitrate: 6116 kb/s
     Stream #0.0(und): Video: h264 (High), yuv420p, 1920x1080, 5958 
kb/s, 29.97 fps, 29.97 tbr, 1k tbn, 59.94 tbc
     Metadata:
       creation_time   : 1970-01-01 00:00:00
     Stream #0.1(und): Audio: aac, 44100 Hz, stereo, s16, 151 kb/s
     Metadata:
       creation_time   : 2011-08-19 22:04:25
short.mp4: No such file or directory
scaph:~/bla$ ~/Downloads/ffmpeg-0.8.7/ffmpeg -i F1jv6V5aYGk.mp4 
-itsoffset 0.5 -i F1jv6V5aYGk.mp4 -map 0:0 -map 1:1 -vcodec copy -acodec 
copy fixed.mp4
ffmpeg version 0.8.7, Copyright (c) 2000-2011 the FFmpeg developers
   built on Nov 28 2011 11:13:25 with gcc 4.6.1
   configuration: --enable-libx264 --enable-gpl
   libavutil    51.  9. 1 / 51.  9. 1
   libavcodec   53.  8. 0 / 53.  8. 0
   libavformat  53.  5. 0 / 53.  5. 0
   libavdevice  53.  1. 1 / 53.  1. 1
   libavfilter   2. 23. 0 /  2. 23. 0
   libswscale    2.  0. 0 /  2.  0. 0
   libpostproc  51.  2. 0 / 51.  2. 0
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'F1jv6V5aYGk.mp4':
   Metadata:
     major_brand     : mp42
     minor_version   : 0
     compatible_brands: isommp42
     creation_time   : 2011-08-19 22:04:25
   Duration: 00:03:15.06, start: 0.000000, bitrate: 6116 kb/s
     Stream #0.0(und): Video: h264 (High), yuv420p, 1920x1080, 5958 
kb/s, 29.97 fps, 29.97 tbr, 1k tbn, 59.94 tbc
     Metadata:
       creation_time   : 1970-01-01 00:00:00
     Stream #0.1(und): Audio: aac, 44100 Hz, stereo, s16, 151 kb/s
     Metadata:
       creation_time   : 2011-08-19 22:04:25
Input #1, mov,mp4,m4a,3gp,3g2,mj2, from 'F1jv6V5aYGk.mp4':
   Metadata:
     major_brand     : mp42
     minor_version   : 0
     compatible_brands: isommp42
     creation_time   : 2011-08-19 22:04:25
   Duration: 00:03:15.06, start: 0.000000, bitrate: 6116 kb/s
     Stream #1.0(und): Video: h264 (High), yuv420p, 1920x1080, 5958 
kb/s, 29.97 fps, 29.97 tbr, 1k tbn, 59.94 tbc
     Metadata:
       creation_time   : 1970-01-01 00:00:00
     Stream #1.1(und): Audio: aac, 44100 Hz, stereo, s16, 151 kb/s
     Metadata:
       creation_time   : 2011-08-19 22:04:25
Output #0, mp4, to 'fixed.mp4':
   Metadata:
     major_brand     : mp42
     minor_version   : 0
     compatible_brands: isommp42
     creation_time   : 2011-08-19 22:04:25
     encoder         : Lavf53.5.0
     Stream #0.0(und): Video: libx264, yuv420p, 1920x1080, q=2-31, 5958 
kb/s, 30k tbn, 29.97 tbc
     Metadata:
       creation_time   : 1970-01-01 00:00:00
     Stream #0.1(und): Audio: aac, 44100 Hz, stereo, 151 kb/s
     Metadata:
       creation_time   : 2011-08-19 22:04:25
Stream mapping:
   Stream #0.0 -> #0.0
   Stream #1.1 -> #0.1
Press [q] to stop, [?] for help
frame= 5846 fps=991 q=-1.0 Lsize=  145698kB time=00:03:15.06 
bitrate=6118.9kbits/s
video:141890kB audio:3611kB global headers:0kB muxing overhead 0.135492%

-- 
Jonathan Addleman - http://www.redowl.ca


More information about the ffmpeg-user mailing list