[Cin] DV50 - the forgotten optimal codec for digitizing analog Hi8/S-video ?
Andrew Randrianasulu
randrianasulu at gmail.com
Fri Jun 13 23:53:48 CEST 2025
сб, 14 июн. 2025 г., 00:48 Terje J. Hanssen <terjejhanssen at gmail.com>:
>
>
> Den 13.06.2025 05:37, skrev Andrew Randrianasulu:
>
>
>
> чт, 12 июн. 2025 г., 23:33 Terje J. Hanssen <terjejhanssen at gmail.com>:
>
>>
>>
>> Den 12.06.2025 19:01, skrev Andrew Randrianasulu:
>>
>>
>>
>> чт, 12 июн. 2025 г., 19:45 Terje J. Hanssen via Cin <
>> cin at lists.cinelerra-gg.org>:
>>
>>> I have made another working ffmpeg command line without "-target
>>> pal-dv50" as seen below, and tried here to
>>> make a video preset for CinGG , but got errors and have questions:
>>>
>>> A related example:
>>> Is it a reason why Cingg preset for DVD doesn't use "-target pal-dvd"
>>> that I have used with ffmpeg before?
>>>
>>
>> I am not sure if this is 'composite' command line switch for ffmpeg as
>> command line application or you can use it in our profiles.
>>
>> try and tell us now it works?
>>
>>
>> Not sure I understood what you meant here. But I did base my FFmpeg
>> command line on presets from WinFF, i.e for "PAL DVD HQ Fullscreen":
>> -f dvd -target pal-dvd -aspect 4:3 -vb 8000k -mbd rd -trellis 1
>> -flags +mv0 -cmp 0 -subcmp 2
>>
>> As seen above, this WinFF preset make use of the related "-f dvd -target
>> pal-dvd"
>> https://www.mail-archive.com/cin@lists.cinelerra-gg.org/msg05766.html
>>
>> In comparison Cingg's preset doesn't use ffmpeg's dvd target
>>
>
> *I think* -target just set bunch of parameters at once. So not really
> needed if you set them individually in preset.
>
>
>
>> cat dvd.dvd
>>
>> dvd mpeg2video
>> s 720x480
>> r 30000/1001
>> pixel_format yuv420p
>> g 18
>> maxrate 9000000
>> minrate 0
>> bufsize 1835008
>> packetsize 2048
>> cin_bitrate=8000000
>>
>> --------------------------
>>
>> dv50_pal.mov
>> mov dvvideo
>> # cin_pix_fmt=yuv422p
>> # cin_scale=720x576
>> # r=50
>>
>> there is
>>
>> ffmpeg/video/dv_pal.qt
>>
>> try it?
>>
>>
>> Yeah, thanks for this tip which looks good, interesting and promising ;)
>>
>> I noticed also this preset, but didn't bench test it. Now, seemingly
>> ".qt" tells me it means "quick-time" (not qt gui)
>>
>> cat dv_pal.qt
>>
>> mov dvvideo
>> cin_pix_fmt=yuv420p
>> field_order=bb
>> # 720x576, 25 fps
>>
>> ----------
>>
>> Applications/CinGG-20250430-x86_64.AppImage
>> Cinelerra Infinity - built: Apr 30 2025 07:18:32
>> git://git.cinelerra-gg.org/goodguy/cinelerra.git
>>
>> -------
>> Shift P:
>> FFMPEG qt
>>
>> Audio wrench:
>> pcm_s16le
>> Video wrench:
>> dv_pal.qt
>> yuv422p
>>
>> Video4Linux /dev/video0
>> 30 frames to record at a time (default, correct? should it be set to
>> 50fps?)
>>
>> 720 x 576
>> 50.000 frame rate for recording
>>
>> r(ecording)
>> Start record:
>>
>> DeviceV4L2Base::v4l2_open pixels="YUYV"; res="1920x1080 1600x1200
>> 1360x768 1280x1024 1280x960 1280x720 1024x768 800x600 720x576 720x480
>> 640x480"
>> v4l2 s_fmt 720x576 YUYV
>> DeviceV4L2Base::v4l2_open VIDIOC_S_STD: Inappropriate ioctl for device
>>
>> -----------
>>
>> And interestingly, the short cam test with Sony TR2000 Hi8 PAL connected
>> via the A/D converter, the result also looks promising :)
>>
>> ---------
>>
>> ffprobe -hide_banner Cgg_dv_pal+pcm.qt
>>
>> Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'Cgg_dv_pal+pcm.qt':
>> Metadata:
>> major_brand : qt
>> minor_version : 512
>> compatible_brands: qt
>> encoder : Lavf61.1.100
>> Duration: 00:00:11.06, start: 0.000000, bitrate: 116736 kb/s
>> Stream #0:0[0x1]: Video: dvvideo (dv5p / 0x70357664), yuv422p(bottom
>> first), 720x576 [SAR 16:15 DAR 4:3], 57600 kb/s, 50 fps, 50 tbr, 12800 tbn
>> (default)
>> Metadata:
>> handler_name : VideoHandler
>> vendor_id : FFMP
>> Stream #0:1[0x2]: Audio: pcm_s16le (sowt / 0x74776F73), 48000 Hz,
>> stereo, s16, 1536 kb/s (default)
>> Metadata:
>> handler_name : SoundHandler
>> vendor_id : [0][0][0][0]
>>
>> --------
>>
>
> A dv vs dv50 squiz:
>
> DV: yuv420(pal) - ca, 25Mbit/s (video) - 25 FPS
> DV50; yuv422 - ca 50Mbit/s (video) - 25 FPS
>
> I have also read that DV50 may be interpreted as 2 DV streams in
> parallell.
>
>
> But what happened by selecting framerate 50 fps in CinGG, when
>
> ffprobe above say 57600 kb/s, 50 fps
>
> and mediainfo below say
>
> Overall bit rate : 117 Mb/s
> Bit rate (video) : 24.4 Mb/s
> Frame rate : 50.000 FPS
> Original frame rate : 25.000 FPS
> Scan type : Interlaced !!?
> Scan type, store method : Separated fields (2 fields per
> block)
>
> Is the latter Separated fields 2 interlaced fields each odd and even lines
> that simulates a progressive 50 FPS video?
>
sorry, no idea here.
Depend on your source and Project settings it probably still means
interlaced, because we do not do auto-deinterlacing, or fields to frames
conversion.
Watch output file frame by frame, I think it will remain interlaced.
>
>
>
>> mediainfo Cgg_dv_pal+pcm.qt
>> General
>> Complete name : Cgg_dv_pal+pcm.qt
>> Format : MPEG-4
>> Format profile : QuickTime
>> Codec ID : qt 0000.02 (qt )
>> File size : 154 MiB
>> Duration : 11 s 60 ms
>> Overall bit rate mode : Constant
>> Overall bit rate : 117 Mb/s
>> Frame rate : 50.000 FPS
>> Writing application : Lavf61.1.100
>> FileExtension_Invalid : braw mov mp4 m4v m4a m4b m4p
>> m4r 3ga 3gpa 3gpp 3gp 3gpp2 3g2 k3g jpm jpx mqv ismv isma ismt f4a f4b f4v
>>
>> Video
>> ID : 1
>> Format : DV
>> Codec ID : dv5p
>> Duration : 11 s 60 ms
>> Bit rate mode : Constant
>> Bit rate : 24.4 Mb/s
>> Width : 720 pixels
>> Height : 576 pixels
>> Display aspect ratio : 4:3
>> Frame rate mode : Constant
>> Frame rate : 50.000 FPS
>> Original frame rate : 25.000 FPS
>> Standard : PAL
>> Color space : YUV
>> Chroma subsampling : 4:2:2
>> Bit depth : 8 bits
>> Scan type : Interlaced !!?
>> Scan type, store method : Separated fields (2 fields per
>> block)
>> Scan order : Bottom Field First
>> Compression mode : Lossy
>> Bits/(Pixel*Frame) : 1.179
>> Stream size : 32.2 MiB (21%)
>>
>> Audio
>> ID : 2
>> Format : PCM
>> Format settings : Little / Signed
>> Codec ID : sowt
>> Duration : 11 s 42 ms
>> Bit rate mode : Constant
>> Bit rate : 1 536 kb/s
>> Channel(s) : 2 channels
>> Channel layout : L R
>> Sampling rate : 48.0 kHz
>> Bit depth : 16 bits
>> Stream size : 2.02 MiB (1%)
>> Default : Yes
>> Alternate group : 1
>>
>>
>>
>>
>>
>>
>>> Shift P:
>>> FFMPEG mov
>>>
>>> Audio wrench enabled first: Didn't find simple pcm_s16le and tried
>>> dnxhr_pcm_s16.mov, but got mismatch and disabled it
>>> Video wrench: dv50p.mov
>>>
>>> Video4Linux /dev/video0
>>> 50 frames to record at a time
>>> 720 x 576
>>> 50.000 frame reate for recording
>>>
>>> r(ecording)
>>> Start record:
>>>
>>> cin
>>> Cinelerra Infinity - built: May 18 2025 05:16:59
>>> ........
>>>
>>> DeviceV4L2Base::v4l2_open pixels="YUYV"; res="1920x1080 1600x1200
>>> 1360x768 1280x1024 1280x960 1280x720 1024x768 800x600 720x576 720x480
>>> 640x480"
>>> v4l2 s_fmt 720x576 YUYV
>>> DeviceV4L2Base::v4l2_open VIDIOC_S_STD: Inappropriate ioctl for device
>>> int FFMPEG::init_encoder(const char*):
>>> mismatch audio/video file format: /home/terje/Videos//DV50p_pal.mov
>>>
>>> DeviceV4L2Base::v4l2_open pixels="YUYV"; res="1920x1080 1600x1200
>>> 1360x768 1280x1024 1280x960 1280x720 1024x768 800x600 720x576 720x480
>>> 640x480"
>>> v4l2 s_fmt 720x576 YUYV
>>> DeviceV4L2Base::v4l2_open VIDIOC_S_STD: Inappropriate ioctl for device
>>> [AVFormatContext @ 0x7f6aa81d0080] Requested output format
>>> 'dv50p_pal.mov' is not known.
>>> int FFMPEG::init_encoder(const char*):
>>> failed: /home/terje/Videos//DV50p_pal.mov
>>>
>>> DeviceV4L2Base::v4l2_open pixels="YUYV"; res="1920x1080 1600x1200
>>> 1360x768 1280x1024 1280x960 1280x720 1024x768 800x600 720x576 720x480
>>> 640x480"
>>> v4l2 s_fmt 720x576 YUYV
>>> DeviceV4L2Base::v4l2_open VIDIOC_S_STD: Inappropriate ioctl for device
>>> [AVFormatContext @ 0x7f6aa81ad0c0] Requested output format
>>> 'dv50p_pal.mov' is not known.
>>> int FFMPEG::init_encoder(const char*):
>>> failed: /home/terje/Videos//DV50p_pal.mov
>>> DeviceV4L2Base::v4l2_open pixels="YUYV"; res="1920x1080 1600x1200
>>> 1360x768 1280x1024 1280x960 1280x720 1024x768 800x600 720x576 720x480
>>> 640x480"
>>> v4l2 s_fmt 720x576 YUYV
>>>
>>> --------------------
>>>
>>> ffmpeg -hide_banner -f v4l2 -i /dev/video0 -f alsa -ch_layout stereo -i
>>> hw:CARD=UHD,DEV=0 -c:v dvvideo -vf scale=720x576 -r 50 -c:a copy -t 10 -f
>>> mov dv_r50+pcm.mov
>>>
>>> Input #0, video4linux2,v4l2, from '/dev/video0':
>>> Duration: N/A, start: 538.465207, bitrate: 1990656 kb/s
>>> Stream #0:0: Video: rawvideo (YUY2 / 0x32595559), yuyv422, 1920x1080,
>>> 1990656 kb/s, 60 fps, 60 tbr, 1000k tbn
>>> Input #1, alsa, from 'hw:CARD=UHD,DEV=0':
>>> Duration: N/A, start: 1749738351.392999, bitrate: 1536 kb/s
>>> Stream #1:0: Audio: pcm_s16le, 48000 Hz, stereo, s16, 1536 kb/s
>>> Stream mapping:
>>> Stream #0:0 -> #0:0 (rawvideo (native) -> dvvideo (native))
>>> Stream #1:0 -> #0:1 (copy)
>>> Press [q] to stop, [?] for help
>>> [dvvideo @ 0x7f2298705c80] Only top-left chroma location is supported in
>>> DV, input value is: unspecified
>>> ----
>>> frame= 476 fps= 50 q=-0.0 size= 135168KiB time=00:00:09.50
>>> bitrate=116553.7kbits/s dup=0 drop=94 speed= 1x [out#0/mov @
>>> 0x55b8598e3700] video:140625KiB audio:1875KiB subtitle:0KiB other
>>> streams:0KiB global headers:0KiB muxing overhead: 0.026882%
>>>
>>> frame= 500 fps= 50 q=-0.0 Lsize= 142539KiB time=00:00:10.00
>>> bitrate=116767.6kbits/s dup=0 drop=98 speed=0.999x
>>>
>>> --------
>>>
>>> du -sh dv*
>>> 140M dv_50M+pcm.mov
>>> 140M dv_r50_50M+pcm.mov
>>> 140M dv_r50+pcm.mov
>>>
>>> -----
>>>
>>> ffprobe -hide_banner dv_r50+pcm.mov
>>>
>>> Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'dv_r50+pcm.mov':
>>> Metadata:
>>> major_brand : qt
>>> minor_version : 512
>>> compatible_brands: qt
>>> encoder : Lavf61.7.100
>>> Duration: 00:00:10.00, start: 0.000000, bitrate: 116749 kb/s
>>> Stream #0:0[0x1]: Video: dvvideo (dv5p / 0x70357664),
>>> yuv422p(progressive), 720x576 [SAR 16:15 DAR 4:3], 57600 kb/s, 50 fps, 50
>>> tbr, 12800 tbn (default)
>>> Metadata:
>>> handler_name : VideoHandler
>>> vendor_id : FFMP
>>> encoder : Lavc61.19.101 dvvideo
>>> Stream #0:1[0x2]: Audio: pcm_s16le (sowt / 0x74776F73), 48000 Hz,
>>> stereo, s16, 1536 kb/s (default)
>>> Metadata:
>>> handler_name : SoundHandler
>>> vendor_id : [0][0][0][0
>>>
>>> --------------
>>>
>>> mediainfo dv_r50+pcm.mov
>>> General
>>> Complete name : dv_r50+pcm.mov
>>> Format : MPEG-4
>>> Format profile : QuickTime
>>> Codec ID : qt 0000.02 (qt )
>>> File size : 139 MiB
>>> Duration : 10 s 2 ms
>>> Overall bit rate mode : Constant
>>> Overall bit rate : 117 Mb/s
>>> Frame rate : 50.000 FPS
>>> Writing application : Lavf61.7.100
>>>
>>> Video
>>> ID : 1
>>> Format : DV
>>> Codec ID : dv5p
>>> Duration : 10 s 0 ms
>>> Bit rate mode : Constant
>>> Bit rate : 24.4 Mb/s
>>> Width : 720 pixels
>>> Height : 576 pixels
>>> Display aspect ratio : 4:3
>>> Frame rate mode : Constant
>>> Frame rate : 50.000 FPS
>>> Original frame rate : 25.000 FPS
>>> Standard : PAL
>>> Color space : YUV
>>> Chroma subsampling : 4:2:2
>>> Bit depth : 8 bits
>>> Scan type : Progressive
>>> Original scan type : Interlaced
>>> Original scan order : Bottom Field First
>>> Compression mode : Lossy
>>> Bits/(Pixel*Frame) : 1.179
>>> Stream size : 29.1 MiB (21%)
>>> Writing library : Lavc61.19.101 dvvideo
>>>
>>> Audio
>>> ID : 2
>>> Format : PCM
>>> Format settings : Little / Signed
>>> Codec ID : sowt
>>> Duration : 10 s 2 ms
>>> Bit rate mode : Constant
>>> Bit rate : 1 536 kb/s
>>> Channel(s) : 2 channels
>>> Channel layout : L R
>>> Sampling rate : 48.0 kHz
>>> Bit depth : 16 bits
>>> Stream size : 1.83 MiB (1%)
>>> Default : Yes
>>> Alternate group : 1
>>>
>>> --
>>> Cin mailing list
>>> Cin at lists.cinelerra-gg.org
>>> https://lists.cinelerra-gg.org/mailman/listinfo/cin
>>>
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.cinelerra-gg.org/pipermail/cin/attachments/20250614/e59a3d9b/attachment-0001.htm>
More information about the Cin
mailing list