Re: [FFmpeg-trac] #1349(FFmpeg:closed): itsoffset doesn't work for second input file (audio)

2012-05-31 Thread FFmpeg
#1349: itsoffset doesn't work for second input file (audio)
+---
 Reporter:  bombo   |Owner:
 Type:  defect  |   Status:  closed
 Priority:  normal  |Component:  FFmpeg
  Version:  git-master  |   Resolution:  invalid
 Keywords:  itsoffset   |   Blocked By:
 Blocking:  |  Reproduced by developer:  0
Analyzed by developer:  0   |
+---

Comment (by mjs973):

 I've looked into this further. My description in comment 2 doesn't match
 the behavior of current git, so either I mis-remembered or something
 changed.

 This command should display file1 content one second earlier than file2
 content:

 ffmpeg -itsoffset -1 -i file1.ts -i file2.ts -vcodec copy -acodec copy
 -map 0:0 -map 1:1 out.ts

 1) What I see is that -itsoffset adds or subtracts from all the timestamps
 (both the video and audio streams) in a file. So this option is only going
 to be useful when remuxing from separate input files.

 2) outfile has expected playback behavior with .ts and .mkv containers.

 3) It does not work with .avi (no timestamps, so not a surprise)

 4) It does not work with .mp4 container (a bug?)

-- 
Ticket URL: https://ffmpeg.org/trac/ffmpeg/ticket/1349#comment:6
FFmpeg http://ffmpeg.org
FFmpeg issue tracker
___
FFmpeg-trac mailing list
FFmpeg-trac@avcodec.org
http://avcodec.org/mailman/listinfo/ffmpeg-trac


Re: [FFmpeg-trac] #1349(FFmpeg:closed): itsoffset doesn't work for second input file (audio)

2012-05-29 Thread FFmpeg
#1349: itsoffset doesn't work for second input file (audio)
+---
 Reporter:  bombo   |Owner:
 Type:  defect  |   Status:  closed
 Priority:  normal  |Component:  FFmpeg
  Version:  git-master  |   Resolution:  invalid
 Keywords:  itsoffset   |   Blocked By:
 Blocking:  |  Reproduced by developer:  0
Analyzed by developer:  0   |
+---

Comment (by mjs973):

 So, are you saying that -10 didn't give the result you wanted?

 There are two experiments you could try:

 1) the .avi container is fairly dumb: it has no timestamps. Have you tried
 using a better container (.mp4 or .mkv) for the output file to see if that
 works any better? I'm not sure  which containers know how to handle XVID
 and mp3.

 2) There could be a bug when two input files are used. The -itsoffset
 feature is typically used on a single input file. Have you tried muxing
 the two streams into a single file without using -itsoffset, then doing
 the time shift by re-muxing that one file with -itsoffset?

-- 
Ticket URL: https://ffmpeg.org/trac/ffmpeg/ticket/1349#comment:5
FFmpeg http://ffmpeg.org
FFmpeg issue tracker
___
FFmpeg-trac mailing list
FFmpeg-trac@avcodec.org
http://avcodec.org/mailman/listinfo/ffmpeg-trac


Re: [FFmpeg-trac] #1349(FFmpeg:closed): itsoffset doesn't work for second input file (audio)

2012-05-25 Thread FFmpeg
#1349: itsoffset doesn't work for second input file (audio)
+---
 Reporter:  bombo   |Owner:
 Type:  defect  |   Status:  closed
 Priority:  normal  |Component:  FFmpeg
  Version:  git-master  |   Resolution:  invalid
 Keywords:  itsoffset   |   Blocked By:
 Blocking:  |  Reproduced by developer:  0
Analyzed by developer:  0   |
+---

