<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body>
<font face="Courier New, Courier, monospace"> I have no plan to
compete with our </font><font face="Courier New, Courier,
monospace"><span><span><span><font style="vertical-align:
inherit;"><font style="vertical-align: inherit;" class="">National
Library </font></font></span></span></span>located
locally here :)<br>
<a class="moz-txt-link-freetext"
href="https://www-nrk-no.translate.goog/nordland/her-skal-den-norske-kulturarven-bevares-i-evig-tid-1.16277933?_x_tr_sl=no&_x_tr_tl=en&_x_tr_hl=en&_x_tr_pto=sc">https://www-nrk-no.translate.goog/nordland/her-skal-den-norske-kulturarven-bevares-i-evig-tid-1.16277933?_x_tr_sl=no&_x_tr_tl=en&_x_tr_hl=en&_x_tr_pto=sc</a><br>
<br>
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 class="moz-txt-link-freetext" href="https://www.turascandinavia.com/en/products/computer/microphone-webcam/webcams/74257">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>
<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 class="moz-txt-link-freetext" href="https://www.ebay.com.au/itm/295472602625">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 class="moz-txt-link-freetext" href="https://trac.ffmpeg.org/wiki/Encode/FFV1">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 class="text-node"><br>
</span></font><font face="Courier New, Courier, monospace"><span
class="text-node">Check the overall flow using ffplay before
capturing:</span> </font>
<div class="language-plaintext highlighter-rouge"
data-pf_style_display="block" data-pf_style_visibility="visible">
<div class="highlight" data-pf_style_display="block"
data-pf_style_visibility="visible"> <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 class="moz-txt-link-freetext" href="http://www.av-rd.com/knowhow/video/comparison_video_codecs_containers.html#codec_tests">http://www.av-rd.com/knowhow/video/comparison_video_codecs_containers.html#codec_tests</a><br>
</font> </font></font>
<p></p>
<p></p>
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>
<p></p>
<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">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">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">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">log</a>, <a
href="http://www.av-rd.com/knowhow/video/test_results/football-720x486i30/ffv1.3-libavcodec_ffmpeg_avi.framemd5"
type="text/plain">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">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">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">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">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">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 class="moz-txt-link-freetext"
href="https://www.mail-archive.com/cin@lists.cinelerra-gg.org/msg02865.html">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 class="moz-txt-link-freetext"
href="https://www.mail-archive.com/cin@lists.cinelerra-gg.org/msg03269.html">https://www.mail-archive.com/cin@lists.cinelerra-gg.org/msg03269.html</a><br>
<br>
[Cin] offtopic: HDMI capture<br>
<a class="moz-txt-link-freetext"
href="https://www.mail-archive.com/cin@lists.cinelerra-gg.org/msg02084.html">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 class="moz-txt-link-freetext"
href="https://www.mail-archive.com/cin@lists.cinelerra-gg.org/msg03719.html">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 class="moz-txt-link-freetext"
href="https://www.mail-archive.com/cin@lists.cinelerra-gg.org/msg03791.html">https://www.mail-archive.com/cin@lists.cinelerra-gg.org/msg03791.html</a><br>
</font>
</body>
</html>