[FFmpeg-user] FFMPeg reading from Logitech C920 generating H264 source produces empty output file
Carl Eugen Hoyos
cehoyos at ag.or.at
Sun Sep 1 10:17:34 CEST 2013
William C Bonner <wimbonner <at> gmail.com> writes:
> I looked at https://trac.ffmpeg.org/ticket/2882 as
> well as looking at the patch submitted.
>
> I just now manually installed the patch in my local
> copy of the source and rebuilt ffmpeg. Now things
> seem to work with or without the -copyinfk flag.
Thank you for testing!
Does it still work (without -copyinkf !) if you use
AVSTREAM_PARSE_HEADERS instead of AVSTREAM_PARSE_FULL ?
Carl Eugen
diff --git a/libavdevice/v4l2.c b/libavdevice/v4l2.c
index 33668c1..c7cd519 100644
--- a/libavdevice/v4l2.c
+++ b/libavdevice/v4l2.c
@@ -931,6 +931,9 @@ static int v4l2_read_header(AVFormatContext *s1)
if (codec_id == AV_CODEC_ID_RAWVIDEO)
st->codec->codec_tag =
avcodec_pix_fmt_to_codec_tag(st->codec->pix_fmt);
+ else if (codec_id == AV_CODEC_ID_H264) {
+ st->need_parsing = AVSTREAM_PARSE_HEADERS;
+ }
if (desired_format == V4L2_PIX_FMT_YVU420)
st->codec->codec_tag = MKTAG('Y', 'V', '1', '2');
else if (desired_format == V4L2_PIX_FMT_YVU410)
More information about the ffmpeg-user
mailing list