jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 22660
Joined: Sat Jul 30, 2011 7:41 pm

Re: HDMI to CSI-2 via TC358743 on kernel 4.1

Fri Jun 21, 2019 8:30 am

custardpi wrote:
Thu Jun 20, 2019 11:28 pm
I'm sorry for piggybacking on this thread but I felt like since this is still such an active discussion it would be better posting here than creating a new thread.

When looking for ways to cheaply stream HDMI to twitch I came across the Twitch O Matic on hackster.io which gives instructions and code for implementing it. However, those use a Raspi 0 W with a B102 and while the instructions mention that the Raspi 3 can be used with a B101 the instructions and walkthrough also require the use of raspivid, which I read earlier in this thread does not work with with the B101, at least as of April 2018.

Has that changed at all? Is there a viable solution for me to use a Raspi 3 with a B101 and stream to twitch? I am wondering because I already have a Raspi 3 and am about to buy a B101 but if that doesn't work for this I'll need to buy the B102 and a Raspi 0 W. Thanks in advance for any help!
It is always better to start a new thread.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed. Here's an example...
"My grief counseller just died, luckily, he was so good, I didn't care."

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 6864
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: HDMI to CSI-2 via TC358743 on kernel 4.1

Fri Jun 21, 2019 9:06 am

custardpi wrote:
Thu Jun 20, 2019 11:28 pm
When looking for ways to cheaply stream HDMI to twitch I came across the Twitch O Matic on hackster.io which gives instructions and code for implementing it. However, those use a Raspi 0 W with a B102 and while the instructions mention that the Raspi 3 can be used with a B101 the instructions and walkthrough also require the use of raspivid, which I read earlier in this thread does not work with with the B101, at least as of April 2018.

Has that changed at all? Is there a viable solution for me to use a Raspi 3 with a B101 and stream to twitch? I am wondering because I already have a Raspi 3 and am about to buy a B101 but if that doesn't work for this I'll need to buy the B102 and a Raspi 0 W. Thanks in advance for any help!
raspivid support has not changed - it's there and believed working, but not supported. If it works for you then fine, but if you have issues then I'm not investigating.

The B101 and B102 only really differ in the connector (the B102 does also allow 4 CSI lanes on a Compute Module, which then allows receiving 1080p60).
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 6864
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: HDMI to CSI-2 via TC358743 on kernel 4.1

Fri Jun 21, 2019 9:25 am

chchart wrote:
Fri Jun 21, 2019 5:17 am
Hello!
I am using B101 with RPi 3B+ utilizing yavta. First of all, thank you everyone for active discussion and 6by9 for providing the support for yavta. B101 is connected to a Mac Mini, and it works great!

But, it does not work in Mac's recovery mode. When yavta capture command is run, it would "fail to create pool" and "select timeout." Does anyone have a guess to why it does not work?
I heard that screenshot does not work in the recovery mode because it's outside of the "userspace." Does yavta use mechanism similar to screen capture? I cannot seem to understand, as Pi should still be receiving a video input..

Also, I've tested with the same setup with Raspberry Pi Zero W with B102 bridge using "raspistill" and "raspivid" in Mac's recovery mode, and it works fine. That's why I am curious as to why B101 with yavta does not work.

If someone could explain what yavta does differently from raspivid that might have cause the failure, I would greatly appreciate it!
Thank you in advance.
yavta does very little different from raspivid, except that the Linux kernel is controlling it all.
Please provide the full output from yavta (in code tags). Also the output of "v4l2-ctl --query-dv-timings", and "v4l2-ctl -V" after having run yavta.

The TC358743 chip on the B101/102 takes HDMI and produces CSI2 out. The Pi receives this into a memory buffer via the bcm2835-unicam kernel driver. yavta then configures a pipeline to pass those buffers into the GPUs MMAL system to process the image and render and/or video encode it.
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

chchart
Posts: 4
Joined: Fri Jun 07, 2019 6:34 pm

Re: HDMI to CSI-2 via TC358743 on kernel 4.1

Fri Jun 21, 2019 5:12 pm

