<br><br>On Sunday, December 26, 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"><br>
<br>
Den 25.12.2021 17:35, skrev Andrew Randrianasulu via Cin:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
seems to miss level=3 setting<br>
<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>
<br>
not sure if we should modify our avi/mkv profikes or add new (may be with _v3 name) ones?<br>
<br>
</blockquote>
<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?</blockquote><div> </div><div>good question... I have older avplay (~2012) here and will test. </div><div><br></div><div>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) </div><div><br></div><div>{filenames were just that I had in inputbox, not indicative of content} </div><div><br></div><div><br></div><div>$ mediainfo ~/h265-p2.avi</div><div>General</div><div>Complete name : /data/data/com.termux/files/home/h265-p2.avi</div><div>Format : AVI</div><div>Format/Info : Audio Video Interleave</div><div>File size : 8.82 MiB</div><div>Duration : 3 s 720 ms</div><div>Overall bit rate mode : Variable</div><div>Overall bit rate : 19.9 Mb/s</div><div>Writing application : Lavf58.76.100</div><div><br></div><div>Video</div><div>ID : 0</div><div>Format : FFV1</div><div>Format version : Version 0</div><div>Codec ID : FFV1</div><div>Duration : 3 s 720 ms</div><div>Bit rate mode : Variable</div><div>Bit rate : 19.9 Mb/s</div><div>Width : 720 pixels</div><div>Height : 576 pixels</div><div>Display aspect ratio : 5:4</div><div>Frame rate : 25.000 FPS</div><div>Standard : PAL</div><div>Color space : YUV</div><div>Chroma subsampling : 4:2:0</div><div>Bit depth : 8 bits</div><div>Compression mode : Lossless</div><div>Bits/(Pixel*Frame) : 1.916</div><div>Stream size : 8.81 MiB (100%)</div><div>coder_type : Golomb Rice</div><div><br></div><div><br></div><div>$ mediainfo ~/h265-p2.mkv</div><div>General</div><div>Unique ID : 3614689160526176147752985704114819283 (0x2B829EF6988D4EEDCB446A8612210D3)</div><div>Complete name : /data/data/com.termux/files/home/h265-p2.mkv</div><div>Format : Matroska</div><div>Format version : Version 4</div><div>File size : 7.48 MiB</div><div>Duration : 3 s 80 ms</div><div>Overall bit rate mode : Variable</div><div>Overall bit rate : 20.4 Mb/s</div><div>Writing application : Lavf58.76.100</div><div>Writing library : Lavf58.76.100</div><div>ErrorDetectionType : Per level 1</div><div><br></div><div>Video</div><div>ID : 1</div><div>Format : FFV1</div><div>Format version : Version 3.4</div><div>Codec ID : V_MS/VFW/FOURCC / FFV1</div><div>Duration : 3 s 80 ms</div><div>Bit rate mode : Variable</div><div>Bit rate : 20.0 Mb/s</div><div>Width : 720 pixels</div><div>Height : 576 pixels</div><div>Display aspect ratio : 5:4</div><div>Frame rate mode : Constant</div><div>Frame rate : 25.000 FPS</div><div>Standard : PAL</div><div>Color space : YUV</div><div>Chroma subsampling : 4:2:0</div><div>Bit depth : 8 bits</div><div>Scan type : Progressive</div><div>Compression mode : Lossless</div><div>Bits/(Pixel*Frame) : 1.927</div><div>Stream size : 7.34 MiB (98%)</div><div>Default : Yes</div><div>Forced : No</div><div>Color range : Full</div><div>Matrix coefficients : BT.470 System B/G</div><div>coder_type : Golomb Rice</div><div>MaxSlicesCount : 30</div><div>ErrorDetectionType : Per slice</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">
<br>
I conclude that a couple of referense papers on the web say and use level 3 in their profile/presets:<br>
<br>
1) Video into Matroska/FFV1<br>
<a href="https://avpres.net/FFmpeg/im_FFV1.html" target="_blank">https://avpres.net/FFmpeg/im_F<wbr>FV1.html</a><br>
<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>
<br>
<br>
Transcode a video file using the FFV1 codec into the Matroska container for preservation purposes.<br>
Solution<br>
<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>
<br>
2) Presets for FFV1 and MKV: Choosing the right parameters for the job (ffv1_params.pdf)<br>
<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>
<br>
Level = FFV1 version<br>
page 9 (of 30)<br>
<br>
0<br>
1 (Default)<br>
3 (Recommended)<br>
<br>
<br>
FFmpeg recipe (PAL)<br>
page 27 (of 30)<br>
<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>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
-- <br>
Cin mailing list<br>
<a href="mailto:Cin@lists.cinelerra-gg.org" target="_blank">Cin@lists.cinelerra-gg.org</a><br>
<a href="https://lists.cinelerra-gg.org/mailman/listinfo/cin" target="_blank">https://lists.cinelerra-gg.org<wbr>/mailman/listinfo/cin</a><br>
</blockquote>