On Mon, Jul 20, 2020 at 10:22:49PM +0100, Neil Bothwick wrote:
> On Mon, 20 Jul 2020 19:10:17 +0100, Ashley Dixon wrote:
> 
> > Unfortunately, as per [3], Logitech C-series cameras (among  others)
> > utilise  a proprietary extension to the Motion-JPEG format, in which
> > H.264 data is attached to the various JPEG key and delta frames in the
> > APP0 field [4],  as  shown  when inspecting the data of any frame
> > ("AVI1" [5]):
> > 
> >         $ ffmpeg -i video.mp4 -vcodec copy %02d.jpg
> 
> What command are you using to record this file in the first place?

`ffmpeg -f v4l2 -r 30 -s hd720 -c:v mjpeg -i /dev/video0 -c:v h264 output.mp4`

When recording, ffmpeg litters stderr with the error: "unable to decode APP
fields: Invalid data found when processing input". This is from the mjpeg
module.

VLC (and mpv, among others) will play the resulting video without any
complaints, due to the `-c:v h264` option invoking the x264 encoder, although it
is played at about 4x its original speed for some reason. The integrated Firefox
player now refuses to play the file entirely: "Video can't be played because the
file is corrupt.".

-- 

Ashley Dixon
suugaku.co.uk

2A9A 4117
DA96 D18A
8A7B B0D2
A30E BF25
F290 A8AA

Attachment: signature.asc
Description: PGP signature

Reply via email to