0

Here's the setup, I have an Acer Aspire 5 (mobile Ryzen 3, integrated graphics) running Manjaro (don't ask) a 4Kp24/1080p60 mirrorless dslr camera and an Elgato Camlink 4K usb dongle.

Understandably, the Acer cannot encode very well at all... so to avoid the mess of crummy compression... I'm not compressing it! (Well I sort of want to, but yeah...)

Right now, my laptop can handle writing the stream somewhat, but it often skips around... What I need to know: How do I drop every other frame? (Using -c copy doesn't allow filters... and -r 30 doesn't do anything.)

How do I limit the bitrate? The Camlink stream is 200Mbits/s and I need to record for 50 minutes at least so I'm concerned about file size, but if it will fit reasonably in 80GiBs of space then whatever. (Just setting -b:v 25M seemed like it was working? Though, I'm not sure of the implications of that)

Is it at all possible to use FFMPEG to stream the file across Ethernet to a different computer using FFMPEG to encode on it? (Additionally, Idk if I'd try it, but if I can get wifi would it be efficient to portforward a port on my router and upload over the internet???)

Lastly, what file type should I save the stream as? Trying .raw didn't work, but if over the internet is a reasonable option then this won't matter right?

Thanks in advance for your help. Here's the most functional set of command options I've tried...

ffmpeg -vaapi_device /dev/dri/renderD128 -f v4l2 -i /dev/video2 -c copy -b:v 20M -r:v 30 capture.mkv

Edit: I forgot to mention, but I have a MUCH better computer at home (Ryzen 9 3900x, RTX 3080), this is so I can record lectures and bring back footage to edit and finalize.

  • 1
    You might be able to set the preferred frame rate using `-framerate` on input, so specified before the `-i` argument. For the encoding part, what kind of integrated graphics processor do you have? Some do support H.264/H.265 hardware accelerated encoding, in which case see [this wiki page](https://trac.ffmpeg.org/wiki/HWAccelIntro). – aergistal Oct 04 '21 at 09:06
  • @aergistal It's vega 3, it does support hardware encoding, but it is... terrible. The markers on the whiteboard end up as pixelated blobs. Hence why I'm looking to do the encoding on my desktop when I get home. Your suggestion doesn't seem to change anything, the output still states 60fps (59.94). Additionally, while the bitrate says 20000 kb/s, it wildly fluctuates well above that... – Blue1.644934 Oct 04 '21 at 10:22
  • You can't [stream copy](https://ffmpeg.org/ffmpeg.html#Stream-copy) (`-c copy`) and encode or filter (`-b:v 20M -r:v 30`) the same stream at the same time. That's why `-b:v 20M -r:v 30` are being ignored when you use `-c copy`. As aergistal mentioned you may be able to set the frame rate, video size, and format at the V4L2 level. See [FFmpeg V4L2 input docs](https://ffmpeg.org/ffmpeg-devices.html#video4linux2_002c-v4l2). Show the complete output of `v4l2-ctl --device /dev/video2 --list-formats-ext` – llogan Oct 04 '21 at 16:53
  • Maybe consider an archival codec like [FFV1](https://trac.ffmpeg.org/wiki/Encode/FFV1) (losseless) or [ProRes](https://ffmpeg.org/ffmpeg-codecs.html#ProRes). You'll need to see what you get in terms of performance and file size. – aergistal Oct 05 '21 at 14:44

0 Answers0