BliMatrix
Posts: 5
Joined: Tue Apr 23, 2019 9:14 am

A cheap way to get HDMI input to Raspberry Pi

Tue Apr 23, 2019 10:45 am

This is a cheap way to get HDMI input to Raspberry Pi.The main chip of the module is Toshiba TC358743XBG. It's usage is exactly the same as the ordinary Raspberry Pi camera.https://www.youtube.com/watch?v=lYQuocM7VPI

User avatar
RaTTuS
Posts: 10241
Joined: Tue Nov 29, 2011 11:12 am
Location: North West UK

Re: A cheap way to get HDMI input to Raspberry Pi

Tue Apr 23, 2019 11:15 am

How To ask Questions :- http://www.catb.org/esr/faqs/smart-questions.html
WARNING - some parts of this post may be erroneous YMMV

1QC43qbL5FySu2Pi51vGqKqxy3UiJgukSX
Covfefe

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

Re: A cheap way to get HDMI input to Raspberry Pi

Tue Apr 23, 2019 12:01 pm

As you're using the same handle here as YouTube, I assume you are the person manufacturing.

Please be very aware that using raspivid etc with this chip is very limited (720P only) and is NOT SUPPORTED. raspivid will even print that every time you run it with this chip attached.

Having said that, the links that RaTTus has linked to details how to use the Linux kernel drivers (which are supported), and those allow you to capture up to 1080P50 from the chip. I'm glad to see that you have brought out the I2S audio pins as well, as those can be linked up to capture synchronised audio too. It's all relatively easy using a recent build of GStreamer (Raspbian Stretch is a touch too old though).

At that price I expect people will be biting your hand off - I'm tempted to order a couple of spares! The alternative board is the Auvidea B101 https://auvidea.eu/product/70501/. That comes in at ~£65 via mouser.com
(~£78 for the B102 which should allow 1080P60, but the H264 encoder will struggle at that. Even 1080P50 requires an overclock).
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.

BliMatrix
Posts: 5
Joined: Tue Apr 23, 2019 9:14 am

Re: A cheap way to get HDMI input to Raspberry Pi

Wed Apr 24, 2019 6:16 am

6by9 wrote:
Tue Apr 23, 2019 12:01 pm
As you're using the same handle here as YouTube, I assume you are the person manufacturing.

Please be very aware that using raspivid etc with this chip is very limited (720P only) and is NOT SUPPORTED. raspivid will even print that every time you run it with this chip attached.

Having said that, the links that RaTTus has linked to details how to use the Linux kernel drivers (which are supported), and those allow you to capture up to 1080P50 from the chip. I'm glad to see that you have brought out the I2S audio pins as well, as those can be linked up to capture synchronised audio too. It's all relatively easy using a recent build of GStreamer (Raspbian Stretch is a touch too old though).

At that price I expect people will be biting your hand off - I'm tempted to order a couple of spares! The alternative board is the Auvidea B101 https://auvidea.eu/product/70501/. That comes in at ~£65 via mouser.com
(~£78 for the B102 which should allow 1080P60, but the H264 encoder will struggle at that. Even 1080P50 requires an overclock).
Thanks! I am the module manufacturer,I hope you can contact me [email protected]

User avatar
RaTTuS
Posts: 10241
Joined: Tue Nov 29, 2011 11:12 am
Location: North West UK

Re: A cheap way to get HDMI input to Raspberry Pi

Wed Apr 24, 2019 7:19 am

where are you based and do you accept paypal
How To ask Questions :- http://www.catb.org/esr/faqs/smart-questions.html
WARNING - some parts of this post may be erroneous YMMV

1QC43qbL5FySu2Pi51vGqKqxy3UiJgukSX
Covfefe

BliMatrix
Posts: 5
Joined: Tue Apr 23, 2019 9:14 am

Re: A cheap way to get HDMI input to Raspberry Pi

Wed Apr 24, 2019 8:57 am

RaTTuS wrote:
Wed Apr 24, 2019 7:19 am
where are you based and do you accept paypal
Beijing,China.The module can be booked by mail and paid by paypal. Contact [email protected]

