[FFmpeg-user] Is this a bug? (2)

Francois Visagie francois.visagie at gmail.com
Sun May 26 10:49:40 CEST 2013


Hi All,

 

When using an audio bitstream filter to change audio beginning timestamp, it
does not take effect when muxing copied streams, only when the audio is also
being re-encoded. Is this a bug?

 

In the 2nd example below ffprobe shows that the 2s clip was lengthened to 4s
by delaying the 2s audio by 2s. Playback confirms that this was done
correctly. In the first example where only muxing was done audio wasn't
delayed.

 

C:\Users\fvisagie\Videos\Home Videos\Testing\MKV>ffmpeg -i DV.avi -codec:v
copy -codec:a copy -af asetpts=PTS+2/TB asetptsmuxed.mkv

ffmpeg version N-53380-g0fb7fef Copyright (c) 2000-2013 the FFmpeg
developers

  built on May 23 2013 14:19:35 with gcc 4.7.3 (GCC)

  configuration: --enable-gpl --enable-version3 --disable-w32threads
--enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r
--enable-gnutls --enab

le-iconv --enable-libass --enable-libbluray --enable-libcaca
--enable-libfreetype --enable-libgsm --enable-libilbc --enable-libmodplug
--enable-libmp3lame --ena

ble-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg
--enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsoxr
--enable-libsp

eex --enable-libtheora --enable-libtwolame --enable-libvo-aacenc
--enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libx264
--enable-libxavs --

enable-libxvid --enable-zlib

  libavutil      52. 33.100 / 52. 33.100

  libavcodec     55. 11.100 / 55. 11.100

  libavformat    55.  7.100 / 55.  7.100

  libavdevice    55.  1.101 / 55.  1.101

  libavfilter     3. 69.101 /  3. 69.101

  libswscale      2.  3.100 /  2.  3.100

  libswresample   0. 17.102 /  0. 17.102

  libpostproc    52.  3.100 / 52.  3.100

[avi @ 039ee920] non-interleaved AVI

Guessed Channel Layout for  Input Stream #0.1 : stereo

Input #0, avi, from 'DV.avi':

  Duration: 00:00:02.00, start: 0.000000, bitrate: 49663 kb/s

    Stream #0:0: Video: lagarith (LAGS / 0x5347414C), yuv420p, 720x576, 25
tbr, 25 tbn, 25 tbc

    Stream #0:1: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 48000 Hz, stereo,
s16, 1536 kb/s

Output #0, matroska, to 'asetptsmuxed.mkv':

  Metadata:

    encoder         : Lavf55.7.100

    Stream #0:0: Video: lagarith (LAGS / 0x5347414C), yuv420p, 720x576,
q=2-31, 1k tbn, 25 tbc

    Stream #0:1: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 48000 Hz, stereo,
1536 kb/s

Stream mapping:

  Stream #0:0 -> #0:0 (copy)

  Stream #0:1 -> #0:1 (copy)

Press [q] to stop, [?] for help

frame=   50 fps=0.0 q=-1.0 Lsize=   12116kB time=00:00:02.00
bitrate=49627.4kbits/s

video:11738kB audio:375kB subtitle:0 global headers:0kB muxing overhead
0.026750%

 

C:\Users\fvisagie\Videos\Home Videos\Testing\MKV>ffprobe asetptsmuxed.mkv

ffprobe version N-53380-g0fb7fef Copyright (c) 2007-2013 the FFmpeg
developers

  built on May 23 2013 14:19:35 with gcc 4.7.3 (GCC)

  configuration: --enable-gpl --enable-version3 --disable-w32threads
--enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r
--enable-gnutls --enab

le-iconv --enable-libass --enable-libbluray --enable-libcaca
--enable-libfreetype --enable-libgsm --enable-libilbc --enable-libmodplug
--enable-libmp3lame --ena

ble-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg
--enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsoxr
--enable-libsp

eex --enable-libtheora --enable-libtwolame --enable-libvo-aacenc
--enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libx264
--enable-libxavs --

enable-libxvid --enable-zlib

  libavutil      52. 33.100 / 52. 33.100

  libavcodec     55. 11.100 / 55. 11.100

  libavformat    55.  7.100 / 55.  7.100

  libavdevice    55.  1.101 / 55.  1.101

  libavfilter     3. 69.101 /  3. 69.101

  libswscale      2.  3.100 /  2.  3.100

  libswresample   0. 17.102 /  0. 17.102

  libpostproc    52.  3.100 / 52.  3.100

Input #0, matroska,webm, from 'asetptsmuxed.mkv':

  Metadata:

    ENCODER         : Lavf55.7.100

  Duration: 00:00:02.00, start: 0.000000, bitrate: 49627 kb/s

    Stream #0:0: Video: lagarith (LAGS / 0x5347414C), yuv420p, 720x576, SAR
1:1 DAR 5:4, 25 fps, 25 tbr, 1k tbn, 1k tbc (default)

    Stream #0:1: Audio: pcm_s16le, 48000 Hz, 2 channels, s16, 1536 kb/s
