<div dir="auto"><div><br><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">ср, 8 февр. 2023 г., 14:47 Terje J. Hanssen <<a href="mailto:terjejhanssen@gmail.com">terjejhanssen@gmail.com</a>>:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div>
    <br>
    <br>
    <div>Den 08.02.2023 02:38, skrev Andrew
      Randrianasulu:<br>
    </div>
    <blockquote type="cite">
      
      <div dir="auto">
        <div><br>
          <br>
          <div class="gmail_quote">
            <div dir="ltr" class="gmail_attr">ср, 8 февр. 2023 г., 04:08
              Terje J. Hanssen <<a href="mailto:terjejhanssen@gmail.com" target="_blank" rel="noreferrer">terjejhanssen@gmail.com</a>>:<br>
            </div>
            <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
              <div> <br>
                <br>
                <div>Den 08.02.2023 00:52, skrev Andrew Randrianasulu:<br>
                </div>
                <blockquote type="cite">
                  <div dir="auto">
                    <div><br>
                      <br>
                      <div class="gmail_quote">
                        <div dir="ltr" class="gmail_attr">ср, 8 февр.
                          2023 г., 01:35 Terje J. Hanssen via Cin <<a href="mailto:cin@lists.cinelerra-gg.org" rel="noreferrer noreferrer" target="_blank">cin@lists.cinelerra-gg.org</a>>:<br>
                        </div>
                        <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
                          <div> <br>
                            <br>
                            <div>Den 02.02.2023 01:46, skrev Terje J.
                              Hanssen:<br>
                            </div>
                            <blockquote type="cite"> <font face="Courier New, Courier, monospace"><font face="Courier New, Courier, monospace">.......</font></font><font face="Courier New, Courier, monospace"><br>
                              </font></blockquote>
                            <br>
                            <blockquote type="cite"><font face="Courier
                                New, Courier, monospace"> but I prepare
                                myself to test and use one method left
                                with regards to "Personal Video
                                Archiving".<br>
                                <br>
                                Therefore I have ordered two selected,
                                inexpensive devices (the urls here are
                                just for English language):<br>
                                <br>
                                1) Capture Card USB HDMI 4K to 1080P
                                USB-C adapter (Speedy USB 3.2/3.1/3.0, </font><font face="Courier New, Courier, monospace"><font face="Courier New, Courier, monospace">60
                                  Hz and 1080p FHD.</font>)<br>
                                <a href="https://www.turascandinavia.com/en/products/computer/microphone-webcam/webcams/74257" rel="noreferrer noreferrer noreferrer" target="_blank">https://www.turascandinavia.com/en/products/computer/microphone-webcam/webcams/74257</a><br>
                              </font>
                              <ul>
                                <li><font face="Courier New, Courier,
                                    monospace">Fluid video recordings
                                    without delays or distortions during
                                    live streaming</font></li>
                                <li><font face="Courier New, Courier,
                                    monospace">Linux not mentioned, but
                                    assumed this is a standard supported
                                    UVC. OBS and VLC is mentioned.</font></li>
                              </ul>
                            </blockquote>
                            <br>
                            <font face="monospace">Then the first item,
                              Hama Video Recording Stick, HDMI 4k -
                              USB3.x is received. It promises: <br>
                              "Fluid video recordings without delays or
                              distortions during live streaming, thanks
                              to a picture frequency of 60 Hz and 1080p
                              with Full HD. Transform high-quality video
                              cameras into a high-resolution USB web
                              camera".<br>
                              <br>
                              I have done a quick, first test using my
                              Sony HDR-FX7E camera. This is a HDV 1080i
                              camcorder with MPEG-2 video compression at
                              25 mbps on tape 1440x1080, 50i25fps, 4:2:0
                              and MP2 stereo audio. Currently it's
                              cassette deck is broken and needs repair
                              service. <br>
                              <br>
                              But according to Steve Mullen's V1 and FX7
                              handbook (not mentioned in the manual):<br>
                            </font>
                            <blockquote><font face="monospace">1. When
                                the camera is operating, the EIP
                                (Enhanced Image Processor) generates
                                uncompressed 1440x1080i with a 4:2:2
                                color space. </font><font face="monospace">Digital 4:2:2 data are
                                output via the HDMI port while 4:2:2
                                analog is output via component-out.
                                Therefore, you can record 4:2:2 live HD
                                video from the camera without MPEG-2
                                compression. V1 and FX7 provide an HDMI
                                output port that carries uncompressed
                                4:2:2, 8-bit, digital video plus
                                dual-channel, PCM, 16-bit, 48kHz audio
                                When the camera is running. </font><br>
                              <br>
                              <font face="monospace">2. If you are
                                playing a 1080i50 or 1080i60 HDV tape.
                                The 4:2:0 MPEG-2 is decoded and chroma
                                up-scaled to a 4:2:2. The HDMI</font><br>
                              <font face="monospace">chip downscales
                                1440 to 1280 while it up-scales 540 to
                                720. The result is 720p50 or 720p60,
                                which is output via HDMI.<br>
                              </font></blockquote>
                            <font face="monospace">That is, I have
                              tested section 1 now, but see now that I
                              didn't test 1440x1080 resolution. The only
                              resolution I got to work at 25 fps was
                              720x576 (SD), while HD 1280x720 and FHD
                              1920x1080 were set down to 10 fps and 5
                              fps respectively by the driver and caused
                              jumpy playback.<br>
                            </font></div>
                        </blockquote>
                      </div>
                    </div>
                    <div dir="auto"><br>
                    </div>
                    <div dir="auto">Did you tried to force specific
                      format (uncompressed) before -i parameter for
                      ffmpeg? </div>
                  </div>
                </blockquote>
                <br>
                Just "-framerate 25 -video_size 1920x1080" before -i as
                repeated in the code as follows, where I tested to
                encode to uncompressed v210 instead of ffv1, but with no
                change with regards to low 5 fps:<br>
                <br>
                ffmpeg -hide_banner -f v4l2 -framerate 25 -video_size
                1920x1080 -i /dev/video0 -codec:v v210 -codec:a
                pcm_s16le -f matroska 1920x1080_v210.mkv<br>
                [video4linux2,v4l2 @ 0x55944900e0c0] The driver changed
                the time per frame from 1/25 to 1/5<br>
                <br>
                I also read a related issue and reply to this post at
                Superuser, where 1920x1080 was not supported on the
                webcam.<br>
                <a href="https://superuser.com/questions/1449252/ffmpeg-captures-from-uvc-dev-video0-in-any-resolution-except-for-1920x1080" rel="noreferrer noreferrer" target="_blank">https://superuser.com/questions/1449252/ffmpeg-captures-from-uvc-dev-video0-in-any-resolution-except-for-1920x1080</a><br>
                <br>
                <blockquote type="cite">
                  <div dir="auto">
                    <div dir="auto">Also look out for usb2 vs usb3
                      ports? Shouldn't capture device hang on bus 002
                      (usb 3.0) root hub, instead of bus 001 (usb 2.0
                      root hub), from lsusb below?</div>
                  </div>
                </blockquote>
                <br>
                This may well work better. I have to admit that I have
                never studied the difference between shared usb buses.
                My thought was to try to change the connected usb
                devices, but tested first the only free usb3 port (blue)
                on the add-on frontpanel of the workstation. The other
                two usb3 ports are on the backpanel and are used for the
                Asus blu-ray burner and 8TB Seagate expansion video
                disc. <br>
                <br>
                The other usb ports on both panels are usb2 ports,
                whereof two for the wireless keyboard and mouse on the
                fronpanel. What I possibly already have mentioned
                before, is that sometimes if I connect a usb(2) device
                or memory to the usb3 port on the frontpanel, this cause
                hang on the keyboard or mouse. But this didn't happend
                this time with the USB3 capture stick.<br>
                <br>
                <blockquote type="cite">
                  <div dir="auto">
                    <div dir="auto"><br>
                    </div>
                    <div dir="auto"><br>
                    </div>
                    <div dir="auto">
                      <div class="gmail_quote">
                        <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
                          <div><font face="monospace"> <br>
                              Someone here that have suggestion to
                              possibly modified syntax or can verify
                              that the driver doesn't manage this?<br>
                              <br>
                              Another (setup) problem, there was no
                              audio recorded or heard during playback!?<br>
                              <br>
                              In the following I list the test command
                              syntax I've collectedf and tried with
                              shortened output (yet long):<br>
                              To explain, I have also another USB 2.0
                              Webcam connected, beside the new HDMI-USB3
                              Videstick.<br>
                              <br>
                              Verify the devices, drivers and formats:<br>
                              ---------------------------------------<br>
                              dmesg | tail<br>
                              [22706.060759] perf: interrupt took too
                              long (2521 > 2500), lowering
                              kernel.perf_event_max_sample_rate to 79250<br>
                              [32105.561575] perf: interrupt took too
                              long (3158 > 3151), lowering
                              kernel.perf_event_max_sample_rate to 63250<br>
                              [40586.477420] usb 1-5: USB disconnect,
                              device number 2<br>
                              [40599.099612] usb 1-5: new high-speed USB
                              device number 5 using xhci_hcd<br>
                              [40599.250960] usb 1-5: New USB device
                              found, idVendor=534d, idProduct=2109,
                              bcdDevice=21.00<br>
                              [40599.250972] usb 1-5: New USB device
                              strings: Mfr=1, Product=2, SerialNumber=0<br>
                              [40599.250978] usb 1-5: Product: USB Video<br>
                              [40599.250984] usb 1-5: Manufacturer:
                              MACROSILICON<br>
                              [40599.252310] usb 1-5: Found UVC 1.00
                              device USB Video (534d:2109)<br>
                              [40599.256234] hid-generic
                              0003:534D:2109.0006: hiddev96,hidraw0: USB
                              HID v1.10 Device [MACROSILICON USB Video]
                              on usb-0000:00:14.0-5/input4<br>
                              -----------------------------<br>
                              <br>
                              lsusb<br>
                              Bus 002 Device 003: ID 05e3:0732 Genesys
                              Logic, Inc. All-in-One Cardreader<br>
                              Bus 002 Device 002: ID 0bc2:2038 Seagate
                              RSS LLC Expansion HDD<br>
                              Bus 002 Device 001: ID 1d6b:0003 Linux
                              Foundation 3.0 root hub<br>
                              Bus 001 Device 003: ID 046d:c534 Logitech,
                              Inc. Unifying Receiver<br>
                              Bus 001 Device 005: ID 534d:2109
                              MacroSilicon USB Video<br>
                              Bus 001 Device 004: ID 0c45:6340 Microdia
                              Camera<br>
                              Bus 001 Device 001: ID 1d6b:0002 Linux
                              Foundation 2.0 root hub<br>
                              <br>
                              <br>
                              udevadm info  /dev/video* | egrep
                              'DEVNAME|ID_V4L_PRODUCT'<br>
                              E: DEVNAME=/dev/video0<br>
                              E: ID_V4L_PRODUCT=USB Video: USB Video<br>
                              E: DEVNAME=/dev/video1<br>
                              E: ID_V4L_PRODUCT=USB Video: USB Video<br>
                              E: DEVNAME=/dev/video2<br>
                              E: ID_V4L_PRODUCT=USB 2.0 Camera: HD 720P
                              Webcam<br>
                              E: DEVNAME=/dev/video3<br>
                              E: ID_V4L_PRODUCT=USB 2.0 Camera: HD 720P
                              Webcam<br>
                              <br>
                              lsusb | egrep 'Video|Camera'<br>
                              Bus 001 Device 005: ID 534d:2109
                              MacroSilicon USB Video<br>
                              Bus 001 Device 004: ID 0c45:6340 Microdia
                              Camera<br>
                              <br>
                              --------------------<br>
                              <br>
                              ll /dev/video*<br>
                              crw-rw----+ 1 root video 81, 0 feb.   7
                              20:22 /dev/video0<br>
                              crw-rw----+ 1 root video 81, 1 feb.   7
                              20:22 /dev/video1<br>
                              crw-rw----+ 1 root video 81, 2 feb.   7
                              09:05 /dev/video2<br>
                              crw-rw----+ 1 root video 81, 3 feb.   7
                              09:05 /dev/video3<br>
                              <br>
                              -----------------------<br>
                              <br>
                              v4l2-ctl --list-devices<br>
                              USB 2.0 Camera: HD 720P Webcam
                              (usb-0000:00:14.0-11):<br>
                                      /dev/video2<br>
                                      /dev/video3<br>
                              <br>
                              USB Video: USB Video (usb-0000:00:14.0-5):<br>
                                      /dev/video0<br>
                                      /dev/video1<br>
                              <br>
                              -------------------------<br>
                              <br>
                              ffmpeg -f v4l2 -list_formats all -i
                              /dev/video0<br>
                              ffmpeg -hide_banner -f v4l2 -list_formats
                              all -i /dev/video0<br>
                              [video4linux2,v4l2 @ 0x556cf63570c0]
                              Compressed:       mjpeg :         
                              Motion-JPEG : 1920x1080 1600x1200 1360x768
                              1280x1024 1280x960 1280x720 1024x768
                              800x600 720x576 720x480 640x480<br>
                              [video4linux2,v4l2 @ 0x556cf63570c0]
                              Raw       :     yuyv422 :           YUYV
                              4:2:2 : 1920x1080 1600x1200 1360x768
                              1280x1024 1280x960 1280x720 1024x768
                              800x600 720x576 720x480 640x480<br>
                              /dev/video0: Immediate exit requested<br>
                              <br>
                              ffmpeg -hide_banner -f v4l2 -list_formats
                              all -i /dev/video1<br>
                              [video4linux2,v4l2 @ 0x5560c0bc70c0]
                              ioctl(VIDIOC_G_INPUT): Inappropriate ioctl
                              for device<br>
                              /dev/video1: Inappropriate ioctl for
                              device<br>
                              ----------------<br>
                              <br>
                              v4l2-ctl --all<br>
                              Driver Info (not using libv4l2):<br>
                                      Driver name   : uvcvideo<br>
                                      Card type     : USB Video: USB
                              Video<br>
                                      Bus info      : usb-0000:00:14.0-5<br>
                                      Driver version: 5.14.21<br>
                                      Capabilities  : 0x84A00001<br>
                                              Video Capture<br>
                                              Metadata Capture<br>
                                              Streaming<br>
                                              Extended Pix Format<br>
                                              Device Capabilities<br>
                                      Device Caps   : 0x04200001<br>
                                              Video Capture<br>
                                              Streaming<br>
                                              Extended Pix Format<br>
                              Priority: 2<br>
                              Video input : 0 (Camera 1: ok)<br>
                              Format Video Capture:<br>
                                      Width/Height      : 1920/1080<br>
                                      Pixel Format      : 'MJPG'<br>
                                      Field             : None<br>
                                      Bytes per Line    : 0<br>
                                      Size Image        : 4147200<br>
                                      Colorspace        : sRGB<br>
                                      Transfer Function : Rec. 709<br>
                                      YCbCr/HSV Encoding: ITU-R 601<br>
                                      Quantization      : Default (maps
                              to Full Range)<br>
                                      Flags             : <br>
                              Crop Capability Video Capture:<br>
                                      Bounds      : Left 0, Top 0, Width
                              1920, Height 1080<br>
                                      Default     : Left 0, Top 0, Width
                              1920, Height 1080<br>
                                      Pixel Aspect: 1/1<br>
                              Selection: crop_default, Left 0, Top 0,
                              Width 1920, Height 1080<br>
                              Selection: crop_bounds, Left 0, Top 0,
                              Width 1920, Height 1080<br>
                              Streaming Parameters Video Capture:<br>
                                      Capabilities     : timeperframe<br>
                                      Frames per second: 30.000 (30/1)<br>
                                      Read buffers     : 0<br>
                                                   brightness 0x00980900
                              (int)    : min=-128 max=127 step=1
                              default=-11 value=-11<br>
                                                     contrast 0x00980901
                              (int)    : min=0 max=255 step=1
                              default=148 value=148<br>
                                                   saturation 0x00980902
                              (int)    : min=0 max=255 step=1
                              default=180 value=180<br>
                                                          hue 0x00980903
                              (int)    : min=-128 max=127 step=1
                              default=0 value=0<br>
                              <br>
                              -----------------<br>
                              <br>
                              v4l2-ctl --list-formats-ext<br>
                              ioctl: VIDIOC_ENUM_FMT<br>
                                      Index       : 0<br>
                                      Type        : Video Capture<br>
                                      Pixel Format: 'MJPG' (compressed)<br>
                                      Name        : Motion-JPEG<br>
                                              Size: Discrete 1920x1080<br>
                                                      Interval: Discrete
                              0.017s (60.000 fps)<br>
                                                      Interval: Discrete
                              0.033s (30.000 fps)<br>
                                                      Interval: Discrete
                              0.040s (25.000 fps)<br>
                                                      Interval: Discrete
                              0.050s (20.000 fps)<br>
                                                      Interval: Discrete
                              0.100s (10.000 fps)<br>
                                             .........<br>
                                              Size: Discrete 1280x720<br>
                                                      Interval: Discrete
                              0.017s (60.000 fps)<br>
                                                      Interval: Discrete
                              0.020s (50.000 fps)<br>
                                                      Interval: Discrete
                              0.033s (30.000 fps)<br>
                                                      Interval: Discrete
                              0.050s (20.000 fps)<br>
                                                      Interval: Discrete
                              0.100s (10.000 fps)<br>
                                              ......<br>
                                              Size: Discrete 720x576<br>
                                                      Interval: Discrete
                              0.017s (60.000 fps)<br>
                                                      Interval: Discrete
                              0.020s (50.000 fps)<br>
                                                      Interval: Discrete
                              0.033s (30.000 fps)<br>
                                                      Interval: Discrete
                              0.050s (20.000 fps)<br>
                                                      Interval: Discrete
                              0.100s (10.000 fps)<br>
                            </font></div>
                        </blockquote>
                      </div>
                    </div>
                  </div>
                </blockquote>
              </div>
            </blockquote>
          </div>
        </div>
        <div dir="auto"><br>
        </div>
        <div dir="auto"><br>
        </div>
        <div dir="auto">well, it seems we know by now why this device
          was ...unexpensive.</div>
      </div>
    </blockquote>
    <br>
    Yes, I have a "90-days open order" and will start to search for
    another, better UVC video capture device.<br>
    The problem is the lack of definitive specifications, compared with
    my proprietary BMD devices.<br>
    <br>
    <blockquote type="cite">
      <div dir="auto">
        <div dir="auto"><br>
        </div>
        <div dir="auto">it really seems to report only 5-10 fps at
          fullHD uncompresed, anything bigger is mjpeg ...</div>
      </div>
    </blockquote>
    <br>
    Type        : Video Capture<br>
            Pixel Format: 'YUYV'<br>
            Name        : YUYV 4:2:2<br>
                    Size: Discrete 1920x1080<br>
                            Interval: Discrete 0.200s (5.000 fps)<br>
    <br>
    This can absolutely not be what they promote as:<br>
    <font face="monospace">"Fluid video recordings without delays or
      distortions during live streaming, thanks to a picture frequency
      of 60 Hz and 1080p with Full HD".</font><br>
    <br>
    <blockquote type="cite">
      <div dir="auto"><br>
        <div dir="auto"><a href="https://superuser.com/questions/1449252/ffmpeg-captures-from-uvc-dev-video0-in-any-resolution-except-for-1920x1080" target="_blank" rel="noreferrer">https://superuser.com/questions/1449252/ffmpeg-captures-from-uvc-dev-video0-in-any-resolution-except-for-1920x1080</a><br>
        </div>
      </div>
    </blockquote>
    <br>
    I also tried that link's suggested syntax<br>
    <pre><code>ffmpeg -y -t 15 -f video4linux2 -video_size 1920x1080 -input_format nv12 -timestamps abs -use_libv4l2 1 -i /dev/video0 out.mov</code>
