[FFmpeg-trac] #3393(undetermined:new): Interlaced H.264 packets are split causing MP4 STTS
FFmpeg
trac at avcodec.org
Mon Feb 17 17:33:24 CET 2014
#3393: Interlaced H.264 packets are split causing MP4 STTS
-------------------------------------+-------------------------------------
Reporter: wim_arbor | Owner:
Type: defect | Status: new
Priority: normal | Component:
Version: git-master | undetermined
Keywords: | Resolution:
Blocking: | Blocked By:
Analyzed by developer: 0 | Reproduced by developer: 0
-------------------------------------+-------------------------------------
Comment (by wim_arbor):
Note that after this patch to {{{h264_parse()}}} in
{{{libavcodec/h264_parser.c}}}:
{{{
diff --git a/libavcodec/h264_parser.c b/libavcodec/h264_parser.c
index 4432871..564ae14 100644
--- a/libavcodec/h264_parser.c
+++ b/libavcodec/h264_parser.c
@@ -471,6 +471,7 @@ static int h264_parse(AVCodecParserContext *s,
}
}
+ s->flags |= PARSER_FLAG_COMPLETE_FRAMES;
if (s->flags & PARSER_FLAG_COMPLETE_FRAMES) {
next = buf_size;
} else {
}}}
a mp4 is generated which is almost correct;
moov/trak/mdia/mdhd
{{{
timescale = 90000
duration = 253800
duration(ms) = 2820
}}}
moov/trak/mdia/minf/stbl/stsd/stts
{{{
entry_count = 2
entry 0 = sample_count=70, sample_duration=3600
entry 1 = sample_count=1, sample_duration=1800
}}}
So the first 70 samples are marked with the correct duration of 3600,
except the last one has still a wrong duration.
But this change is not a valid patch as it causes problems elsewhere. The
correct way is probably to fix this is {{{h264_find_frame_end()}}} also in
{{{libavcodec/h264_parser.c}}}. But that is way more complex.
--
Ticket URL: <https://trac.ffmpeg.org/ticket/3393#comment:3>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list