[FFmpeg-trac] #4554(undetermined:new): wrong seek with -ss
FFmpeg
trac at avcodec.org
Wed May 13 12:46:31 CEST 2015
#4554: wrong seek with -ss
-------------------------------------+-------------------------------------
Reporter: | Type: defect
josephine.dussourd | Priority: normal
Status: new | Version:
Component: | unspecified
undetermined | Blocked By:
Keywords: | Reproduced by developer: 0
Blocking: |
Analyzed by developer: 0 |
-------------------------------------+-------------------------------------
I’m trying to extract a particular frame from my video but I don’t get the
frame I expect:
The video encoded in h.264, and have 25 fps. The timecode is burn in my
video
00:00:00.88 correspond to 14:53:07:12 brunt in my video, but when I seek
the next frame I don’t have the actual next frame :
{{{
ffmpeg -ss 00:00:00.88 -i myVideo.mp4 -frames:v 1 sec088.jpg
gives me the frame with the timecode 14:53:07:12
ffmpeg -ss 00:00:00.92 -i myVideo.mp4 -frames:v 1 sec092.jpg
gives me the frame with the timecode 14:53:07:15
ffmpeg -ss 00:00:00.96 -i myVideo.mp4 -frames:v 1 sec096.jpg
gives me the frame with the timecode 14:53:07:15
ffmpeg -ss 00:00:01 -i myVideo.mp4 -frames:v 1 sec100.jpg
gives me the frame with the timecode 14:53:07:15
ffmpeg -ss 00:00:01.04 -i myVideo.mp4 -frames:v 1 sec104.jpg
gives me the frame with the timecode 14:53:07:16
}}}
I decided to extract the images from the video with this command line:
{{{ffmpeg -i myVideo.mp4 c:/images/image%06d.jpg}}}
When I checked the images, the frames with the time code 14:53:07:13 and
14:53:07:14 exist.
ffmpeg -v 9 -loglevel 99 -i myVideo.mp4
{{{
ffmpeg version N-71209-gd759844 Copyright (c) 2000-2015 the FFmpeg
developers
built with gcc 4.9.2 (GCC)
configuration: --enable-gpl --enable-version3 --disable-w32threads
--enable-av
isynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls
--enab
le-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-
libcaca --
enable-libdcadec --enable-libfreetype --enable-libgme --enable-libgsm
--enable-l
ibilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb
--enab
le-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-
librtmp --en
able-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora
--ena
ble-libtwolame --enable-libvidstab --enable-libvo-aacenc --enable-libvo-
amrwbenc
--enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp
--enabl
e-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-lzma
--ena
ble-decklink --enable-zlib
libavutil 54. 22.100 / 54. 22.100
libavcodec 56. 32.100 / 56. 32.100
libavformat 56. 27.100 / 56. 27.100
libavdevice 56. 4.100 / 56. 4.100
libavfilter 5. 13.101 / 5. 13.101
libswscale 3. 1.101 / 3. 1.101
libswresample 1. 1.100 / 1. 1.100
libpostproc 53. 3.100 / 53. 3.100
Splitting the commandline.
Reading option '-v' ... matched as option 'v' (set logging level) with
argument
'9'.
Reading option '-loglevel' ... matched as option 'loglevel' (set logging
level)
with argument '99'.
Reading option '-i' ... matched as input file with argument 'myVideo.mp4'.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option v (set logging level) with argument 9.
Successfully parsed a group of options.
Parsing a group of options: input file myVideo.mp4.
Successfully parsed a group of options.
Opening an input file: myVideo.mp4.
[mov,mp4,m4a,3gp,3g2,mj2 @ 0000000000316440] Format
mov,mp4,m4a,3gp,3g2,mj2 prob
ed with size=2048 and score=100
[mov,mp4,m4a,3gp,3g2,mj2 @ 0000000000316440] ISO: File Type Major Brand:
isom
[mov,mp4,m4a,3gp,3g2,mj2 @ 0000000000316440] Before
avformat_find_stream_info()
pos: 7557884 bytes read:50882 seeks:1
[h264 @ 0000000000327f20] no picture
[mov,mp4,m4a,3gp,3g2,mj2 @ 0000000000316440] All info found
[mov,mp4,m4a,3gp,3g2,mj2 @ 0000000000316440] After
avformat_find_stream_info() p
os: 20381 bytes read:83650 seeks:2 frames:1
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'myVideo.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf56.27.100
Duration: 00:01:00.08, start: 0.000000, bitrate: 1006 kb/s
Stream #0:0(eng), 1, 1/25000: Video: h264 (Main), 4 reference frames
(avc1 /
0x31637661), yuv420p(tv, left), 640x360 (640x368) [SAR 1:1 DAR 16:9],
1/50, 100
3 kb/s, 25 fps, 25 tbr, 25k tbn, 50 tbc (default)
Metadata:
handler_name : VideoHandler
Successfully opened the file.
At least one output file must be specified
[AVIOContext @ 0000000000316cc0] Statistics: 83650 bytes read, 2 seeks
}}}
--
Ticket URL: <https://trac.ffmpeg.org/ticket/4554>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list