</pre>
    but it didn't work for me, just quitted ffmpeg with<br>
    <blockquote><font face="monospace">Unrecognized option 'timestamps'.</font><br>
      <font face="monospace">Error splitting the argument list: Option
        not found</font><br>
    </blockquote>
    Looking at ffmpeg man pages at <a href="https://manpages.org/ffmpeg/1" target="_blank" rel="noreferrer">https://manpages.org/ffmpeg/1</a> there
    also is a similar video4linux2 syntax example<br>
    <blockquote><font face="monospace">Grab and record the input of a
        video4linux2 device, leave the frame rate and size as previously
        set:</font><br>
      <font face="monospace">ffmpeg -f video4linux2 -input_format mjpeg
        -i /dev/video0 out.mpeg</font><br>
    </blockquote>
    <ul>
      <li><font face="monospace">video_size</font></li>
      <li><font face="monospace">    Set the video frame size. The
          argument must be a string in the form WIDTHxHEIGHT or a valid
          size abbreviation. </font></li>
      <li><font face="monospace">pixel_format</font></li>
      <li><font face="monospace">    Select the pixel format (only valid
          for raw video input). </font></li>
      <li><font face="monospace">input_format</font></li>
      <li><font face="monospace">    Set the preferred pixel format (for
          raw video) or a codec name. This option allows one to select
          the input format, when several are available. </font></li>
    </ul>
    But what should be set as input_format in this case?<br>
    <br>
    </div></blockquote></div></div><div dir="auto"><br></div><div dir="auto"><span style="color:rgb(80,0,80);font-size:12.8px">YUYV ? (lowercase)</span><br></div><div dir="auto"><br></div><div dir="auto"><br></div><div dir="auto"><br></div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><br>
    <br>
    <blockquote type="cite">
      <div dir="auto">
        <div dir="auto"><br>
        </div>
        <div dir="auto"><br>
        </div>
        <div dir="auto"><br>
        </div>
        <div dir="auto">
          <div class="gmail_quote">
            <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
              <div>
                <blockquote type="cite">
                  <div dir="auto">
                    <div dir="auto">
                      <div class="gmail_quote">
                        <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
                          <div><font face="monospace">                 <br>
                                      Index       : 1<br>
                                      Type        : Video Capture<br>
                                      Pixel Format: 'YUYV'<br>
                                      Name        : YUYV 4:2:2<br>
                                              Size: Discrete 1920x1080<br>
                                                      Interval: Discrete
                              0.200s (5.000 fps)<br>
                                              ......<br>
                                              Size: Discrete 1280x720<br>
                                                      Interval: Discrete
                              0.100s (10.000 fps)<br>
                                              .......<br>
                                              Size: Discrete 720x576<br>
                                                      Interval: Discrete
                              0.040s (25.000 fps)<br>
                                                      Interval: Discrete
                              0.050s (20.000 fps)<br>
                                                      Interval: Discrete
                              0.100s (10.000 fps)<br>
                                                      Interval: Discrete
                              0.200s (5.000 fps)<br>
                                              .........<br>
                              <br>
                              Encoding:<br>
                              --------<br>
                              ffmpeg -hide_banner -f v4l2 -framerate 25
                              -video_size 720x576 -i /dev/video0
                              -codec:v ffv1 -codec:a pcm_s16le -f
                              matroska 720x576_ffv1.mkv<br>
                              <br>
                              ffmpeg -hide_banner -f v4l2 -framerate 25
                              -video_size 1280x720 -i /dev/video0
                              -codec:v ffv1 -codec:a pcm_s16le -f
                              matroska 1280x720_ffv1.mkv<br>
                              [video4linux2,v4l2 @ 0x559d031190c0] The
                              driver changed the time per frame from
                              1/25 to 1/10<br>
                              <br>
                              ffmpeg -hide_banner -f v4l2 -framerate 25
                              -video_size 1920x1080 -i /dev/video0
                              -codec:v ffv1 -codec:a pcm_s16le -f
                              matroska 1920x1080_ffv1.mkv<br>
                              [video4linux2,v4l2 @ 0x55ce18d060c0] The
                              driver changed the time per frame from
                              1/25 to 1/5<br>
                              <br>
                              ffmpeg -hide_banner -f v4l2 -framerate 25
                              -video_size 1920x1080 -i /dev/video0
                              -codec:v v210 -codec:a pcm_s16le -f
                              matroska 1920x1080_v210.mkv<br>
                              [video4linux2,v4l2 @ 0x55944900e0c0] The
                              driver changed the time per frame from
                              1/25 to 1/5<br>
                              <br>
                              <br>
                              Recorded test video files and probing
                              formats:<br>