6by9 wrote:
Fri Jun 21, 2019 9:25 am
chchart wrote:
Fri Jun 21, 2019 5:17 am
Hello!
I am using B101 with RPi 3B+ utilizing yavta. First of all, thank you everyone for active discussion and 6by9 for providing the support for yavta. B101 is connected to a Mac Mini, and it works great!

But, it does not work in Mac's recovery mode. When yavta capture command is run, it would "fail to create pool" and "select timeout." Does anyone have a guess to why it does not work?
I heard that screenshot does not work in the recovery mode because it's outside of the "userspace." Does yavta use mechanism similar to screen capture? I cannot seem to understand, as Pi should still be receiving a video input..

Also, I've tested with the same setup with Raspberry Pi Zero W with B102 bridge using "raspistill" and "raspivid" in Mac's recovery mode, and it works fine. That's why I am curious as to why B101 with yavta does not work.

If someone could explain what yavta does differently from raspivid that might have cause the failure, I would greatly appreciate it!
Thank you in advance.
yavta does very little different from raspivid, except that the Linux kernel is controlling it all.
Please provide the full output from yavta (in code tags). Also the output of "v4l2-ctl --query-dv-timings", and "v4l2-ctl -V" after having run yavta.

The TC358743 chip on the B101/102 takes HDMI and produces CSI2 out. The Pi receives this into a memory buffer via the bcm2835-unicam kernel driver. yavta then configures a pipeline to pass those buffers into the GPUs MMAL system to process the image and render and/or video encode it.
Hi 6by9, thank you for your quick reply. I checked back today, and it works as expected. I must have forgot to set the timing query or EDID after RPi booted up. I apologize for asking the question before giving it a second try.
Is it also possible to capture a still (one frame) using yavta? Or the best way would be to ffmpeg to convert h264 to jpeg?
Thank you very much for your help!
Last edited by chchart on Fri Jun 21, 2019 5:42 pm, edited 1 time in total.

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 6864
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: HDMI to CSI-2 via TC358743 on kernel 4.1

Fri Jun 21, 2019 5:29 pm

chchart wrote:
Fri Jun 21, 2019 5:12 pm
Hi 6by9, thank you for your quick reply. I checked back today, and it works as expected. I must have forgot to set the timing query or EDID after RPi booted up. I apologize for asking the question before giving it a second try.
Is it also possible to capture a still (one frame) using yavta?
Thank you very much for your help!
If you just want a single frame in the native format of the source, then use v4l2-ctl

Code: Select all

v4l2-ctl --set-dv-bt-timings query
v4l2-ctl -v pixelformat=UYVY
v4l2-ctl --stream-mmap=3 --stream-count=1 --stream-to=foo.uyvy
You can add --skip-count=N to skip some frames at the start of the stream. Post process the frame if you want it in a different format.
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

chchart
Posts: 4
Joined: Fri Jun 07, 2019 6:34 pm

Re: HDMI to CSI-2 via TC358743 on kernel 4.1

Fri Jun 21, 2019 6:11 pm

6by9 wrote:
Fri Jun 21, 2019 5:29 pm
If you just want a single frame in the native format of the source, then use v4l2-ctl

Code: Select all

v4l2-ctl --set-dv-bt-timings query
v4l2-ctl -v pixelformat=UYVY
v4l2-ctl --stream-mmap=3 --stream-count=1 --stream-to=foo.uyvy
You can add --skip-count=N to skip some frames at the start of the stream. Post process the frame if you want it in a different format.
Hi 6by9, thank you for the pointer. I've tried what you suggested and am not getting an output file. The command just returns a '<'. Do you have any suggestion for what to try?

Code: Select all

[email protected]:~/yavta $ v4l2-ctl --set-dv-bt-timings query
BT timings set
[email protected]:~/yavta $ v4l2-ctl -v pixelformat=UYVY
[email protected]:~/yavta $ v4l2-ctl --stream-mmap=3 --stream-count=1 --stream-to=foo.uyvy
<
[email protected]:~/yavta $ ls
1080P50EDID.txt  file.h264  file.pts  laptop_results.txt  README.md  yavta.c
COPYING.GPL      file.jpg   include   Makefile            yavta      yavta.o
I greatly appreciate your help. Thank you so much.

Return to “Graphics, sound and multimedia”