(default)

 

C:\Users\fvisagie\Videos\Home Videos\Testing\MKV>ffmpeg -i DV.avi -codec:v
copy -af asetpts=PTS+2/TB asetptsencoded.mkv

ffmpeg version N-53380-g0fb7fef Copyright (c) 2000-2013 the FFmpeg
developers

  built on May 23 2013 14:19:35 with gcc 4.7.3 (GCC)

  configuration: --enable-gpl --enable-version3 --disable-w32threads
--enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r
--enable-gnutls --enab

le-iconv --enable-libass --enable-libbluray --enable-libcaca
--enable-libfreetype --enable-libgsm --enable-libilbc --enable-libmodplug
--enable-libmp3lame --ena

ble-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg
--enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsoxr
--enable-libsp

eex --enable-libtheora --enable-libtwolame --enable-libvo-aacenc
--enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libx264
--enable-libxavs --

enable-libxvid --enable-zlib

  libavutil      52. 33.100 / 52. 33.100

  libavcodec     55. 11.100 / 55. 11.100

  libavformat    55.  7.100 / 55.  7.100

  libavdevice    55.  1.101 / 55.  1.101

  libavfilter     3. 69.101 /  3. 69.101

  libswscale      2.  3.100 /  2.  3.100

  libswresample   0. 17.102 /  0. 17.102

  libpostproc    52.  3.100 / 52.  3.100

[avi @ 00267a20] non-interleaved AVI

Guessed Channel Layout for  Input Stream #0.1 : stereo

Input #0, avi, from 'DV.avi':

  Duration: 00:00:02.00, start: 0.000000, bitrate: 49663 kb/s

    Stream #0:0: Video: lagarith (LAGS / 0x5347414C), yuv420p, 720x576, 25
tbr, 25 tbn, 25 tbc

    Stream #0:1: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 48000 Hz, stereo,
s16, 1536 kb/s

Output #0, matroska, to 'asetptsencoded.mkv':

  Metadata:

    encoder         : Lavf55.7.100

    Stream #0:0: Video: lagarith (LAGS / 0x5347414C), yuv420p, 720x576,
q=2-31, 1k tbn, 25 tbc

    Stream #0:1: Audio: vorbis (libvorbis) (oV[0][0] / 0x566F), 48000 Hz,
stereo, fltp

Stream mapping:

  Stream #0:0 -> #0:0 (copy)

  Stream #0:1 -> #0:1 (pcm_s16le -> libvorbis)

Press [q] to stop, [?] for help

frame=   50 fps=0.0 q=-1.0 Lsize=   11770kB time=00:00:03.99
bitrate=24110.8kbits/s

video:11738kB audio:25kB subtitle:0 global headers:4kB muxing overhead
0.027869%

 

C:\Users\fvisagie\Videos\Home Videos\Testing\MKV>ffprobe asetptsencoded.mkv

ffprobe version N-53380-g0fb7fef Copyright (c) 2007-2013 the FFmpeg
developers

  built on May 23 2013 14:19:35 with gcc 4.7.3 (GCC)

  configuration: --enable-gpl --enable-version3 --disable-w32threads
--enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r
--enable-gnutls --enab

le-iconv --enable-libass --enable-libbluray --enable-libcaca
--enable-libfreetype --enable-libgsm --enable-libilbc --enable-libmodplug
--enable-libmp3lame --ena

ble-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg
--enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsoxr
--enable-libsp

eex --enable-libtheora --enable-libtwolame --enable-libvo-aacenc
--enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libx264
--enable-libxavs --

enable-libxvid --enable-zlib

  libavutil      52. 33.100 / 52. 33.100

  libavcodec     55. 11.100 / 55. 11.100

  libavformat    55.  7.100 / 55.  7.100

  libavdevice    55.  1.101 / 55.  1.101

  libavfilter     3. 69.101 /  3. 69.101

  libswscale      2.  3.100 /  2.  3.100

  libswresample   0. 17.102 /  0. 17.102

  libpostproc    52.  3.100 / 52.  3.100

[matroska,webm @ 0259d240] Stream #1: not enough frames to estimate rate;
consider increasing probesize

Input #0, matroska,webm, from 'asetptsencoded.mkv':

  Metadata:

    ENCODER         : Lavf55.7.100

  Duration: 00:00:04.00, start: 0.000000, bitrate: 24104 kb/s

   Stream #0:0: Video: lagarith (LAGS / 0x5347414C), yuv420p, 720x576, SAR
1:1 DAR 5:4, 25 fps, 25 tbr, 1k tbn, 1k tbc (default)

    Stream #0:1: Audio: vorbis, 48000 Hz, stereo, fltp (default)

 

Thanks,

Francois

 

Francois Visagie

 

 

T: +27 (83) 326-4358

F: +27 (86) 511-3490

E: francois.visagie at gmail.com

 

 



More information about the ffmpeg-user mailing list