Opened 11 years ago
Closed 11 years ago
#2836 closed defect (fixed)
Lost video frames when decoding h264 stream
Reported by: | Marcin | Owned by: | |
---|---|---|---|
Priority: | important | Component: | avcodec |
Version: | git-master | Keywords: | h264 mpegts regression |
Cc: | Blocked By: | ||
Blocking: | Reproduced by developer: | yes | |
Analyzed by developer: | no |
Description
Summary of the bug:
I'm trying to transcode h264 stream (DVB-T). It happens that properties of the input stream changes on the fly. Decoder automatically reinitializes context "[h264 @ 0xa29fae0] Reinit context to 720x576, pix_fmt: 0", but avcodec_decode_video2 starts loosing frames. First it looses significant number (around 40) of frames and than repeatedly returns one frame and skips three frames.
Problem is related to the avcodec it can be observed in ffmpeg, ffplay and custom applications.
Full report from ffmpeg and two examples of input (stream copy) are in the attachments.
How to reproduce:
% ffmpeg -i video_decoder-lost_frames_in_dvbt-example2.ts -acodec mp3 -vcodec mpeg4 -b 15000000 out2.mp4 Verified versions: 2.0, master, 1.2 Built on Ubuntu 12.04
Attachments (2)
Change History (10)
by , 11 years ago
Attachment: | ffmpeg-20130805-151434.log added |
---|
comment:1 by , 11 years ago
Media files uploaded to ftp server:
video_decoder-lost_frames_in_dvbt-example1.ts
video_decoder-lost_frames_in_dvbt-example2.ts
comment:2 by , 11 years ago
Keywords: | mpegts regression added; lost frame removed |
---|
How did you record the samples?
(Could you confirm that recording with cat /dev/dvb/adapter0/dvr0 >recording.ts
allows to reproduce the problem?)
comment:3 by , 11 years ago
The dvb-t stream is broadcasted (by AVerCaster Pro RS3421) in the local network. There is no transcoding before broadcasting.
The samples are recorded as a stream dump with simple command:
ffmpeg -i udp://xxx.xxx.xxx.xxx:1234 -acodec copy -vcodec copy outfile.ts
comment:4 by , 11 years ago
Isn't there a command to save the udp stream into a file (without using FFmpeg)?
Do you have the possibility to save the stream instead of broadcasting it via udp?
comment:5 by , 11 years ago
We tried to save/dump the stream with mplayer:
mplayer -dumpstream -dumpfile ...
but the result is the same as in ffmpeg case.
We have some dvb-t cards, so we'll try to record the stream directly from the cards.
comment:6 by , 11 years ago
ffplay 0.8.14 plays video_decoder-lost_frames_in_dvbt-example1.ts better than master.
someone should bisect to find out which revission introduced the problems
comment:7 by , 11 years ago
Priority: | normal → important |
---|---|
Reproduced by developer: | set |
Status: | new → open |
Regression since a64b028.
comment:8 by , 11 years ago
Resolution: | → fixed |
---|---|
Status: | open → closed |
Report from ffmpeg