<br><br>On Monday, December 27, 2021, Terje J. Hanssen via Cin <<a href="mailto:cin@lists.cinelerra-gg.org">cin@lists.cinelerra-gg.org</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>
<font face="monospace"><br>
<br>
</font>
<div><font face="monospace">Den 26.12.2021
21:13, skrev Andrew Randrianasulu via Cin:<br>
</font></div>
<blockquote type="cite">
<font face="monospace"><br>
<br>
On Sunday, December 26, 2021, Phyllis Smith via Cin <<a href="mailto:cin@lists.cinelerra-gg.org" target="_blank">cin@lists.cinelerra-gg.org</a>>
wrote:<br>
</font>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div class="gmail_default" style="font-size:small"><font face="monospace">for now it seems only ffv1.avi defaults
to v.0 and mkv defaults to 3.4 <br>
</font></div>
</blockquote>
<div class="gmail_default" style="font-size:small"><font face="monospace">For now, how about if I just add a
comment to ffv1.mkv about level numbers? That way the
user will see this if they look and can decide for
themselves. Otherwise if we make every possible setting
available we will end up with millions of choices and then
if we have new ones labeled _3, when level 4 comes along
we would need even more as _4.<br>
</font></div>
</div>
</blockquote>
<div><font face="monospace"><br>
</font></div>
<div><font face="monospace">ok, add comment please} </font></div>
<div><font face="monospace"><br>
</font></div>
</blockquote>
<font face="monospace"><br>
Ok, maybe I'm thinking aload quite "outside the box" here with my
questions * below:<br>
<br>
I seems for me Cin-GG supports ffv1.mkv in two instances (did't
find other mentioned in the manual either):<br>
<br>
1) File > Save as: ffv1.mkv (that is save current edited
video from Cin-GG)<br>
<br>
and<br>
<br>
2) File > Record<br>
using Video compression according to <br>
<br>
Settings > Preferences > Record<br>
File format: FFMPEG mkv<br>
Video wrench: Compression: ffv1.mkv or user_ffv1.mkv<br>
<br>
* Could i.e the empty <Format box> here be used to input
levels and/or other user options?<br>
<br>
Further down on this window<br>
<br>
Video IN<br>
Record driver: i.e Video4Linux<br>
<br>
* Or possibly get BM Intensity/declink SDK card
working/integrated with ffmpeg/Cin-GG?</font></div><div></div></blockquote><div><br></div><div>if you find programmer familiar with both ends.. Cin-gg uses her own code for dealing with v4l2, not ffmpeg's. </div><div><br></div><div><a href="https://gist.github.com/afriza/879fed4ede539a5a6501e0f046f71463">https://gist.github.com/afriza/879fed4ede539a5a6501e0f046f71463</a></div><div><br></div><div>(sdk 12 should be compatible with ffmpeg 4.4?) </div><div><br></div><div>note --extra-cflags="-I$HOME/ffmpeg_build/include -I$HOME/ffmpeg_sources/BMD_SDK/include -I/usr/lib/cuda/include" \</div><div><br></div><div> and</div><div><br></div><div>--enable-nonfree \</div><div> --enable-decklink \</div><div><br></div><div>addditional confugure switches for ffmpeg (you can drop cuda includes if you do not have proprietary nvidia driver/card installed, if course) </div><div><br></div><div>---</div><div>List devices:</div><div><br></div><div>ffmpeg -f decklink -list_devices 1 -i dummy</div><div><br></div><div>List supported formats:</div><div><br></div><div>ffmpeg -f decklink -list_formats 1 -i 'DeckLink Quad HDMI Recorder (1)'</div><div><br></div><div>Capture Camera at 23.976fps to h264:</div><div><br></div><div>ffmpeg -y -thread_queue_size 90 -hwaccel cuda \</div><div>-channels 2 -raw_format yuv422p10 -format_code 23ps -f decklink -i 'DeckLink Quad HDMI Recorder (1)' \</div><div>-c:a pcm_s16le -c:v libx264 -preset ultrafast -crf 10 ~/camera264.mov</div><div><br></div><div>---</div><div><br></div><div>obviously you can try to just copy frames into mov for 'as uncompressed as possible' and hope your disk(s) will keep up! (I've heard stories some ssd dislike being full - their write speed drop down dramatically.. so try to write to not very full ssd. Not sure abount newer nvme.. or raids from them!) </div><div><br></div><div>from</div><div><br></div><div><a href="https://github.com/wonderunit/storyboarder/wiki/Recording-Live-Camera-and-Desktop-on-Linux-using-Blackmagic-Decklink">https://github.com/wonderunit/storyboarder/wiki/Recording-Live-Camera-and-Desktop-on-Linux-using-Blackmagic-Decklink</a></div><div><br></div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div></div><div><font face="monospace"><br>
<br>
* Get the option to preserve/archive transcoded ffv1.mkv
directly to a storage device?</font></div><div></div></blockquote><div><br></div><div>probably not? (no support for arbitrary compressed frames and their metadata in internal representation.. not impossible, but no one did it yet) </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div></div><div><font face="monospace"><br>
<br>
* And/or get the option to load /pipe (uncompressed) video
files recorded on one storage (SSD) device,<br>
compress it with the right preset ffv1.mkv and save it to
another storage device.</font></div><div></div></blockquote><div><br></div><div>should be default mode of operation for files (not sure about purely raw video w/o any container, apart from dvvideo, but some types of raw rgb/yuv in avi/mov should work.. test a bit?) , for piping... </div><div><br></div><div>try video loopback? </div><div><br></div><div><a href="https://github.com/umlaeute/v4l2loopback">https://github.com/umlaeute/v4l2loopback</a></div><div><br></div><div>it may even work for declink input, if your ffmpeg can input frames from declink and output to v4l2.. </div><div><br></div><div><br></div><div><a href="https://superuser.com/questions/1330959/what-is-the-right-ffmpeg-output-format-for-a-v4l2-loopback-device">https://superuser.com/questions/1330959/what-is-the-right-ffmpeg-output-format-for-a-v4l2-loopback-device</a></div><div><br></div><div>some variation of </div><div><br></div><div> ffmpeg examples</div><div>Grab desktop:</div><div><br></div><div>ffmpeg -f x11grab -framerate 25 -video_size 1280x720 -i :0.0+0,0 -f v4l2 /dev/video0</div><div>Send file:</div><div><br></div><div>ffmpeg -re -i input.mp4 -f v4l2 /dev/video0</div><div><br></div><div>or (in answers) </div><div><br></div><div>ffmpeg -f x11grab -r 60 -s 1920x1080 -i :0.0+0,0 -vcodec rawvideo -pix_fmt yuv420p -f v4l2 /dev/video0</div><div><br></div><div>guess you can try variation of such cmdline with declink input after compiling non-free ffmpeg with Blackmagick sdk... </div><div><br></div><div>we also probably can use such line for testing non-trivial v4l2 formats in Cinelerra-gg .. </div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>
<blockquote type="cite">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">
<div class="gmail_default" style="font-size:small"><font face="monospace"><br>
</font></div>
</div>
<font face="monospace"><br>
</font>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr"><font face="monospace">On
Sat, Dec 25, 2021 at 9:29 PM Andrew Randrianasulu via Cin
<<a href="mailto:cin@lists.cinelerra-gg.org" target="_blank">cin@lists.cinelerra-gg.org</a>>
wrote:<br>
</font></div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><font face="monospace"><br>
<br>
On Sunday, December 26, 2021, Terje J. Hanssen via Cin
<<a href="mailto:cin@lists.cinelerra-gg.org" target="_blank">cin@lists.cinelerra-gg.org</a>>
wrote:<br>
</font>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><font face="monospace"><br>
</font>
<font face="monospace"><br>
Den 25.12.2021 17:35, skrev Andrew Randrianasulu via
Cin:<br>
</font>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><font face="monospace">
seems to miss level=3 setting<br>
</font>
<font face="monospace"><br>
$ cat bin/ffmpeg/video/ffv1.avi<br>
avi ffv1<br>
$ cat bin/ffmpeg/video/ffv1.mkv<br>
matroska ffv1<br>
threads=8<br>
context=1<br>
slices=30<br>
$ cat bin/ffmpeg/video/ffv1.mov<br>
mov ffv1<br>
#coder=0<br>
context=1<br>
g=1<br>
level=3<br>
threads=16<br>
slices=16<br>
slicecrc=1<br>
#pass=2<br>
$<br>
</font>
<font face="monospace"><br>
not sure if we should modify our avi/mkv profikes or
add new (may be with _v3 name) ones?<br>
</font>
<font face="monospace"><br>
</font>
</blockquote>
<font face="monospace"><br>
Without own experience yet, I would ask if there any
reason to not use the latest and more feature rich FFV1
level=version 3? Backward compitibility, typical can v.
3 uncompress v. 1 compressed archives?</font></blockquote>
<div><font face="monospace"> </font></div>
<div><font face="monospace">good question... I have older
avplay (~2012) here and will test. </font></div>
<div><font face="monospace"><br>
</font></div>
<div><font face="monospace">for now it seems only ffv1.avi
defaults to v.0 and mkv defaults to 3.4 due to crc
protection per slice, i think (looked into ffmpeg
encoder source) </font></div>
<div><font face="monospace"><br>
</font></div>
<div><font face="monospace">{filenames were just that I had
in inputbox, not indicative of content} </font></div>
<div><font face="monospace"><br>
</font></div>
<div><font face="monospace"><br>
</font></div>
<div><font face="monospace">$ mediainfo ~/h265-p2.avi</font></div>
<div><font face="monospace">General</font></div>
<div><font face="monospace">Complete name :
/data/data/com.termux/files/</font><font face="monospace">ho<wbr>me/h265-p2.avi</font></div>
<div><font face="monospace">Format : AVI</font></div>
<div><font face="monospace">Format/Info : Audio Video
Interleave</font></div>
<div><font face="monospace">File size : 8.82 MiB</font></div>
<div><font face="monospace">Duration : 3 s 720 ms</font></div>
<div><font face="monospace">Overall bit rate mode : Variable</font></div>
<div><font face="monospace">Overall bit rate : 19.9 Mb/s</font></div>
<div><font face="monospace">Writing application :
Lavf58.76.100</font></div>
<div><font face="monospace"><br>
</font></div>
<div><font face="monospace">Video</font></div>
<div><font face="monospace">ID : 0</font></div>
<div><font face="monospace">Format : FFV1</font></div>
<div><font face="monospace">Format version : Version 0</font></div>
<div><font face="monospace">Codec ID : FFV1</font></div>
<div><font face="monospace">Duration : 3 s 720 ms</font></div>
<div><font face="monospace">Bit rate mode : Variable</font></div>
<div><font face="monospace">Bit rate : 19.9 Mb/s</font></div>
<div><font face="monospace">Width : 720 pixels</font></div>
<div><font face="monospace">Height : 576 pixels</font></div>
<div><font face="monospace">Display aspect ratio : 5:4</font></div>
<div><font face="monospace">Frame rate : 25.000 FPS</font></div>
<div><font face="monospace">Standard : PAL</font></div>
<div><font face="monospace">Color space : YUV</font></div>
<div><font face="monospace">Chroma subsampling : 4:2:0</font></div>
<div><font face="monospace">Bit depth : 8 bits</font></div>
<div><font face="monospace">Compression mode : Lossless</font></div>
<div><font face="monospace">Bits/(Pixel*Frame) : 1.916</font></div>
<div><font face="monospace">Stream size : 8.81 MiB (100%)</font></div>
<div><font face="monospace">coder_type : Golomb Rice</font></div>
<div><font face="monospace"><br>
</font></div>
<div><font face="monospace"><br>
</font></div>
<div><font face="monospace">$ mediainfo ~/h265-p2.mkv</font></div>
<div><font face="monospace">General</font></div>
<div><font face="monospace">Unique ID :
361468916052617614775298570411</font><font face="monospace"><wbr>4819283 (</font><font face="monospace">0x2B829EF6988D4EEDCB446A86122<wbr>1</font><font face="monospace">0D3)</font></div>
<div><font face="monospace">Complete name :
/data/data/com.termux/files/</font><font face="monospace">ho<wbr>me/h265-p2.mkv</font></div>
<div><font face="monospace">Format : Matroska</font></div>
<div><font face="monospace">Format version : Version 4</font></div>
<div><font face="monospace">File size : 7.48 MiB</font></div>
<div><font face="monospace">Duration : 3 s 80 ms</font></div>
<div><font face="monospace">Overall bit rate mode : Variable</font></div>
<div><font face="monospace">Overall bit rate : 20.4 Mb/s</font></div>
<div><font face="monospace">Writing application :
Lavf58.76.100</font></div>
<div><font face="monospace">Writing library : Lavf58.76.100</font></div>
<div><font face="monospace">ErrorDetectionType : Per level 1</font></div>
<div><font face="monospace"><br>
</font></div>
<div><font face="monospace">Video</font></div>
<div><font face="monospace">ID : 1</font></div>
<div><font face="monospace">Format : FFV1</font></div>
<div><font face="monospace">Format version : Version 3.4</font></div>
<div><font face="monospace">Codec ID : V_MS/VFW/FOURCC /
FFV1</font></div>
<div><font face="monospace">Duration : 3 s 80 ms</font></div>
<div><font face="monospace">Bit rate mode : Variable</font></div>
<div><font face="monospace">Bit rate : 20.0 Mb/s</font></div>
<div><font face="monospace">Width : 720 pixels</font></div>
<div><font face="monospace">Height : 576 pixels</font></div>
<div><font face="monospace">Display aspect ratio : 5:4</font></div>
<div><font face="monospace">Frame rate mode : Constant</font></div>
<div><font face="monospace">Frame rate : 25.000 FPS</font></div>
<div><font face="monospace">Standard : PAL</font></div>
<div><font face="monospace">Color space : YUV</font></div>
<div><font face="monospace">Chroma subsampling : 4:2:0</font></div>
<div><font face="monospace">Bit depth : 8 bits</font></div>
<div><font face="monospace">Scan type : Progressive</font></div>
<div><font face="monospace">Compression mode : Lossless</font></div>
<div><font face="monospace">Bits/(Pixel*Frame) : 1.927</font></div>
<div><font face="monospace">Stream size : 7.34 MiB (98%)</font></div>
<div><font face="monospace">Default : Yes</font></div>
<div><font face="monospace">Forced : No</font></div>
<div><font face="monospace">Color range : Full</font></div>
<div><font face="monospace">Matrix coefficients : BT.470
System B/G</font></div>
<div><font face="monospace">coder_type : Golomb Rice</font></div>
<div><font face="monospace">MaxSlicesCount : 30</font></div>
<div><font face="monospace">ErrorDetectionType : Per slice</font></div>
<div><font face="monospace"><br>
</font></div>
<div><font face="monospace"><br>
</font></div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<font face="monospace"><br>
I conclude that a couple of referense papers on the web
say and use level 3 in their profile/presets:<br>
</font>
<font face="monospace"><br>
1) Video into Matroska/FFV1<br>
</font>
<font face="monospace"><a href="https://avpres.net/FFmpeg/im_FFV1.html" target="_blank">https://avpres.net/FFmpeg/im_F<wbr>FV1.html</a><br>
</font>
<font face="monospace"><br>
We advise to use only the version 3 of FFV1 in
production, because the version 1 is deprecated, the
version 2 has never really existed, and the version 4 is
currently under development.<br>
</font>
<font face="monospace"><br>
</font>
<font face="monospace"><br>
Transcode a video file using the FFV1 codec into the
Matroska container for preservation purposes.<br>
Solution<br>
</font>
<font face="monospace"><br>
ffmpeg \<br>
-i input_file \<br>
-c:v ffv1 \<br>
-level 3 \<br>
-coder 1 \<br>
-context 1 \<br>
-g 1 \<br>
-slices 24 \<br>
-slicecrc 1 \<br>
-c:a copy \<br>
output_file.mkv<br>
</font>
<font face="monospace"><br>
2) Presets for FFV1 and MKV: Choosing the right
parameters for the job (ffv1_params.pdf)<br>
</font>
<font face="monospace"><a href="https://docs.google.com/viewer?url=https%3A%2F%2Fmediaarea.net%2FEvents%2F2019-12-05_NoTimeToWait4%2F03.%2520Peter%2520B.%2520-%2520Presets%2520for%2520FFV1%2520and%2520MKV%2C%2520Choosing%2520the%2520right%2520parameters%2520for%2520the%2520job%2Fffv1_params.pdf&pdf=true" target="_blank">https://docs.google.com/viewer<wbr>?url=https%3A%2F%2Fmediaarea.<wbr>net%2FEvents%2F2019-12-05_<wbr>NoTimeToWait4%2F03.%2520Peter%<wbr>2520B.%2520-%2520Presets%<wbr>2520for%2520FFV1%2520and%<wbr>2520MKV%2C%2520Choosing%<wbr>2520the%2520right%<wbr>2520parameters%2520for%<wbr>2520the%2520job%2Fffv1_params.<wbr>pdf&pdf=true</a><br>
</font>
<font face="monospace"><br>
Level = FFV1 version<br>
page 9 (of 30)<br>
</font>
<font face="monospace"><br>
0<br>
1 (Default)<br>
3 (Recommended)<br>
</font>
<font face="monospace"><br>
</font>
<font face="monospace"><br>
FFmpeg recipe (PAL)<br>
page 27 (of 30)<br>
</font>
<font face="monospace"><br>
ffmpeg -i VIDEO_IN \<br>
-c:v ffv1 -level 3 -coder 1 -context 0 -slices 24
-slicecrc 1 \<br>
-color_primaries bt470bg \<br>
-color_trc bt709 \<br>
-colorspace bt470bg \<br>
-color_range mpeg \<br>
-map 0 \<br>
-top 1 \<br>
-c:a copy \<br>
-g 1 -pix_fmt + \<br>
VIDEO_OUT.mkv<br>
</font>
<font face="monospace"><br>
</font>
<font face="monospace"><br>
</font>
<font face="monospace"><br>
</font>
<font face="monospace"><br>
</font>
<font face="monospace"><br>
</font>
<font face="monospace"><br>
</font>
<font face="monospace"><br>
</font>
<font face="monospace"><br>
</font>
<font face="monospace"><br>
</font>
<font face="monospace"><br>
</font>
<font face="monospace"><br>
-- <br>
Cin mailing list<br>
</font>
<font face="monospace"><a href="mailto:Cin@lists.cinelerra-gg.org" target="_blank">Cin@lists.cinelerra-gg.org</a><br>
</font>
<font face="monospace"><a href="https://lists.cinelerra-gg.org/mailman/listinfo/cin" target="_blank">https://lists.cinelerra-gg.org<wbr>/mailman/listinfo/cin</a><br>
</font>
</blockquote>
<font face="monospace">
-- <br>
Cin mailing list<br>
</font>
<font face="monospace"><a href="mailto:Cin@lists.cinelerra-gg.org" target="_blank">Cin@lists.cinelerra-gg.org</a><br>
</font>
<font face="monospace"><a href="https://lists.cinelerra-gg.org/mailman/listinfo/cin" rel="noreferrer" target="_blank">https://lists.cinelerra-gg.org<wbr>/mailman/listinfo/cin</a><br>
</font>
</blockquote>
</div>
</blockquote>
<font face="monospace"><br>
</font>
<fieldset></fieldset>
</blockquote>
<font face="monospace"><br>
</font>
</div>
</blockquote>