Send Motion-user mailing list submissions to motion-user@lists.sourceforge.net
To subscribe or unsubscribe via the World Wide Web, visit https://lists.sourceforge.net/lists/listinfo/motion-user or, via email, send a message with subject or body 'help' to motion-user-requ...@lists.sourceforge.net You can reach the person managing the list at motion-user-ow...@lists.sourceforge.net When replying, please edit your Subject line so it is more specific than "Re: Contents of Motion-user digest..." Today's Topics: 1. extpipe fails for webcam (Paul) 2. Re: extpipe fails for webcam (Paul) ---------------------------------------------------------------------- Message: 1 Date: Sun, 6 Jun 2021 10:42:10 +0200 From: Paul <p...@gmx.de> To: motion-user@lists.sourceforge.net Subject: [Motion-user] extpipe fails for webcam Message-ID: <8cc3da95-6987-633a-2c13-9e4b0f1a1...@gmx.de> Content-Type: text/plain; charset=utf-8; format=flowed Hi I want to use extpipe ffmpeg command to save the webcam stream as a raw stream. The Camera delivers a MJPEG stream that can be saved without re-encoding by the "c:v copy" command in ffmpeg. This is the command that works to save the raw stream from the camera: ffmpeg -f v4l2 -input_format mjpeg -framerate 30 -video_size 1920x1080 -t 00:00:10 -i /dev/video0 -c:v copy -an test.mp4 The input format is this: Input #0, video4linux2,v4l2, from '/dev/video0': Duration: N/A, start: 137789.283575, bitrate: N/A Stream #0:0: Video: mjpeg, yuvj422p(pc, bt470bg/unknown/unknown), 1920x1080, 30 fps, 30 tbr, 1000k tbn, 1000k tbc However if I use this extpipe command I get errors: extpipe ffmpeg -y -f mjpeg -pix_fmt yuvj422p -video_size %wx%h -framerate %fps -i pipe:0 -c:v copy -an -f mp4 %f.mp4 ... "Option video_size not found." extpipe ffmpeg -y -f rawvideo -pix_fmt yuv420p -video_size %wx%h -framerate %fps -i pipe:0 -c:v copy -an -f mp4 %f.mp4 ... "Input #0, rawvideo, from 'pipe:0': ? Duration: N/A, start: 0.000000, bitrate: 572313 kb/s ??? Stream #0:0: Video: rawvideo (I420 / 0x30323449), yuv420p, 1920x1080, 572313 kb/s, 23 tbr, 23 tbn, 23 tbc [mp4 @ 0xe19d80] Could not find tag for codec rawvideo in stream #0, codec not currently supported in container Could not write header for output file #0 (incorrect codec parameters ?): Invalid argument Stream mapping: ? Stream #0:0 -> #0:0 (copy) ??? Last message repeated 1 times [1:ml1] [ERR] [EVT] event_extpipe_put: Error writing in pipe , state error 1: Broken pipe ^C[1:ml1] [NTC] [EVT] Above message repeats 17 times " What is the correct way to do it? ffmpeg version 4.1.6-1~deb10u1+rpt1 Copyright (c) 2000-2020 the FFmpeg developers ? built with gcc 8 (Raspbian 8.3.0-6+rpi1) motion Version 4.1.1 ------------------------------ Message: 2 Date: Mon, 7 Jun 2021 07:21:36 +0200 From: Paul <p...@gmx.de> To: motion-user@lists.sourceforge.net Subject: Re: [Motion-user] extpipe fails for webcam Message-ID: <01174d8a-8695-1b00-0f93-dd4093484...@gmx.de> Content-Type: text/plain; charset=utf-8; format=flowed I got convinced to update my raspberry motion? version to git version and discard the idea to capture raw frames. I instead use mkv now and discovered there is a? passthrough option available to test. Am 06.06.21 um 10:42 schrieb Paul: > Hi > > I want to use extpipe ffmpeg command to save the webcam stream as a raw > stream. The Camera delivers a MJPEG stream that can be saved without > re-encoding by the "c:v copy" command in ffmpeg. > > This is the command that works to save the raw stream from the camera: > ffmpeg -f v4l2 -input_format mjpeg -framerate 30 -video_size 1920x1080 > -t 00:00:10 -i /dev/video0 -c:v copy -an test.mp4 > > The input format is this: > Input #0, video4linux2,v4l2, from '/dev/video0': > Duration: N/A, start: 137789.283575, bitrate: N/A > Stream #0:0: Video: mjpeg, yuvj422p(pc, bt470bg/unknown/unknown), > 1920x1080, 30 fps, 30 tbr, 1000k tbn, 1000k tbc > > However if I use this extpipe command I get errors: > > extpipe ffmpeg -y -f mjpeg -pix_fmt yuvj422p -video_size %wx%h > -framerate %fps -i pipe:0 -c:v copy -an -f mp4 %f.mp4 > ... > "Option video_size not found." > > extpipe ffmpeg -y -f rawvideo -pix_fmt yuv420p -video_size %wx%h > -framerate %fps -i pipe:0 -c:v copy -an -f mp4 %f.mp4 > ... > "Input #0, rawvideo, from 'pipe:0': > ? Duration: N/A, start: 0.000000, bitrate: 572313 kb/s > ??? Stream #0:0: Video: rawvideo (I420 / 0x30323449), yuv420p, > 1920x1080, 572313 kb/s, 23 tbr, 23 tbn, 23 tbc > [mp4 @ 0xe19d80] Could not find tag for codec rawvideo in stream #0, > codec not currently supported in container > Could not write header for output file #0 (incorrect codec parameters > ?): Invalid argument > Stream mapping: > ? Stream #0:0 -> #0:0 (copy) > ??? Last message repeated 1 times > [1:ml1] [ERR] [EVT] event_extpipe_put: Error writing in pipe , state > error 1: Broken pipe > ^C[1:ml1] [NTC] [EVT] Above message repeats 17 times > " > > What is the correct way to do it? > > ffmpeg version 4.1.6-1~deb10u1+rpt1 Copyright (c) 2000-2020 the FFmpeg > developers > ? built with gcc 8 (Raspbian 8.3.0-6+rpi1) > > motion Version 4.1.1 > > > > > _______________________________________________ > Motion-user mailing list > Motion-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/motion-user > https://motion-project.github.io/ > > Unsubscribe: https://lists.sourceforge.net/lists/options/motion-user ------------------------------ ------------------------------ Subject: Digest Footer _______________________________________________ Motion-user mailing list Motion-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/motion-user ------------------------------ End of Motion-user Digest, Vol 180, Issue 4 *******************************************