pifordinner wrote: ↑Mon Mar 04, 2019 5:40 pm
1. I don't
have to use UV4L, can I definitely achieve what I need with V4L2?
(I've spoken with Jurgen and his team, you may be the best source of wisdom on this)
- Use of raspivid is TOTALLY UNSUPPORTED.
- The RPT bcm2835-v4l2 v4L2 driver is sitting on top of the same driver as raspivid, therefore is also TOTALLY UNSUPPORTED.
- UV4L has two modes of operation. One (uv4l-raspicam) talks to the same driver as raspivid, so 2 guesses at the support level of that. The other (–tc358743) talks directly to the hardware. All support for that has to come from RpiName.
- The Linux kernel bcm2835-unicam V4L2 driver with tc358743 (the chip on the B101) driver is supported, but it needs some extra work with the application as it only delivers raw video frames (no H264 encoding).
- The bcm2835_codec V4L2 memory to memory codec drivers are supported, and can cover the functionality gap between bcm2835-unicam and raspivid if used with recent versions of GStreamer or ffmpeg. I've mainly tested with GStreamer as it just worked.
On each boot you need to provide the B101 with an EDID file so that your HDMI source knows what resolutions and frame rates are supported. There's a suitable file at
https://github.com/6by9/yavta/blob/mast ... 50EDID.txt. Use "v4l2-ctl --set-edid file=1080P50EDID.txt --fix-edid-checksums" to load that up.
You also need to run "v4l2-ctl --set-dv-bt-timings query" before running GStreamer or ffmpeg. This sets the resolution to that detected at the HDMI input (neither support automatically setting the timings, nor changing them should the source change).
For GStreamer, "gst-launch -vvv -e v4l2src io-mode=4 ! v4l2h264enc output-io-mode=5 ! matroskamux ! filesink location=file.mkv" should save you a suitable file.
I did get audio capture working too, but I haven't got the commands to hand (it's on the
very long thread for tc358743)
pifordinner wrote:2. Before I patch ffmpeg, could you please help me understand what kernel and ffmpeg version I should be running?
Raspbian should be going to 4.19 in the next month or so, so the V4L2 codec drivers and direct TC358743 support will be there as standard.
ffmpeg version - totally up to you.
Software Engineer at Raspberry Pi Ltd. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.