Comment (by bombo):

 Replying to [comment:2 mjs973]:
  The -itsoffset option does not work the way you think it does.
 ‘-itsoffset offset (input)’

 Set the input time offset in seconds. [-]hh:mm:ss[.xxx] syntax is also
 supported. The offset is added to the timestamps of the input files.
 Specifying a positive offset means that the corresponding streams are
 delayed by offset seconds.

 (http://ffmpeg.org/ffmpeg.html)
 someone should add *video* there, i thought it would modify *any* 'input
 files'

  Unless something has changed in the code, the behavior is to add (or
 subtract) a constant value to each *video* timestamp. It never modifies
 audio timestamps.
 
  So your command will not work: You must shift the video stream, not try
 to shift the audio stream.
 well ok, so i need to shift the video stream 10s backwards (audio is 10s
 late)
 it works for positive values (forwards):

 Y:\testffmpeg -y -itsoffset 00:00:10 -i video.avi -i audio.mp3 -codec
 copy muxed.avi
 ffmpeg version N-40824-g31dfe20 Copyright (c) 2000-2012 the FFmpeg
 developers built on May 19 2012 00:45:59 with gcc 4.6.3  configuration:
 --enable-gpl --ena
 ble-version3 --disable-w32threads --enable-runtime-cpudetect --enable-
 avisynth --enable-bzlib --enable-frei0r --enable-libass --enable-libcelt
 --enable-libop
 encore-amrnb --enable-libopencore-amrwb --enable
 -libfreetype --enable-libgsm --enable-libmp3lame --enable-libnut --enable-
 libopenjpeg --enable-librtmp --enable-libschroedinger --enable-libspeex
 --enable-li
 btheora --enable-libutvideo --enable-libvo-aacenc --enable-libvo-amrwbenc
 --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxavs
 --enable-libxv
 id --enable-zlib
   libavutil  51. 53.100 / 51. 53.100
   libavcodec 54. 21.101 / 54. 21.101
   libavformat54.  5.100 / 54.  5.100
   libavdevice53.  4.100 / 53.  4.100
   libavfilter 2. 74.101 /  2. 74.101
   libswscale  2.  1.100 /  2.  1.100
   libswresample   0. 12.100 /  0. 12.100
   libpostproc52.  0.100 / 52.  0.100
 Input #0, avi, from 'video.avi':
   Metadata:
 encoder : Lavf54.5.100
   Duration: 00:01:00.00, start: 0.00, bitrate: 1237 kb/s
 Stream #0:0: Video: mpeg4 (Advanced Simple Profile) (XVID /
 0x44495658), yuv420p, 720x416 [SAR 1:1 DAR 45:26], 25 tbr, 25 tbn, 25 tbc
 [mp3 @ 0228f040] max_analyze_duration 500 reached at 5016000
 Input #1, mp3, from 'audio.mp3':
   Metadata:
 encoder : Lavf54.5.100
   Duration: 00:01:00.00, start: 0.00, bitrate: 183 kb/s
 Stream #1:0: Audio: mp3, 48000 Hz, stereo, s16, 192 kb/s
 Output #0, avi, to 'muxed.avi':
   Metadata:
 ISFT: Lavf54.5.100
 Stream #0:0: Video: mpeg4 (XVID / 0x44495658), yuv420p, 720x416 [SAR
 1:1 DAR 45:26], q=2-31, 25 tbn, 25 tbc
 Stream #0:1: Audio: mp3 (U[0][0][0] / 0x0055), 48000 Hz, stereo, 192
 kb/s
 Stream mapping:
   Stream #0:0 - #0:0 (copy)
   Stream #1:0 - #0:1 (copy)
 Press [q] to stop, [?] for help
 frame= 1500 fps=0.0 q=-1.0 Lsize=   10476kB time=00:01:00.00
 bitrate=1430.4kbits/s
 video:9020kB audio:1346kB global headers:0kB muxing overhead 1.063745%

 result: audio starts at 00:00:00, video starts at 00:00:10 (10s later)

 but the problem is actually, the audio is 10s late, so i expect negative
 values to do the trick:

 Y:\testffmpeg -y -itsoffset -00:00:10 -i video.avi -i audio.mp3 -codec
 copy muxed.avi
 ffmpeg version N-40824-g31dfe20 Copyright (c) 2000-2012 the FFmpeg
 developers built on May 19 2012 00:45:59 with gcc 4.6.3
   configuration: --enable-gpl --enable-version3 --disable-w32threads
 --enable-runtime-cpudetect --enable-avisynth --enable-bzlib --enable-
 frei0r --enable-lib
 ass --enable-libcelt --enable-libopencore-amrnb --enable-libopencore-amrwb
 --enable-libfreetype --enable-libgsm --enable-libmp3lame --enable-libnut
 --enable-
 libopenjpeg --enable-librtmp --enable-libschroedinger --enable-libspeex
 --enable-libtheora --enable-libutvideo --enable-libvo-aacenc --enable-
 libvo-amrwbenc
 --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxavs
 --enable-libxvid --enable-zlib
   libavutil  51. 53.100 / 51. 53.100
   libavcodec 54. 21.101 / 54. 21.101
   libavformat54.  5.100 / 54.  5.100
   libavdevice53.  4.100 / 53.  4.100
   libavfilter 2. 74.101 /  2. 74.101
   libswscale  2.