[FFmpeg-user] proper use of -itsoffset for audio?

Robert McIntyre rlm at mit.edu
Sat Feb 18 13:07:42 CET 2012


When I try :

ffmpeg -itsoffset 26 -i main.wav -r 60 -i final/%07d.png out.ogg

ffmpeg version N-37992-gad8173e Copyright (c) 2000-2012 the FFmpeg developers
  built on Feb 18 2012 13:00:43 with gcc 4.5.2
  configuration: --prefix=/usr --mandir=/usr/man --enable-x11grab
--enable-gpl --en
able-shared --disable-static --enable-gray --enable-libtheora
--enable-libvorbis --
enable-libxvid --enable-libx264 --enable-gnutls --enable-bzlib
--enable-libmp3lame
--enable-pic --disable-stripping
  libavutil      51. 39.100 / 51. 39.100
  libavcodec     54.  3.100 / 54.  3.100
  libavformat    54.  1.100 / 54.  1.100
  libavdevice    53.  4.100 / 53.  4.100
  libavfilter     2. 62.101 /  2. 62.101
  libswscale      2.  1.100 /  2.  1.100
  libswresample   0.  6.100 /  0.  6.100
  libpostproc    52.  0.100 / 52.  0.100
[wav @ 0x1060de0] max_analyze_duration 5000000 reached at 5015510
Input #0, wav, from 'main.wav':
  Duration: 13:31:35.77, bitrate: 0 kb/s
    Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 44100 Hz, 1
channels, s1
6, 705 kb/s
Input #1, image2, from 'final/%07d.png':
  Duration: 00:00:52.75, start: 0.000000, bitrate: N/A
    Stream #1:0: Video: png, pal8, 755x422, 60 fps, 60 tbr, 60 tbn, 60 tbc
Incompatible pixel format 'pal8' for codec 'libtheora', auto-selecting
format 'yuv4
20p'
[buffer @ 0x10774c0] w:755 h:422 pixfmt:pal8 tb:1/1000000 sar:0/1 sws_param:
[buffersink @ 0x10c9c20] auto-inserting filter 'auto-inserted scale 0'
between the
filter 'src' and the filter 'out'
[scale @ 0x105a680] w:755 h:422 fmt:pal8 -> w:755 h:422 fmt:yuv420p flags:0x4
Output #0, ogg, to 'out.ogg':
  Metadata:
    encoder         : Lavf54.1.100
    Stream #0:0: Video: theora, yuv420p, 755x422, q=2-31, 200 kb/s, 60
tbn, 60 tbc
    Stream #0:1: Audio: flac, 44100 Hz, 1 channels, s16, 128 kb/s
Stream mapping:
  Stream #1:0 -> #0:0 (png -> libtheora)
  Stream #0:0 -> #0:1 (pcm_s16le -> flac)
Press [q] to stop, [?] for help
frame=   32 fps=  0 q=0.0 size=       3kB time=00:00:00.52 bitrate=
53.6kbits/s
Buffer video input changed from size:755x422 fmt:pal8 to size:755x422
fmt:rgba
[scale @ 0x105a680] w:755 h:422 fmt:rgba -> w:755 h:422 fmt:yuv420p flags:0x2
frame=   63 fps= 62 q=0.0 size=       3kB time=00:00:01.04 bitrate=
26.8kbits/s
frame=   88 fps= 58 q=0.0 size=       3kB time=00:00:01.46 bitrate=
19.1kbits/s
frame=  115 fps= 56 q=0.0 size=       3kB time=00:00:01.81 bitrate=  15.4kbits/s
.
.  <<long sequence of messages similar to these cut>>
.
frame= 3155 fps= 52 q=0.0 size=     484kB time=00:00:28.73 bitrate=
137.9kbits/s
frame= 3165 fps= 52 q=0.0 Lsize=    1358kB time=00:00:28.83 bitrate=
385.8kbits/s

video:1289kB audio:45kB global headers:3kB muxing overhead 1.594023%

I thought that it would cause the sound to occur 26 seconds later than
it would without " -itsoffset 26 ".  Instead, the " -itsoffset 26 "
doesn't seem to do anything, and the sound occurs 26 seconds earlier
than what I wanted.

Am I using "-itsoffset" correctly?

sincerely,
--Robert McIntyre


More information about the ffmpeg-user mailing list