User avatar
RaTTuS
Posts: 10241
Joined: Tue Nov 29, 2011 11:12 am
Location: North West UK

Re: A cheap way to get HDMI input to Raspberry Pi

Wed Apr 24, 2019 10:20 am

Ill bite ..... email sent
How To ask Questions :- http://www.catb.org/esr/faqs/smart-questions.html
WARNING - some parts of this post may be erroneous YMMV

1QC43qbL5FySu2Pi51vGqKqxy3UiJgukSX
Covfefe

fanoush
Posts: 440
Joined: Mon Feb 27, 2012 2:37 pm

Re: A cheap way to get HDMI input to Raspberry Pi

Wed Apr 24, 2019 10:58 am

BliMatrix wrote:
Tue Apr 23, 2019 10:45 am
This is a cheap way to get HDMI input to Raspberry Pi.The main chip of the module is Toshiba TC358743XBG. It's usage is exactly the same as the ordinary Raspberry Pi camera.https://www.youtube.com/watch?v=lYQuocM7VPI
Why the video mentions 1080p/25fps? Is more fps possible? This is because of some limit on Pi side?
Toshiba page mentions 1920x1080, 60 fps, 24 bpp

As for Pi side can this work as passthru to hdmi out (possibly including audio) with some overlays drawn over it?

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

Re: A cheap way to get HDMI input to Raspberry Pi

Wed Apr 24, 2019 1:28 pm

fanoush wrote:
Wed Apr 24, 2019 10:58 am
BliMatrix wrote:
Tue Apr 23, 2019 10:45 am
This is a cheap way to get HDMI input to Raspberry Pi.The main chip of the module is Toshiba TC358743XBG. It's usage is exactly the same as the ordinary Raspberry Pi camera.https://www.youtube.com/watch?v=lYQuocM7VPI
Why the video mentions 1080p/25fps? Is more fps possible? This is because of some limit on Pi side?
Toshiba page mentions 1920x1080, 60 fps, 24 bpp

As for Pi side can this work as passthru to hdmi out (possibly including audio) with some overlays drawn over it?
The video is using the unsupported firmware drivers for this chip via raspivid.
This advertises a fixed EDID which says 720P60 is the preferred and native mode. I thought it didn't support anything other than 720P60, but there may be some mode switching supported in there (I'm not going to investigate).
Using this path you are limited in modes and data rates, and I will not be fixing anything that doesn't work as you want it.

Using the Linux kernel drivers, it exposes options to run the CSI2 lanes faster (972Mbits/s/lane), and choose between 24bpp RGB and 16bpp UYVY formats.
Very rough calcs (mainly as they ignore the blanking periods which do have to be considered)
1920*1080*16bpp is 33177600bits/frame. Over 2 lanes you have 2*972 = 1944 Mbits/s available. 1944*1000000 / 33177600 = 58.5fps.
(1920*1080*24bpp is 49766400bits/frame -> 39.0fps)

For things like video encoding you want YUV420, therefore the conversion on the TC358743 doesn't lose you anything you wouldn't have thrown away anyway.
With 4 lanes you can capture 1080P60 into memory, but requires a Compute Module (and Auvidea B102) to do so.

The codec block is only rated at 1080P30. With an overclock I have captured 1080P50 UYVY, although I don't recall how thoroughly I checked for frame drops.

Yes, you can render this through to the HDMI output with additional layers on top, up to the limits of the HVS.

It appears that the relevant audio pins have been brought through to a pin header, therefore you should be able to use the same wiring I got working on the B101/102 - viewtopic.php?f=38&t=120702&start=400#p1339178

AFAIK there are no simple plug and play tools for using this. The closest is GStreamer (1.14 or above) as it supports using dma-bufs for efficient buffer passing between components. You still have to do some setup manually as it does not support setting the DV timings parameters for the chip first, nor does it handle resolution changes.
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.

BliMatrix
Posts: 5
Joined: Tue Apr 23, 2019 9:14 am

Re: A cheap way to get HDMI input to Raspberry Pi

Wed Apr 24, 2019 2:14 pm

