[FFmpeg-user] -ss as input does not seem to seek accurately on recent build

Massimo Battistel battistel at gmail.com
Sun Jan 5 22:45:08 CET 2014


Hello,
from ffmpeg changelog:

- when transcoding with ffmpeg (i.e. not streamcopying), -ss is now accurate
  even when used as an input option. Previous behavior can be restored with
  the -noaccurate_seek option.

You can download the sample from here:
http://www.datafilehost.com/d/7088d408

The following command line produces a video where the first 4-5 frames are
freezed (both in ffplay and vlc), while moving "-ss 1" after input generate
a file that plays fine:

ffmpeg -ss 1 -i "sample.mpg" -vcodec rawvideo -pix_fmt yuv420p -acodec
pcm_s16le -f avi -y dump.avi

ffmpeg version N-59275-g9b195dd Copyright (c) 2000-2013 the FFmpeg
developers
  built on Dec 21 2013 22:03:44 with gcc 4.8.2 (GCC)
  configuration: --disable-static --enable-shared --enable-gpl
--enable-version3 --disable-w32threads --enable-avisynth --enable-bzlib
--enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv
--enable-libass --enable-libbluray --enable-libcaca --enable-libfreetype
--enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame
--enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg
--enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsoxr
--enable-libspeex --enable-libtheora --enable-libtwolame
--enable-libvidstab --enable-libvo-aacenc --enable-libvo-amrwbenc
--enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libx264
--enable-libxavs --enable-libxvid --enable-zlib
  libavutil      52. 58.101 / 52. 58.101
  libavcodec     55. 45.103 / 55. 45.103
  libavformat    55. 22.100 / 55. 22.100
  libavdevice    55.  5.102 / 55.  5.102
  libavfilter     4.  0.100 /  4.  0.100
  libswscale      2.  5.101 /  2.  5.101
  libswresample   0. 17.104 /  0. 17.104
  libpostproc    52.  3.100 / 52.  3.100
Input #0, mpeg, from 'sample.mpg':
  Duration: 00:00:06.12, start: 0.220000, bitrate: 6682 kb/s
    Stream #0:0[0x1e0]: Video: mpeg2video (Main), yuv420p(tv), 720x576 [SAR
16:15 DAR 4:3], max. 15000 kb/s, 25 fps, 25 tbr, 90k tbn, 50 tbc
    Stream #0:1[0x1c0]: Audio: mp2, 48000 Hz, stereo, s16p, 224 kb/s
Output #0, avi, to 'dump.avi':
  Metadata:
    ISFT            : Lavf55.22.100
    Stream #0:0: Video: rawvideo (I420 / 0x30323449), yuv420p, 720x576 [SAR
16:15 DAR 4:3], q=2-31, 200 kb/s, 25 tbn, 25 tbc
    Stream #0:1: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 48000 Hz,
stereo, s16, 1536 kb/s
Stream mapping:
  Stream #0:0 -> #0:0 (mpeg2video -> rawvideo)
  Stream #0:1 -> #0:1 (mp2 -> pcm_s16le)
Press [q] to stop, [?] for help
[mp2 @ 003ebde0] Header missing
Error while decoding stream #0:1: Invalid data found when processing input
frame=   51 fps=0.0 q=0.0 size=   28997kB time=00:00:02.48
bitrate=95783.5kbits/s
frame=   95 fps=0.0 q=0.0 size=   55444kB time=00:00:04.24
bitrate=107122.7kbits/s
[mpeg2video @ 00b60060] ac-tex damaged at 29 2
[mpeg2video @ 00b60060] Warning MVs not available
[mpeg2video @ 00b60060] concealing 1530 DC, 1530 AC, 1530 MV errors in B
frame
[mp2 @ 003ebde0] incomplete frame
Error while decoding stream #0:1: Invalid data found when processing input
frame=  118 fps= 69 q=0.0 Lsize=   72581kB time=00:00:05.16
bitrate=115230.0kbits/s

video:71685kB audio:879kB subtitle:0 global headers:0kB muxing overhead
0.023934%


Thanks a lot,
MB


More information about the ffmpeg-user mailing list