<div dir="auto"><div><br><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">вт, 16 июл. 2024 г., 19:12 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 16.07.2024 12:54, skrev Andrew
      Randrianasulu:<br>
    </div>
    <blockquote type="cite">
      <pre>Like this:

 mkfifo /dev/shm/renderfarm.y4m <-- random name from previous test

cin /home/admin/huawei_matepad_t/sdcard1/video/20200101_000443A.mp4

............</pre>
    </blockquote>
    <span style="white-space:pre-wrap">
</span>
    <blockquote type="cite">
      <pre>encoded 397 frames in 400.09s (0.99 fps), 4154.67 kb/s, Avg QP:32.22

=====

Initially i set cingg cache to low value like 16 Mb and  render
aborted at around 8 sec, then I set cache to 256 Mb and it finished
for complete 13 seconds/ 397 frames....

So, you can use external ffmpeg (and its array of encoders), or x265
directly this way. (if you use normal file it will be 4.7 Gb per 13
seconds of 4k30 video ...)
</pre>
    </blockquote>
    <br>
    The principle sounds interestingly. Although I'm used with simple
    pipes, I have never used fifo file (name pipes).<br>
    But a real case ("workshop") example could make it clearer for me. <br>
    <br>
    1. Will it be applicable for pre-built CinGG installed from
    appimages, or  from packages (einander) where "cin" can be started
    in a terminal ?<br></div></blockquote></div></div><div dir="auto"><br></div><div dir="auto">it should work in both, I tested this on system-wide installed ffmpeg-4.4 + cingg compiled statically with ffmpeg 7.0 and installed in /usr</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"><div>
    <br>
    2. And let CinGG utilize my "system" ffmpeg (from Packman) for qsv
    gpu hwaccel encoding?<br>
    <blockquote><font face="Courier New, Courier, monospace">ffmpeg
        -hide_banner -encoders | grep qsv</font><br>
      <font face="Courier New, Courier, monospace"> V.....
        av1_qsv              AV1 (Intel Quick Sync Video acceleration)
        (codec av1)</font><br>
      <font face="Courier New, Courier, monospace"> V.....
        h264_qsv             H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10
        (Intel Quick Sync Video acceleration) (codec h264)</font><br>
      <font face="Courier New, Courier, monospace"> V.....
        hevc_qsv             HEVC (Intel Quick Sync Video acceleration)
        (codec hevc)</font><br>
      <font face="Courier New, Courier, monospace"> V.....
        mjpeg_qsv            MJPEG (Intel Quick Sync Video acceleration)
        (codec mjpeg)</font><br>
      <font face="Courier New, Courier, monospace"> V.....
        mpeg2_qsv            MPEG-2 video (Intel Quick Sync Video
        acceleration) (codec mpeg2video)</font><br>
      <font face="Courier New, Courier, monospace"> V.....
        vp9_qsv              VP9 video (Intel Quick Sync Video
        acceleration) (codec vp9)</font></blockquote></div></blockquote></div></div><div dir="auto"><br></div><div dir="auto"><br></div><div dir="auto">well, just replace input file (after -i param)  for your system ffmpeg encode command line with this named fifo .....</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"><div><blockquote><br>
    </blockquote>
    <br>
    3. Suggestion to this pipe line setup and running av1_qsv encoding
    from CinGG Render .webm?<br>
    <br>
    </div></blockquote></div></div><div dir="auto"><br></div><div dir="auto">I do not think you can run it as webm, unless you want to encode both audio and video into single "output" stream ? Not sure, may be vc2 video codec (Dirac from BBC research) can be used for this? Encoding at cingg end and decoding at ffmpeg's input probably will slow down whole process too much ....</div><div dir="auto"><br></div><div dir="auto">General idea is to output video-only stream via y4m fifo, and then add audio exported separately.</div><div dir="auto"><br></div><div dir="auto">y4m is simple uncompressed video format, designed for interoperability between mjpegtools and other programs initially. Basically simple header telling programs frame size, pixel arrangement, fps ....</div><div dir="auto"><br></div><div dir="auto">I suggest to open two tabs in something like Konsole and make fifo file somewhere you easily can delete it ...</div><div dir="auto"><br></div><div dir="auto">I used /dev/shm, that should be tmpfs in ram.</div><div dir="auto"><br></div><div dir="auto">you create fifo, then run cin from same terminal, load your video, set render to ffmpeg, y4m and select as output filename just created fifo file. Then hit render. Everything here will wait until you connect ffmpeg from another terminal tab to same fifo </div><div dir="auto"><br></div><div dir="auto">You can just copy-paste your ffmpeg test command  and edit/replace filename after "-i" with fifo filename.</div><div dir="auto"><br></div><div dir="auto">With real fake  4k stream it was too slow for filming (screenrecording) at 6 min 40 sec, may he I'll try with 320*240 test file :)</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"><div><br>
    <br>
    <br>
    <br>
    <br>
    <br>
    <br>
    <br>
    <br>
  </div>

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