Gentoo Archives: gentoo-user

From: Ashley Dixon <ash@××××××××××.uk>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] FFmpeg and AVI1'd M-JPEGs
Date: Tue, 21 Jul 2020 00:24:33
Message-Id: 20200721002320.fc5kwu5qwndldsiv@ad-gentoo-main
In Reply to: Re: [gentoo-user] FFmpeg and AVI1'd M-JPEGs by Neil Bothwick
1 On Mon, Jul 20, 2020 at 10:22:49PM +0100, Neil Bothwick wrote:
2 > On Mon, 20 Jul 2020 19:10:17 +0100, Ashley Dixon wrote:
3 >
4 > > Unfortunately, as per [3], Logitech C-series cameras (among others)
5 > > utilise a proprietary extension to the Motion-JPEG format, in which
6 > > H.264 data is attached to the various JPEG key and delta frames in the
7 > > APP0 field [4], as shown when inspecting the data of any frame
8 > > ("AVI1" [5]):
9 > >
10 > > $ ffmpeg -i video.mp4 -vcodec copy %02d.jpg
11 >
12 > What command are you using to record this file in the first place?
13
14 `ffmpeg -f v4l2 -r 30 -s hd720 -c:v mjpeg -i /dev/video0 -c:v h264 output.mp4`
15
16 When recording, ffmpeg litters stderr with the error: "unable to decode APP
17 fields: Invalid data found when processing input". This is from the mjpeg
18 module.
19
20 VLC (and mpv, among others) will play the resulting video without any
21 complaints, due to the `-c:v h264` option invoking the x264 encoder, although it
22 is played at about 4x its original speed for some reason. The integrated Firefox
23 player now refuses to play the file entirely: "Video can't be played because the
24 file is corrupt.".
25
26 --
27
28 Ashley Dixon
29 suugaku.co.uk
30
31 2A9A 4117
32 DA96 D18A
33 8A7B B0D2
34 A30E BF25
35 F290 A8AA

Attachments

File name MIME type
signature.asc application/pgp-signature