---------------------------------------------<br>
                              <br>
                              du -sh *<br>
                              258M    1280x720_ffv1.mkv<br>
                              292M    1920x1080_ffv1.mkv<br>
                              1,1G    1920x1080_v210.mkv<br>
                              61M     720x576_ffv1.mkv<br>
                              -----------------------------<br>
                              <br>
                              <br>
                              ffprobe -hide_banner 720x576_ffv1.mkv<br>
                              Input #0, matroska,webm, from
                              '720x576_ffv1.mkv':<br>
                                Metadata:<br>
                                  ENCODER         : Lavf58.76.100<br>
                                Duration: 00:00:09.20, start: 0.000000,
                              bitrate: 55385 kb/s<br>
                                Stream #0:0: Video: ffv1 (FFV1 /
                              0x31564646), yuv422p(tv, progressive),
                              720x576, 25 fps, 25 tbr, 1k tbn, 1k tbc
                              (default)<br>
                                  Metadata:<br>
                                    ENCODER         : Lavc58.134.100
                              ffv1<br>
                                    DURATION        : 00:00:09.200000000<br>
                              -----------<br>
                              <br>
                              ffprobe -hide_banner 1280x720_ffv1.mkv<br>
                              Input #0, matroska,webm, from
                              '1280x720_ffv1.mkv':<br>
                                Metadata:<br>
                                  ENCODER         : Lavf58.76.100<br>
                                Duration: 00:00:38.90, start: 0.000000,
                              bitrate: 55512 kb/s<br>
                                Stream #0:0: Video: ffv1 (FFV1 /
                              0x31564646), yuv422p(tv, progressive),
                              1280x720, 10 fps, 10 tbr, 1k tbn, 1k tbc
                              (default)<br>
                                  Metadata:<br>
                                    ENCODER         : Lavc58.134.100
                              ffv1<br>
                                    DURATION        : 00:00:38.900000000<br>
                              --------------<br>
                              <br>
                              ffprobe -hide_banner 1920x1080_ffv1.mkv<br>
                              Input #0, matroska,webm, from
                              '1920x1080_ffv1.mkv':<br>
                                Metadata:<br>
                                  ENCODER         : Lavf58.76.100<br>
                                Duration: 00:00:53.40, start: 0.000000,
                              bitrate: 45747 kb/s<br>
                                Stream #0:0: Video: ffv1 (FFV1 /
                              0x31564646), yuv422p(tv, progressive),
                              1920x1080, 5 fps, 5 tbr, 1k tbn, 1k tbc
                              (default)<br>
                                  Metadata:<br>
                                    ENCODER         : Lavc58.134.100
                              ffv1<br>
                                    DURATION        : 00:00:53.400000000<br>
                              ----------------<br>
                              <br>
                              ffprobe -hide_banner 1920x1080_v210.mkv<br>
                              [matroska,webm @ 0x5563ca6d30c0] Stream
                              #0: not enough frames to estimate rate;
                              consider increasing probesize<br>
                              Input #0, matroska,webm, from
                              '1920x1080_v210.mkv':<br>
                                Metadata:<br>
                                  ENCODER         : Lavf58.76.100<br>
                                Duration: 00:00:41.40, start: 0.000000,
                              bitrate: 221185 kb/s<br>
                                Stream #0:0: Video: v210 (v210 /
                              0x30313276), yuv422p10le(tv, progressive),
                              1920x1080, 5 fps, 1k tbr, 1k tbn, 1k tbc
                              (default)<br>
                                  Metadata:<br>
                                    ENCODER         : Lavc58.134.100
                              v210<br>
                                    DURATION        : 00:00:41.400000000<br>
                                    <br>
                              ---------------------------<br>
                                                    <br>
                            </font><br>
                            <blockquote type="cite">
                              <ul>
                              </ul>
                              <font face="Courier New, Courier,
                                monospace"><br>
                                2) Scart AV SV to HDMI Converter
                                Switcher S Video Composite RCA DVD HD TV
                                adapter (3-4 weeks delivery time <br>
                                <a href="https://www.ebay.com.au/itm/295472602625" rel="noreferrer noreferrer noreferrer" target="_blank">https://www.ebay.com.au/itm/295472602625</a><br>
                              </font>
                              <ul>
                                <li><font face="Courier New, Courier,
                                    monospace">The 3-in-1
                                    S-/video/RCA/SCART to HDMI converter
                                    is a universal converter for analog
                                    video input to HDMI output. </font></li>
                                <li><font face="Courier New, Courier,
                                    monospace">Analog to digital
                                    converter (ADC), 10 bits maximum
                                    1,62 MSPS sampling, </font></li>
                              </ul>
                              <font face="Courier New, Courier,
                                monospace"><br>
                                <br>
                                Q I have not yet found a definitiv
                                ffmpeg FFV1 v 3 syntax guide for SD and
                                HDV capturing and hope for suggestions
                                and comments here!?<br>
                                <br>
                                3.1 FFmpeg recipe (PAL)<br>
                              </font>
                              <blockquote><font face="Courier New,
                                  Courier, monospace">ffmpeg -i VIDEO_IN
                                  \</font><br>
                                <blockquote><font face="Courier New,
                                    Courier, monospace">-c:v ffv1 -level
                                    3 -coder 1 -context 0 -slices 24
                                    -slicecrc 1 \</font><br>
                                  <font face="Courier New, Courier,
                                    monospace">-color_primaries bt470bg
                                    \</font><br>
                                  <font face="Courier New, Courier,
                                    monospace">-color_trc bt709 \</font><br>
                                  <font face="Courier New, Courier,
                                    monospace">-colorspace bt470bg \</font><br>
                                  <font face="Courier New, Courier,
                                    monospace">-color_range mpeg \</font><br>
                                  <font face="Courier New, Courier,
                                    monospace">-map 0 \</font><br>
                                  <font face="Courier New, Courier,
                                    monospace">-top 1 \</font><br>
                                  <font face="Courier New, Courier,
                                    monospace">-c:a copy \</font><br>
                                  <font face="Courier New, Courier,
                                    monospace">-g 1 -pix_fmt + \</font><br>
                                  <font face="Courier New, Courier,
                                    monospace">VIDEO_OUT.mkv</font><br>
                                </blockquote>
                              </blockquote>
                              <font face="Courier New, Courier,
                                monospace"><br>
                                3.2 Reference Example<br>
                                <a href="https://trac.ffmpeg.org/wiki/Encode/FFV1" rel="noreferrer noreferrer noreferrer" target="_blank">https://trac.ffmpeg.org/wiki/Encode/FFV1</a><br>
                                <br>
                                    Copy audio "as-is" and use FFV1.3 as
                                video codec. <br>
                                <br>
                                    Parameters are 8 threads, coder=1,
                                context=1, GOP-size=1, 24 slices and
                                slice-CRC on:<br>
                                <br>
                                    ffmpeg -i <input_video>     \<br>
                                        -acodec   copy          \<br>
                                        -vcodec   ffv1 -level 3 \<br>
                                        -threads  8             \<br>
                                        -coder    1             \<br>
                                        -context  1             \<br>
                                        -g        1             \<br>
                                        -slices  24             \<br>
                                        -slicecrc 1             \<br>
                                        <output_video><br>
                                <br>
                                <br>
                                3.3 Various Encoding examples for Video
                                capture from USB camera /dev/video0:<br>
                                <br>
                                ffmpeg -f v4l2 -framerate 25 -video_size
                                720x576 -i /dev/video0 output_data.mkv<br>
                                <br>
                                ffmpeg -f v4l2 -framerate 25 -video_size
                                720x576 -i /dev/video0 -codec:v ffv1
                                -codec:a pcm_s16le \<br>
                                    -f matroska  output_video.mkv<br>
                                <br>
                                Check that video is captured properly
                                using ffplay:<br>
                                <br>
                                ffmpeg -ar 44100 -thread_queue_size 1024
                                -f alsa -i $AUDIO \<br>
                                    -r 25 -thread_queue_size 1024 -i
                                $VIDEO \<br>
                                    -codec copy -f matroska  - | ffplay
                                -<br>
                              </font><font face="Courier"><span><br>
                                </span></font><font face="Courier New,
                                Courier, monospace"><span>Check the
                                  overall flow using ffplay before
                                  capturing:</span> </font>
                              <div>
                                <div> <br>
                                </div>
                              </div>
                              <font face="Courier New, Courier,
                                monospace">ffmpeg -ar 44100
                                -thread_queue_size 1024 -f alsa -i
                                $AUDIO \<br>
                                    -itsoffset -0.5 -r 25
                                -thread_queue_size 1024 -i $VIDEO \<br>
                                    -filter_complex 'channelmap=FL-0'
                                -filter_complex
                                'crop=w=700:h=556:x=8:y=0' \<br>
                                    -map 1:v  -map 0:a -codec:v ffv1
                                -codec:a pcm_s16le \<br>
                                    -f matroska  - | ffplay -<br>
                                <br>
                                <br>
                                <br>
                                4, Regarding FFV1 lossless compression
                                in realtime<br>
                              </font><font face="Courier New, Courier,
                                monospace"><font face="Courier New,
                                  Courier, monospace">Comparison tests
                                  (2013/2015) have shown that FFV1
                                  produced the smallest files at the
                                  fastest speed. It can be used to
                                  capture SD material in realtime, and
                                  HD possibly, too. </font></font><font face="Courier New, Courier, monospace"><font face="Courier New, Courier, monospace"><font face="Courier New, Courier,
                                    monospace">This according to a
                                    2012/2015 article, where I have
                                    extracted the results for FFV1 v.3
                                    in the tables below:<br>
                                    <br>
                                    <a href="http://www.av-rd.com/knowhow/video/comparison_video_codecs_containers.html#codec_tests" rel="noreferrer noreferrer noreferrer" target="_blank">http://www.av-rd.com/knowhow/video/comparison_video_codecs_containers.html#codec_tests</a><br>
                                  </font> </font></font> NOTE: This is
                              a consumer grade, off-the-shelf PC setup.<br>
                              <br>
                              <table>
                                <tbody>
                                  <tr>
                                    <th colspan="2">Hardware:</th>
                                  </tr>
                                  <tr>
                                    <td>CPU:</td>
                                    <td>Intel(R) QuadCore(TM) i7-2600K
                                      CPU @ 3.40GHz</td>
                                  </tr>
                                  <tr>
                                    <td>RAM:</td>
                                    <td>8 GB</td>
                                  </tr>
                                  <tr>
                                    <td>Disk:</td>
                                    <td>Intel SSDSA2CW080G3 (SSD)</td>
                                  </tr>
                                  <tr>
                                    <th colspan="2">Software:</th>
                                  </tr>
                                  <tr>
                                    <td>Operating System:</td>
                                    <td>GNU/Linux (Xubuntu 12.04.1,
                                      64bit)</td>
                                  </tr>
                                  <tr>
                                    <td>Transcoding tool:</td>
                                    <td>FFmpeg (version git
                                      N-59183-g3e62654, Dec 17 2013)</td>
                                  </tr>
                                </tbody>
                              </table>
                              <br>
                              <table>
                                <tbody>
                                  <tr>
                                    <td>Video source file:</td>
                                    <td colspan="6"> <a href="http://media.xiph.org/video/derf/y4m/football_422_ntsc.y4m" rel="noreferrer noreferrer noreferrer" target="_blank">VQEG
                                        reference video "football"</a>
                                      (NTSC-SD, 720x486px, 30fps,
                                      yuv422p, 8bpc) </td>
                                  </tr>
                                  <tr>
                                    <th>Codec</th>
                                    <th>Encoding</th>
                                    <th>Decoding</th>
                                    <th>Filesize</th>
                                    <th>% of uncompressed</th>
                                    <th>Implementation</th>
                                    <th>Details</th>
                                  </tr>
                                  <tr>
                                    <td><a href="http://www.av-rd.com/knowhow/video/comparison_video_codecs_containers.html#codec_ffv1" rel="noreferrer noreferrer noreferrer" target="_blank">FFV1</a>
                                      (version 3)</td>
                                    <td>216 fps</td>
                                    <td>277 fps</td>
                                    <td>111 MiB</td>
                                    <td>46.1%</td>
                                    <td><a href="http://en.wikipedia.org/wiki/Libavcodec" rel="noreferrer noreferrer noreferrer" target="_blank">libavcodec
                                        (FFmpeg)</a></td>
                                    <td> <a href="http://www.av-rd.com/knowhow/video/test_results/football-720x486i30/ffv1.3-libavcodec_ffmpeg_avi.log" type="text/plain" rel="noreferrer noreferrer noreferrer" target="_blank">log</a>,
                                      <a href="http://www.av-rd.com/knowhow/video/test_results/football-720x486i30/ffv1.3-libavcodec_ffmpeg_avi.framemd5" type="text/plain" rel="noreferrer noreferrer noreferrer" target="_blank">framemd5</a></td>
                                  </tr>
                                </tbody>
                              </table>
                              <font face="Courier New, Courier,
                                monospace"> <br>
                              </font><br>
                              <table>
                                <tbody>
                                  <tr>
                                    <td>Video source file:</td>
                                    <td colspan="6"> <a href="http://media.xiph.org/video/derf/y4m/park_joy_1080p50.y4m" rel="noreferrer noreferrer noreferrer" target="_blank">SVT
                                        reference video "park joy"</a>
                                      (full-HD/1080p, 1920x1080px,
                                      50fps, yuv420p, 8bpc) </td>
                                  </tr>
                                  <tr>
                                    <th>Codec</th>
                                    <th>Encoding</th>
                                    <th>Decoding</th>
                                    <th>Filesize</th>
                                    <th>% of uncompressed</th>
                                    <th>Implementation</th>
                                    <th>Details</th>
                                  </tr>
                                  <tr>
                                    <td><a href="http://www.av-rd.com/knowhow/video/comparison_video_codecs_containers.html#codec_ffv1" rel="noreferrer noreferrer noreferrer" target="_blank">FFV1</a>
                                      (version 3)</td>
                                    <td>31 fps</td>
                                    <td>63 fps</td>
                                    <td>879 MiB</td>
                                    <td>57.2%</td>
                                    <td><a href="http://en.wikipedia.org/wiki/Libavcodec" rel="noreferrer noreferrer noreferrer" target="_blank">libavcodec
                                        (FFmpeg)</a></td>
                                    <td> <a href="http://www.av-rd.com/knowhow/video/test_results/park_joy-1920x1080p50/ffv1.3-libavcodec_ffmpeg_avi.log" type="text/plain" rel="noreferrer noreferrer noreferrer" target="_blank">log</a>,
                                      <a href="http://www.av-rd.com/knowhow/video/test_results/park_joy-1920x1080p50/ffv1.3-libavcodec_ffmpeg_avi.framemd5" type="text/plain" rel="noreferrer noreferrer noreferrer" target="_blank">framemd5</a></td>
                                  </tr>
                                </tbody>
                              </table>
                              <font face="Courier New, Courier,
                                monospace"> <br>
                                <br>
                              </font><br>
                              <font face="Courier New, Courier,
                                monospace"><font face="Courier New,
                                  Courier, monospace"><font face="Courier New, Courier,
                                    monospace"><font face="Courier New,
                                      Courier, monospace">PAL-SD 720x576
                                    </font><font face="Courier New,
                                      Courier, monospace">stored as
                                      YUV422</font><font face="Courier
                                      New, Courier, monospace">, 10 bpc
                                      (bits per component), instead of
                                      the tested 8 bpc above, seems to
                                      me would have enlarged the the
                                      filesizes with about 25%, or to
                                      about 40 GB/hr with FFV1 lossless
                                      compressed. </font></font></font><br>
                                <br>
                                Although the FFV1 compression results
                                above obviously used yuv422p, 8bps
                                source SD and FHD files as input, it
                                seems for me that the encoding speeds at
                                216 fps and 31 fps for SD and FHD
                                respectively, assumingly should manage
                                realtime FFV1 encoding and streaming of
                                PAL SD and HDV at 25 fps as well,
                                especially with a faster i7-6700 x 8
                                cpu. Comments here?<br>
                                <br>
                                <br>
                                5. Related 2021-[Cin] threads as
                                background references<br>
                                <br>
                                [Cin] hdmi capture card (with v4l2)<br>
                                <a href="https://www.mail-archive.com/cin@lists.cinelerra-gg.org/msg02865.html" rel="noreferrer noreferrer noreferrer" target="_blank">https://www.mail-archive.com/cin@lists.cinelerra-gg.org/msg02865.html</a><br>
                                <br>
                                [Cin] offtopic: Digitize and record
                                Video with A/D USB adapters<br>
                                <a href="https://www.mail-archive.com/cin@lists.cinelerra-gg.org/msg03269.html" rel="noreferrer noreferrer noreferrer" target="_blank">https://www.mail-archive.com/cin@lists.cinelerra-gg.org/msg03269.html</a><br>
                                <br>
                                [Cin] offtopic: HDMI capture<br>
                                <a href="https://www.mail-archive.com/cin@lists.cinelerra-gg.org/msg02084.html" rel="noreferrer noreferrer noreferrer" target="_blank">https://www.mail-archive.com/cin@lists.cinelerra-gg.org/msg02084.html</a><br>
                                <br>
                                [Cin] Is SD and HD 422 Video Capture
                                obtainable with V4L(2)?<br>
                                <a href="https://www.mail-archive.com/cin@lists.cinelerra-gg.org/msg03719.html" rel="noreferrer noreferrer noreferrer" target="_blank">https://www.mail-archive.com/cin@lists.cinelerra-gg.org/msg03719.html</a><br>
                                <br>
                                [Cin] Uncompressed video to lossless
                                compression FFV1/MKV<br>
                                <a href="https://www.mail-archive.com/cin@lists.cinelerra-gg.org/msg03791.html" rel="noreferrer noreferrer noreferrer" target="_blank">https://www.mail-archive.com/cin@lists.cinelerra-gg.org/msg03791.html</a><br>
                              </font> </blockquote>
                            <br>
                          </div>
                          -- <br>
                          Cin mailing list<br>
                          <a href="mailto:Cin@lists.cinelerra-gg.org" rel="noreferrer noreferrer noreferrer" target="_blank">Cin@lists.cinelerra-gg.org</a><br>
                          <a href="https://lists.cinelerra-gg.org/mailman/listinfo/cin" rel="noreferrer noreferrer noreferrer noreferrer" target="_blank">https://lists.cinelerra-gg.org/mailman/listinfo/cin</a><br>
                        </blockquote>
                      </div>
                    </div>
                  </div>
                </blockquote>
                <br>
              </div>
            </blockquote>
          </div>
        </div>
      </div>
    </blockquote>
    <br>
  </div>

</blockquote></div></div></div>