fanoush wrote:
Wed Apr 24, 2019 10:58 am
BliMatrix wrote:
Tue Apr 23, 2019 10:45 am
This is a cheap way to get HDMI input to Raspberry Pi.The main chip of the module is Toshiba TC358743XBG. It's usage is exactly the same as the ordinary Raspberry Pi camera.https://www.youtube.com/watch?v=lYQuocM7VPI
Why the video mentions 1080p/25fps? Is more fps possible? This is because of some limit on Pi side?
Toshiba page mentions 1920x1080, 60 fps, 24 bpp

As for Pi side can this work as passthru to hdmi out (possibly including audio) with some overlays drawn over it?
The limit is indeed in Pi.
This is the python code used in my video.The Pi uses an official image with no other changes.

Code: Select all

from picamera import PiCamera
from time import sleep
camera = PiCamera()
camera.start_preview()
sleep(1000)
camera.stop_preview()
The HDMI source supported by Raspberry Pi with the module is 720p50,720p60,1080i50,1080p24,1080p25. Lower resolution is also working

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

Re: A cheap way to get HDMI input to Raspberry Pi

Wed Apr 24, 2019 2:22 pm

BliMatrix wrote:
Wed Apr 24, 2019 2:14 pm
fanoush wrote:
Wed Apr 24, 2019 10:58 am
BliMatrix wrote:
Tue Apr 23, 2019 10:45 am
This is a cheap way to get HDMI input to Raspberry Pi.The main chip of the module is Toshiba TC358743XBG. It's usage is exactly the same as the ordinary Raspberry Pi camera.https://www.youtube.com/watch?v=lYQuocM7VPI
Why the video mentions 1080p/25fps? Is more fps possible? This is because of some limit on Pi side?
Toshiba page mentions 1920x1080, 60 fps, 24 bpp

As for Pi side can this work as passthru to hdmi out (possibly including audio) with some overlays drawn over it?
The limit is indeed in Pi.
This is the python code used in my video.The Pi uses an official image with no other changes.

Code: Select all

from picamera import PiCamera
from time import sleep
camera = PiCamera()
camera.start_preview()
sleep(1000)
camera.stop_preview()
The HDMI source supported by Raspberry Pi with the module is 720p50,720p60,1080i50,1080p24,1080p25. Lower resolution is also working
I will stress again, the use of the firmware is unsupported, and may be removed at a future point in time. It was code written for a demo, and is quite likely to include bugs. The use of the kernel drivers is very strongly recommended.

I'd be very surprised if it actually worked with 1080i50 even though it is advertised in the EDID. Nothing in the camera stack supports deinterlacing, and the way the TC358743 transports interlaced video is odd to say the least. And, no, I'm not going to fix it (see the note about it being unsupported!)
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.

XiLENCE
Posts: 1
Joined: Wed May 22, 2019 7:21 am

Re: A cheap way to get HDMI input to Raspberry Pi

Wed May 22, 2019 7:24 am

Hi,

if I connect a camera via HDMI to the auvidea board, will the b101 also feed the raspberry pi with sound coming from the camera over the HDMI-cable? Or does it only support video-input and no audio directly over HDMI?

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

Re: A cheap way to get HDMI input to Raspberry Pi

Wed May 22, 2019 11:56 am

XiLENCE wrote:
Wed May 22, 2019 7:24 am
Hi,

if I connect a camera via HDMI to the auvidea board, will the b101 also feed the raspberry pi with sound coming from the camera over the HDMI-cable? Or does it only support video-input and no audio directly over HDMI?
You ask about the Auvidea board on a post that is about an alternative? Ho hum.

Audio can be routed out as I2S from the TC358743. The later versions of the B101/102 boards have I2S brought out to pin headers on the side of the board (it is not routed up the flexi cable). See viewtopic.php?f=38&t=120702&start=400#p1339178 for configuration.
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: 6626
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: A cheap way to get HDMI input to Raspberry Pi

Wed May 22, 2019 11:57 am

I'm just wondering if anyone has actually bitten and received one (or more) of these.
I have emailed them and had a price back for shipping, but been busy with other things so held off actually ordering. Throwing random money via Paypal always seems a little iffy.
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.

Return to “HATs and other add-ons”