Opened 13 years ago
Closed 13 years ago
#389 closed defect (fixed)
Problem seeking in MPEG TS/H.264 files
Reported by: | Takis Issaris | Owned by: | |
---|---|---|---|
Priority: | normal | Component: | avformat |
Version: | git | Keywords: | |
Cc: | Blocked By: | ||
Blocking: | Reproduced by developer: | no | |
Analyzed by developer: | no |
Description
When seeking to a specific time in a MPEG-TS file, seeking silently fails.
Thus, av_seek_frame( format_context, videostream, pts, AVSEEK_FLAG_ANY ); results in a seek to the first timestamp in the file (126000), and av_seek_frame returns 0 indicating that the seek succeeded.
The sample was generated with FFmpeg+libx264.
ffprobe version N-31788-g0d4ea7b, Copyright (c) 2007-2011 the FFmpeg developers
built on Aug 10 2011 15:46:07 with gcc 4.5.2
configuration:
libavutil 51. 11. 1 / 51. 11. 1
libavcodec 53. 10. 0 / 53. 10. 0
libavformat 53. 6. 0 / 53. 6. 0
libavdevice 53. 2. 0 / 53. 2. 0
libavfilter 2. 28. 1 / 2. 28. 1
libswscale 2. 0. 0 / 2. 0. 0
Continuity Check Failed
Continuity Check Failed
Continuity Check Failed
Continuity Check Failed
Input #0, mpegts, from '/srv/files/videos/seekbug01min.ts':
Duration: 00:00:00.45, start: 1.400000, bitrate: 178 kb/s
Program 1
Metadata:
service_name : Big Buck Bunny
service_provider: FFmpeg
Stream #0.0[0x100]: Video: h264 (Constrained Baseline), yuv420p, 320x180 [SAR 1:1 DAR 16:9], 24 fps, 24 tbr, 90k tbn, 48 tbc
Stream #0.1[0x101](und): Audio: mp2, 48000 Hz, stereo, s16, 64 kb/s
PS: The bugreport page indicates that one should upload samples to the incoming dir on the ffmpeg ftp server, but there is no incoming dir.
Attachments (2)
Change History (6)
by , 13 years ago
Attachment: | seekbug01min.ts added |
---|
comment:1 by , 13 years ago
The file was encoded using the "fastdecode" and "ultrafast" x264 settings, thus
no B-frames are used.
comment:2 by , 13 years ago
Could you test if this issue is still reproducible with current git head?
comment:3 by , 13 years ago
I've just tested this, and it appears to work in git head.
Using git bisect I found the commit which appears to have fixed it:
commit 27f7589ab1ad0f6d2694d713e176dfa234662e60
Author: Michael Niedermayer <michaelni@gmx.at>
Date: Fri Oct 21 20:45:00 2011 +0200
seek: Fix av_gen_search() so that seeks outside max/min do not successfully seek to random
points but rather seek to the min/max.
MPEG-TS file containing H.264 and MPEG layer 2 audio