<div dir="auto"><div><br><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">чт, 29 мая 2025 г., 05:45 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"><u></u>

  
    
  
  <div>
    <br>
    <br>
    <div>Den 29.05.2025 01:27, skrev Andrew
      Randrianasulu:<br>
    </div>
    <blockquote type="cite">
      
      <div dir="auto">
        <div><br>
          <br>
          <div class="gmail_quote">
            <div dir="ltr" class="gmail_attr">ср, 28 мая 2025 г., 23:38
              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"><br>
              <br>
              Den 27.05.2025 21:29, skrev Andrew Randrianasulu:<br>
              > On Tue, May 27, 2025 at 10:47 PM Terje J. Hanssen<br>
              > <<a href="mailto:terjejhanssen@gmail.com" rel="noreferrer noreferrer" target="_blank">terjejhanssen@gmail.com</a>>
              wrote:<br>
              >> Den 27.05.2025 16:28, skrev Andrew Randrianasulu:<br>
              >><br>
              >> On Tue, May 27, 2025 at 7:02 PM Terje J. Hanssen
              via Cin<br>
              >> <<a href="mailto:cin@lists.cinelerra-gg.org" rel="noreferrer noreferrer" target="_blank">cin@lists.cinelerra-gg.org</a>>
              wrote:<br>
              >><br>
              >><br>
              >> Den 27.05.2025 12:54, skrev Terje J. Hanssen:<br>
              >><br>
              >> I tried to Record camcorder video stream via v4l2
              and hdmi-usb3 capture as input device.<br>
              >><br>
              >> ms2130 is more powerful but else similar to the
              usb2 EasyCap device example described in the CinGG manual<br>
              >> <a href="https://cinelerra-gg.org/download/CinelerraGG_Manual/Use_Case_1_a_EasyCap.html" rel="noreferrer noreferrer noreferrer" target="_blank">https://cinelerra-gg.org/download/CinelerraGG_Manual/Use_Case_1_a_EasyCap.html</a><br>
              >><br>
              >> My Sony FX7-E 1080i50 HDV camcorder was connected
              via HDMI to a ms2130 usb3 capture card.<br>
              >><br>
              >> My procedure description here on openSUSE
              Tumbleweed-Slowroll, kernel 
              6.12.30-1.0.4.sr20250501-longterm<br>
              >><br>
              >> ~/Applications>
              ./CinGG-20250430-x86_64.AppImage<br>
              >> Cinelerra Infinity - built: Apr 30 2025 07:18:32<br>
              >><br>
              >> 1) Settings > Preferences > Record<br>
              >><br>
              >> File format: FFMPEG     mp4<br>
              >><br>
              >> Video In:<br>
              >><br>
              >> Record driver: Video4Linux2 /dev(video0<br>
              >><br>
              >> The first thing I noticed was that default Record
              video setting was SD NTSC, not PAL as else according to my
              time zone.<br>
              >> Could this possibly be changed as else?<br>
              >><br>
              >> Frames to record on disk: 30 (default)?<br>
              >><br>
              >> Changed frame to a camcorder resolution and fps
              supported by v4l2 and ms2130:<br>
              >><br>
              >> Frame: 1920 x 1080 (was default NTSC SD)<br>
              >> fps: 50 (progressive)<br>
              >><br>
              >><br>
              >> File > Record r<br>
              >><br>
              >> Two windows opened, one showing the running
              record time etc. and the other the camera window image.<br>
              >><br>
              >><br>
              >> Unhappily, when I reconnected the camcorder to
              re-test today, the second window with the camera image did
              not longer open!!<br>
              >> I've tried to reset the machine and camcorder,
              but no. Did also a test with system ffplay (when the v4l2
              was free again) and it worked.<br>
              >><br>
              >> Obviously here is something that causes this
              confusing issue, but what?  load straty, a changed setting
              or something else?<br>
              >> Happily the window opened yesterday, so I know
              the should work.<br>
              >> I understand this can be difficult to
              troubleshoot without a similar setup.<br>
              >><br>
              >> There is checkbox named Monitor Video. Be sure
              you have it  set.<br>
              >><br>
              >><br>
              >> Yes, thanks it works again.<br>
              >><br>
              >> I usually set all parameters (like frame size,
              framerate, type of<br>
              >> Video Input device) in Recording tab.<br>
              >><br>
              >><br>
              >> Yes, but I wonder what these default box values
              mean?<br>
              >><br>
              >> Frames to record to disk at a time: 30<br>
              >> Frames to buffer in device: 2<br>
              >> Positioning: Software timing<br>
              > I left first two as defaults, and sometimes for
              screenrecording set<br>
              > Samples instead of Software timing (so it will write
              stream relative<br>
              > to audio samples, adding or dropping frames as needed
              - makes audio<br>
              > and video track match)<br>
              ><br>
              > There should be std. for cingg wrench icon where you
              select type of<br>
              > encoding (FFMPEG ..).<br>
              > If you click it you get window with compression
              parameters.<br>
              > I set Pixels there.<br>
              <br>
              <br>
              Yeah, thank you - now it's hopefully better in my fingers
              :)<br>
              <br>
              First, with my Sony FX7E HDV 1080i50 camera connected via
              <br>
              HDMI-ms2130-USB3 - 4vl2<br>
              <br>
              That is the camera's EIP native (w/o MPEG-2 compression)
              output via HDMI <br>
              handshake expected FHD 1080i 422,<br>
              or is it just the ms2130 via USB3 and v4l2 capability that
              is detected <br>
              below?<br>
            </blockquote>
          </div>
        </div>
        <div dir="auto"><br>
        </div>
        <div dir="auto"><br>
        </div>
        <div dir="auto">Very good question. HDMI is (uncompressed)
          digital video interface, likewise USB3 is also digital, BUT as
          we noted in another thread by default ms2130 does its own
          signal processing, but with hacked firmware this can be
          disabled and thus this usb3 dongle become sort of generic
          digital input device at relatively high speed (75 Mbytes/s).</div>
        <div dir="auto"><br>
        </div>
        <div dir="auto">Unless you set your camera as giant "webcam" I
          think that is on HDMI output is result of decoding mpeg2 from
          tape? <br>
        </div>
      </div>
    </blockquote>
    <br>
    My tests here were just camera without tape. I'll have a look with
    tape playing to find the bitrate over HDMI out.<br>
    <br>
    And to repeat the relevant sections from to Steve Mullen's FX7 and
    V1 handbook:<br>
    <br>
    When the camera is operating, the EIP generates uncompressed
    1440x1080i with a 4:2:2 color space.<br>
    Digital 4:2:2 data are output via the HDMI port <br>
    Therefore, you can record 4:2:2 live HD video from the camera
    without MPEG-2 compression.<br>
    <br>
    Two-channel audio is output on the HDMI port, both when the camera
    is running and during tape<br>
    playback.<br>
    The Sony V1 and FX7 provide an HDMI output port that carries
    uncompressed 4:2:2, 8-bit,<br>
    digital video plus dual-channel, PCM, 16-bit, 48kHz audio. <br>
    <br>
    If you record to HDV tape, you can also benefit from HDMI
    uncompressed capture and editing.<br>
    After MPEG-2 decoding, the 4:2:2, 8-bit YCbCr uncompressed video is
    sent via the camcorder’s<br>
    HDMI port<br>
    <br>
    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. <br>
    The HDMI chip downscales 1440 to 1280 while it up-scales 540 to 720.
    <br>
    The result is 720p50 or 720p60, which is output via HDMI.<br>
    <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">
              <br>
              ffplay -hide_banner -f v4l2 -framerate 50 -i /dev/video0<br>
              Input #0, video4linux2,v4l2, from '/dev/video0':B sq=   
              0B<br>
                 Duration: N/A, start: 290.793132, bitrate: 1658880 kb/s<br>
                 Stream #0:0: Video: rawvideo (YUY2 / 0x32595559),
              yuyv422, 1920x1080, <br>
              1658880 kb/s, 50 fps, 50 tbr, 1000k tbn<br>
              <br>
              v4l2-ctl -V<br>
              Format Video Capture:<br>
                   Width/Height      : 1920/1080<br>
                   Pixel Format      : 'YUYV' (YUYV 4:2:2)<br>
                   Field             : None<br>
                   Bytes per Line    : 3840<br>
                   Size Image        : 4147200<br>
                   Colorspace        : sRGB<br>
                   Transfer Function : Rec. 709<br>
                   YCbCr/HSV Encoding: ITU-R 601<br>
                   Quantization      : Default (maps to Limited Range)<br>
                   Flags             :<br>
              <br>
              -----------------<br>
              <br>
              So I tested two additional mpeg2-hdv and mpeg2_hq
              recordings with CinGG <br>
              that works ok:<br>
              <br>
              1) mpeg2_hdv_mpeg + mp2<br>
              ---------------------------------------------<br>
              1920X1080<br>
              50fps<br>
              mpeg1_mp2.mpeg (no PCM available)<br>
              mpeg2_hdv_mpeg<br>
              yuv422p (default yuv420, shouldn't 422 be detected
              automatic from the <br>
              input?)<br>
            </blockquote>
          </div>
        </div>
        <div dir="auto"><br>
        </div>
        <div dir="auto">I think capture logic predates ffmpeg
          integration, so not sure if it possible .. I'll look into it.</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">
              <br>
              BC_DisplayInfo::gl_fb_config failed<br>
              DeviceV4L2Base::v4l2_open pixels="YUYV"; res="1920x1080
              1600x1200 <br>
              1360x768 1280x1024 1280x960 1280x720 1024x768 800x600
              720x576 720x480 <br>
              640x480"<br>
              v4l2 s_fmt 1920x1080 YUYV<br>
              DeviceV4L2Base::v4l2_open VIDIOC_S_STD: Unsuitable«ioctl»
              for device<br>
              -------<br>
              <br>
              ffprobe -hide_banner
              CinGG_Record_mpeg2_hdv_video+mp2_audio.mpeg<br>
              Input #0, mpeg, from
              'CinGG_Record_mpeg2_hdv_video+mp2_audio.mpeg':<br>
                 Duration: 00:00:09.31, start: 0.509978, bitrate: 25439
              kb/s<br>
                 Stream #0:0[0x1e0]: Video: mpeg2video (4:2:2),
              yuv422p(tv, <br>
              bt709/unknown/unknown, progressive), 1920x1080 [SAR 1:1
              DAR 16:9], 50 <br>
              fps, 50 tbr, 90k tbn<br>
                     Side data:<br>
                       cpb: bitrate max/min/avg: 0/0/0 buffer size:
              7110656 vbv_delay: N/A<br>
                 Stream #0:1[0x1c0]: Audio: mp2, 48000 Hz, stereo, s16p,
              384 kb/s<br>
              -------<br>
              <br>
              My comments:<br>
              The default 25Mbps video bitrate is just like mpeg2/
              MP@H-14 HDV 1080i50 <br>
              420 on tape.<br>
              Max allowed is 60 Mbps<br>
              PCM audio is missing<br>
              <br>
              ============<br>
              <br>
              2) mpeg2_hq_mpeg + mp2<br>
              -------------------------------------------<br>
              1920X1080<br>
              50fps<br>
              mpeg1_mp2.mpeg (no PCM available)<br>
              mpeg2_hq_mpeg<br>
              yuv422p (default yuv420, shouldn't 422 be detected
              automatic from the <br>
              input?)<br>
              <br>
              DeviceV4L2Base::v4l2_open pixels="YUYV"; res="1920x1080
              1600x1200 <br>
              1360x768 1280x1024 1280x960 1280x720 1024x768 800x600
              720x576 720x480 <br>
              640x480"<br>
              v4l2 s_fmt 1920x1080 YUYV<br>
              DeviceV4L2Base::v4l2_open VIDIOC_S_STD: Unsuitable«ioctl»
              for device<br>
              -----------<br>
              <br>
              ffprobe -hide_banner
              CinGG_Record_mpeg2_hq_video+mp2_audio.mpeg<br>
              Input #0, mpeg, from
              'CinGG_Record_mpeg2_hq_video+mp2_audio.mpeg':<br>
                 Duration: 00:00:11.55, start: 0.509978, bitrate: 6379
              kb/s<br>
                 Stream #0:0[0x1e0]: Video: mpeg2video (4:2:2),
              yuv422p(tv, <br>
              bt709/unknown/unknown, progressive), 1920x1080 [SAR 1:1
              DAR 16:9], 50 <br>
              fps, 50 tbr, 90k tbn<br>
                     Side data:<br>
                       cpb: bitrate max/min/avg: 0/0/0 buffer size:
              1130496 vbv_delay: N/A<br>
                 Stream #0:1[0x1c0]: Audio: mp2, 48000 Hz, stereo, s16p,
              384 kb/s<br>
              ------<br>
              My comments:<br>
              The default 6.37Mbps video bitrate is not very "hq", more
              like a SD DVD <br>
              bitrate<br>
              PCM audio is missing<br>
              <br>
              =====================<br>
              <br>
              Sometime in the future, additional presets (especial 422p)
              from common <br>
              MPEG-2 Profile/Level combinations could be useful<br>
              <a href="https://en.wikipedia.org/wiki/H.262/MPEG-2_Part_2#Video_profiles_and_levels" rel="noreferrer noreferrer noreferrer" target="_blank">https://en.wikipedia.org/wiki/H.262/MPEG-2_Part_2#Video_profiles_and_levels</a></blockquote>
          </div>
        </div>
        <div dir="auto"><br>
        </div>
        <div dir="auto"><br>
        </div>
        <div dir="auto">PCM in mpeg2ts tend to be unsupported? It
          stuffed into private stream and even ffmpeg itself does not
          know how to extract it back?  So if you want to put
          video+audio back to tape you are stuck with that camera itself
          produces .... If you prepare files for PC viewing you can
          encode in any codec/audio codec/container combination.</div>
      </div>
    </blockquote>
    <br>
    HDV 1080i 25Mbps (M2T) compressed on miniDV tapes has only space for
    embedded MP2 audio, HDV 720p optional PCM.<br>
    Else, "HDV" in various MPEG-2 formats can be stored with PCM audio,
    included DVD and Bluray..<br>
    All XDCAM video formats use MPEG-2 and PCM audio<br>
    <a href="https://en.wikipedia.org/wiki/XDCAM#XDCAM_formats" target="_blank" rel="noreferrer">https://en.wikipedia.org/wiki/XDCAM#XDCAM_formats</a></div></blockquote></div></div><div dir="auto"><br></div><div dir="auto"><br></div><div dir="auto">Yes, it will be much more accurate to say that putting *arbitrary* PCM audio data in mpegts will not work well with ffmpeg. DVD and BD variants have their own micro-header saying things like samplerate, number of channels .... so you are limited to specific combination of parameters.</div><div dir="auto"><br></div><div dir="auto">I think XDCAM was using MXF (Material Exchange format)?</div><div dir="auto"><br></div><div dir="auto"><br></div><div dir="auto"><div class="gmail_quote gmail_quote_container"><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">Feel free to modify some presets, and I think
          there was way to save them from GUI?</div>
      </div>
    </blockquote>
    <br>
    I'll look at that<br>
    <br>
    <blockquote type="cite">
      <div dir="auto">
        <div dir="auto"><br>
        </div>
        <div dir="auto">Obvious question that tended to bite me back in
          the day: does audio and video stay in sync over longer periods
          of time?</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"><br>
              <br>
              <br>
              <br>
              <br>
              <br>
              <br>
              <br>
              >> I have yet to find where to set color subsampling
              yuv422p, bitrate, quality profile etc<br>
              >><br>
              >> I recorded three test file types with their
              defaults, and all got yuv420p<br>
              >><br>
              >> CinGG_Record1.mp4<br>
              >> Duration: 00:00:09.05, start: 0.000000, bitrate:
              5044 kb/s<br>
              >> Stream #0:0[0x1](und): Video: h264 (High) (avc1 /
              0x31637661), yuv420p(tv, bt709/unknown/unknown,
              progressive), 1920x1080, 4952 kb/s, 50 fps, 50 tbr, 12800
              tbn (default)<br>
              >><br>
              >> CinGG_Record2.mkv<br>
              >> Duration: 00:00:13.66, start: -0.007000, bitrate:
              890 kb/s<br>
              >> Stream #0:0: Video: vp9 (Profile 0), yuv420p(tv,
              bt709/unknown/unknown), 1920x1080, 50 fps, 50 tbr, 1k tbn<br>
              >><br>
              >> CinGG_Record3.mpeg<br>
              >> Duration: 00:00:22.26, start: 0.520000, bitrate:
              2321 kb/s<br>
              >>    Stream #0:0[0x1e0]: Video: mpeg2video (Main),
              yuv420p(tv, bt709/unknown/unknown, progressive), 1920x1080
              [SAR 1:1 DAR 16:9], 50 fps, 50 tbr, 90k tbn<br>
              >><br>
              >><br>
              >><br>
              >> Note that in your case while you record SD it
              gets upscaled by your<br>
              >> svideo -> hdmi and  hdmi to usb converters to
              1080p50<br>
              >><br>
              >> There is red button and above it filename input
              field. Put<br>
              >> path/filename there, hit Record, and it should
              start recording to that<br>
              >> file.<br>
              >><br>
              >> In case  you played with contrast/brightness
              settings (cingg uses its<br>
              >> own set for v4l devices) you can run guvcview and
              restore them to<br>
              >> their default values<br>
              >><br>
              >><br>
              >><br>
              >><br>
              >><br>
              >><br>
              >><br>
              <br>
            </blockquote>
          </div>
        </div>
      </div>
    </blockquote>
    <br>
  </div>

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