6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 7267
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

Mon Nov 19, 2018 11:34 am

xasm wrote:
Mon Nov 19, 2018 8:39 am
I've read the thread, and have a question regarding a quite special mode - I'd like to get a video from the 800x600_58 RGB source. Is this mode supported by B102? Just correct EDID file needed?
800x600 is fine. 58fps? That's a strange source.

If your source only outputs that, then you can almost forget about the EDID as there is no option. Or if you can force the output mode (as you can on a Pi via tvservice -e) then you can ignore the EDID.
Exactly what the TC358743 chip will identify the source as I don't know. Whilst using the index value is easiest in v4l2-ctl, yavta actually takes the full timing structure for the detected video and sets that, so if the chip has identified it sensibly then it should work.
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.

xasm
Posts: 34
Joined: Mon Nov 19, 2018 8:28 am

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

Mon Nov 19, 2018 11:54 am

Thank you for the fast reply. Yes, 58 fps comes from some custom device.

Ok, I'll try to make it work, but I'm a little bit confused regarding the instruction: https://www.raspberrypi.org/documentati ... -camera.md

Should I follow it or I have to ignore it and use your instructions from page 17 of the thread? For example, I made everything mentioned here viewtopic.php?f=38&t=120702&start=400#p1339178 but got no dev/video0 at all. then I run sudo wget http://goo.gl/U4t12b -O /boot/dt-blob.bin and got the dev/video0. Nevertheless yavta said "/dev/video0: no such file or directory (2)".

Is it a wrong way?

(CM3 module is connected according cmio-camera.md also.)

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 7267
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

Mon Nov 19, 2018 12:25 pm

xasm wrote:
Mon Nov 19, 2018 11:54 am
Thank you for the fast reply. Yes, 58 fps comes from some custom device.

Ok, I'll try to make it work, but I'm a little bit confused regarding the instruction: https://www.raspberrypi.org/documentati ... -camera.md
Follow those docs for the hardware setup. You don't need to do any of that software setup as we're driving it solely from Linux and the dt-blob.bin sets up the firmware.
The minor update is that the default config links CAM1 with i2c-0 on GPIOs 0&1, but the overlay only has options for 28&29 or 44&45. The simplest option is to wire it to 28&29 and make the dtoverlay line "dtoverlay=tc358743,i2c_pins_28_29=1". The two GPIOs aren't used with these boards so can be omitted.

I'll update the overlay to add an option for GPIOs 0&1.
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.

Jacky Chen
Posts: 9
Joined: Thu Sep 27, 2018 8:08 am

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

Tue Nov 20, 2018 6:38 am

Hi 6by9,
I complied the lastest Gstreamer with your gst-omx and updated tc358743 V4L2 driver to the last.
The yavata works very well with my B101 ,Pi3 B+ and Gopro4.
But I got a error when to run the follow Gstreamer cmd:
"gst-launch-1.0 -vvv -e v4l2src ! video/x-raw,format=UYVY,framerate=60/1 ! omxh264enc target-bitrate=2000000 control-rate=variable ! h264parse ! matroskamux ! filesink location=foo.mkv".
The error message is :
"Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Internal data stream error.
Additional debug info:
gstbasesrc.c(3064): gst_base_src_loop (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
streaming stopped, reason not-negotiated (-4)
EOS on shutdown enabled -- waiting for EOS after Error
Waiting for EOS...
"
The "1080P50EDID.txt" had been set. Current input video timings is :
" Active width: 1280
Active height: 720
Total width: 1650
Total height: 750
Frame format: progressive
Polarities: -vsync -hsync
Pixelclock: 74250000 Hz (60.00 frames per second)
Horizontal frontporch: 0
Horizontal sync: 370
Horizontal backporch: 0
Vertical frontporch: 0
Vertical sync: 30
Vertical backporch: 0
Standards:
Flags:
"
The error looks like the video timings format negotiation failure between v4l2 and gstreamer.
Anything else need to set before running Gstreamer pipe? Many thanks.

xasm
Posts: 34
Joined: Mon Nov 19, 2018 8:28 am

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

Tue Nov 20, 2018 10:22 am

Thank you, 6by9! I connected a video camera, applied 1080P50EDID.txt and, finally, got the picture. Perfect!

Now I'm trying to work with 800x600_58 video. I've read your reply regarding EDID, but I didn't get a video from the source yet. I have an idea to try to play with EDID, could you recommend a good tool for making custom EDID file (in txt format)?

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 7267
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

Tue Nov 20, 2018 10:46 am

Jacky Chen wrote:
Tue Nov 20, 2018 6:38 am
The error looks like the video timings format negotiation failure between v4l2 and gstreamer.
Anything else need to set before running Gstreamer pipe? Many thanks.
Nope, not timings as GStreamer totally ignores them, which is why they have to be set up before calling GStreamer.
...
I actually get a colorimetry mismatch error:

Code: Select all

ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Device '/dev/video2' does not support 2:3:5:4 colorimetry
Amend the line to

Code: Select all

gst-launch-1.0 -vvv -e v4l2src ! video/x-raw,format=UYVY,framerate=60/1,colorimetry=bt601 ! omxh264enc target-bitrate=2000000 control-rate=variable ! h264parse ! matroskamux ! filesink location=foo.mkv
and I get a valid captured file. (In my case I got 720p, and I had already set the timings before running gst-launch).

I am on my "working tree" firmware, so there may be some minor differences there. Please run an "SKIP_KERNEL=1 sudo rpi-update" to grab the latest firmware, although the apt repositories got bumped very recently for the VLC support in the latest Raspbian release so I suspect those should be giving out pretty recent firmware (confirm via "vcgencmd version"). Within the last few weeks would be fine.

If you are getting issues with the omx encoder, then adding "GST_DEBUG=omx*:7" to the front of your gst-launch line will print out all the debug from it, and there should be something to pick apart (or quote here in code tags). Don't leave it on for benchamrking as writing stuff to the console will affect the timings.
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: 7267
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

Tue Nov 20, 2018 11:01 am

xasm wrote:
Tue Nov 20, 2018 10:22 am
Thank you, 6by9! I connected a video camera, applied 1080P50EDID.txt and, finally, got the picture. Perfect!

Now I'm trying to work with 800x600_58 video. I've read your reply regarding EDID, but I didn't get a video from the source yet. I have an idea to try to play with EDID, could you recommend a good tool for making custom EDID file (in txt format)?
What does "v4l2-ctl --query-dv-timings" report? If that makes sense then you may be in luck.

I can't recommend an EDID editor as I didn't find one - I edited the files I produced by hand, which is why edid-decode will report some errors on them. I was only really tweaking the supported list of VICs which wasn't too bad (read https://en.wikipedia.org/wiki/EDID). I suspect that you need to edit the detailed timing which will be a touch more involved.
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.

xasm
Posts: 34
Joined: Mon Nov 19, 2018 8:28 am

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

Tue Nov 20, 2018 11:10 am

v4l2-ctl --query-dv-timings reports: failed: No locks available. Other values are zeros.

I know that I have a very uncommon video signal, but some monitors can display it.

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 7267
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

Tue Nov 20, 2018 11:22 am

xasm wrote:
Tue Nov 20, 2018 11:10 am
v4l2-ctl --query-dv-timings reports: failed: No locks available. Other values are zeros.

I know that I have a very uncommon video signal, but some monitors can display it.
If you know all the timings, then you should be able to enter them manually via v4l2-ctl --set-dv-bt-timings. To quote the help text:

Code: Select all

                     query: use the output of VIDIOC_QUERY_DV_TIMINGS
                     index=<index>: use the index as provided by --list-dv-timings
                     or specify timings using cvt/gtf options as follows:
                     cvt/gtf,width=<width>,height=<height>,fps=<frames per sec>
                     interlaced=<0/1>,reduced-blanking=<0/1/2>,reduced-fps=<0/1>
                     The value of reduced-blanking, if greater than 0, indicates
                     that reduced blanking is to be used and the value indicate the
                     version. For gtf, there is no version 2 for reduced blanking, and
		     the value 1 or 2 will give same results.
		     reduced-fps = 1, slows down pixel clock by factor of 1000 / 1001, allowing
		     to support NTSC frame rates like 29.97 or 59.94.
		     Reduced fps flag takes effect only with reduced blanking version 2 and,
		     when refresh rate is an integer multiple of 6, say, fps = 24,30,60 etc.
                     or update all or part of the current timings fields:
                     width=<width>,height=<height>,interlaced=<0/1>,
                     polarities=<polarities mask>,pixelclock=<pixelclock Hz>,
                     hfp=<horizontal front porch>,hs=<horizontal sync>,
                     hbp=<horizontal back porch>,vfp=<vertical front porch>,
                     vs=<vertical sync>,vbp=<vertical back porch>,
                     il_vfp=<vertical front porch for bottom field>,
                     il_vs=<vertical sync for bottom field>,
                     il_vbp=<vertical back porch for bottom field>.
                     clear: start with zeroed timings instead of the current timings.
                     set the digital video timings according to the BT 656/1120
                     standard [VIDIOC_S_DV_TIMINGS]
It's just setting up a struct v4l2_dv_timings to call VIDIOC_S_DV_TIMINGS, so you should be able to create the required settings with a bit of perserverence.
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: 7267
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

Tue Nov 20, 2018 12:17 pm

Not a fully optimised encode path, but GStreamer 1.15 with my gst-omx patches from https://github.com/6by9/gst-omx/tree/pi

Code: Select all

gst-launch-1.0 -vvv -e v4l2src ! video/x-raw,format=UYVY,framerate=60/1,colorimetry=bt601 ! omxh264enc target-bitrate=2000000 control-rate=variable ! h264parse ! queue ! matroskamux name=mux ! filesink location=foo.mkv alsasrc device=hw:1,0 ! audio/x-raw,rate=48000 ! queue ! faac ! aacparse ! mux.
has just encoded synchronised 48kHz stereo audio and 720P60 video for me from a B101. I haven't checked for frame drops as I'm recording to an NFS drive which causes significant variability on timing for file access.
edit And please remember to set the frame timings on the V4L2 device before you run GStreamer.
Last edited by 6by9 on Wed Nov 21, 2018 10:29 am, edited 1 time in total.
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: 7267
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

Tue Nov 20, 2018 12:18 pm

xasm wrote:
Tue Nov 20, 2018 11:10 am
v4l2-ctl --query-dv-timings reports: failed: No locks available. Other values are zeros.

I know that I have a very uncommon video signal, but some monitors can display it.
I'll also add that "v4l2-ctl --log-status" dumps out a load of status from the chip itself:

Code: Select all

pi@raspberrypi:~ $ v4l2-ctl --log-status

Status Log:

   [ 2284.718866] unicam 3f801000.csi: =================  START STATUS  =================
   [ 2284.720507] tc358743 0-000f: -----Chip status-----
   [ 2284.721109] tc358743 0-000f: Chip ID: 0x00
   [ 2284.721710] tc358743 0-000f: Chip revision: 0x00
   [ 2284.721715] tc358743 0-000f: Reset: IR: 1, CEC: 1, CSI TX: 0, HDMI: 0
   [ 2284.721717] tc358743 0-000f: Sleep mode: off
   [ 2284.721720] tc358743 0-000f: Cable detected (+5V power): yes
   [ 2284.722230] tc358743 0-000f: DDC lines enabled: yes
   [ 2284.722859] tc358743 0-000f: Hotplug enabled: yes
   [ 2284.723463] tc358743 0-000f: CEC enabled: no
   [ 2284.723465] tc358743 0-000f: -----Signal status-----
   [ 2284.723468] tc358743 0-000f: TMDS signal detected: yes
   [ 2284.723470] tc358743 0-000f: Stable sync signal: yes
   [ 2284.723473] tc358743 0-000f: PHY PLL locked: yes
   [ 2284.723476] tc358743 0-000f: PHY DE detected: yes
   [ 2284.730076] tc358743 0-000f: Detected format: 1280x720p60.0 (1650x750)
   [ 2284.730080] tc358743 0-000f: horizontal: fp = 0, -sync = 370, bp = 0
   [ 2284.730084] tc358743 0-000f: vertical: fp = 0, -sync = 30, bp = 0
   [ 2284.730087] tc358743 0-000f: pixelclock: 74250000
   [ 2284.730091] tc358743 0-000f: flags (0x0):
   [ 2284.730094] tc358743 0-000f: standards (0x0):
   [ 2284.730099] tc358743 0-000f: Configured format: 1280x720p60.0 (1650x750)
   [ 2284.730102] tc358743 0-000f: horizontal: fp = 0, -sync = 370, bp = 0
   [ 2284.730105] tc358743 0-000f: vertical: fp = 0, -sync = 30, bp = 0
   [ 2284.730108] tc358743 0-000f: pixelclock: 74250000
   [ 2284.730112] tc358743 0-000f: flags (0x0):
   [ 2284.730115] tc358743 0-000f: standards (0x0):
   [ 2284.730117] tc358743 0-000f: -----CSI-TX status-----
   [ 2284.730120] tc358743 0-000f: Lanes needed: 1
   [ 2284.730123] tc358743 0-000f: Lanes in use: 1
   [ 2284.730724] tc358743 0-000f: Waiting for particular sync signal: no
   [ 2284.731324] tc358743 0-000f: Transmit mode: no
   [ 2284.731924] tc358743 0-000f: Receive mode: no
   [ 2284.732534] tc358743 0-000f: Stopped: no
   [ 2284.732544] tc358743 0-000f: Color space: YCbCr 422 16-bit
   [ 2284.733060] tc358743 0-000f: -----HDMI status-----
   [ 2284.733064] tc358743 0-000f: HDCP encrypted content: no
   [ 2284.733068] tc358743 0-000f: Input color space: RGB limited range
   [ 2284.733578] tc358743 0-000f: AV Mute: off
   [ 2284.734089] tc358743 0-000f: Deep color mode: 8-bits per channel
   [ 2284.736555] tc358743 0-000f: HDMI infoframe: Auxiliary Video Information (AVI), version 2, length 13
   [ 2284.736559] tc358743 0-000f:     colorspace: RGB
   [ 2284.736563] tc358743 0-000f:     scan mode: No Data
   [ 2284.736567] tc358743 0-000f:     colorimetry: ITU709
   [ 2284.736571] tc358743 0-000f:     picture aspect: 16:9
   [ 2284.736574] tc358743 0-000f:     active aspect: Same as Picture
   [ 2284.736578] tc358743 0-000f:     itc: No Data
   [ 2284.736582] tc358743 0-000f:     extended colorimetry: xvYCC 601
   [ 2284.736586] tc358743 0-000f:     quantization range: Default
   [ 2284.736590] tc358743 0-000f:     nups: Unknown Non-uniform Scaling
   [ 2284.736593] tc358743 0-000f:     video code: 4
   [ 2284.736597] tc358743 0-000f:     ycc quantization range: Limited
   [ 2284.736601] tc358743 0-000f:     hdmi content type: Graphics
   [ 2284.736605] tc358743 0-000f:     pixel repeat: 0
   [ 2284.736609] tc358743 0-000f:     bar top 0, bottom 0, left 0, right 0
   [ 2284.736612] unicam 3f801000.csi: -----Receiver status-----
   [ 2284.736616] unicam 3f801000.csi: V4L2 width/height:   1280x720
   [ 2284.736619] unicam 3f801000.csi: Mediabus format:     0000200f
   [ 2284.736622] unicam 3f801000.csi: V4L2 format:         UYVY
   [ 2284.736625] unicam 3f801000.csi: Unpacking/packing:   0 / 0
   [ 2284.736627] unicam 3f801000.csi: ----Live data----
   [ 2284.736630] unicam 3f801000.csi: Programmed stride:   2560
   [ 2284.736633] unicam 3f801000.csi: Detected resolution: 0x0
   [ 2284.736636] unicam 3f801000.csi: Write pointer:       df200000
   [ 2284.736639] unicam 3f801000.csi: ==================  END STATUS  ==================
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.

xasm
Posts: 34
Joined: Mon Nov 19, 2018 8:28 am

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

Tue Nov 20, 2018 1:38 pm

It works! 6by9, I owe you a beer!

xasm
Posts: 34
Joined: Mon Nov 19, 2018 8:28 am

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

Tue Nov 20, 2018 3:07 pm

Ok, now trying to connect the second camera to CAM0.

I uploaded dt-blob.bin for dual cameras:

vcgencmd get_camera reports Supported=2 connected=1

no dev/video1

I connected:

CD1_SDA ==> 28
CD1_SCL ==> 29
CD0_SDA ==> 44
CD0_SCL ==> 45

/boot/config.txt has line

dtoverlay=tc358743,i2c_pins_28_29=1

Camera 1 works perfectly.

I guess that I have to added something about pins 44_45, right?

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 7267
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

Tue Nov 20, 2018 3:21 pm

xasm wrote:
Tue Nov 20, 2018 3:07 pm
Ok, now trying to connect the second camera to CAM0.

I uploaded dt-blob.bin for dual cameras:

vcgencmd get_camera reports Supported=2 connected=1

no dev/video1

I connected:

CD1_SDA ==> 28
CD1_SCL ==> 29
CD0_SDA ==> 44
CD0_SCL ==> 45

/boot/config.txt has line

dtoverlay=tc358743,i2c_pins_28_29=1

Camera 1 works perfectly.

I guess that I have to added something about pins 44_45, right?
Explain what you want to do. (Ideally branch this off into a new thread as this is going off topic on what is already a very long thread!)

dt-blob.bin is ONLY applicable should you be using the firmware to drive the OV5647 or IMX219 camera modules, not the TC358743. Do NOT tell dt-blob about the configuration for your tc358743 if you are using the Linux kernel driver.

The default dt-blobs are set up with the CAM1 connector being the first camera for the firmware, and CAM0 being the second camera, as CAM1 is the default camera on standard Pi variants. If you are connecting up a OV5647 or IMX219 camera on CAM0 then you need to modify the configuration to handle that.
HOWEVER, if you are doing that then you have a bigger conflict over the i2c0 peripheral. The firmware expects to be able to use it to talk to the camera modules (and display), and Linux can not be using it simultaneously. There is no arbitration between the two processors. If that is the case then you'll need to rewire and reconfigure to use i2c1 to control the tc358743 via GPIOs 2&3 or 44&45, leaving the GPU to use i2c0 to talk to the camera via 0&1 or 28&29.
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.

Jacky Chen
Posts: 9
Joined: Thu Sep 27, 2018 8:08 am

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

Wed Nov 21, 2018 8:20 am

Hi 6by9, my problem still exists.
Same error:
"gstbasesrc.c(3064): gst_base_src_loop (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
streaming stopped, reason not-negotiated (-4)"

I list my steps. Maybe I miss something? Could you help to check it? Could you share your Gstreamer compile shell script with me? Maybe there are some mistakes in my compile work.

download raspbian-2018-06-29

sudo apt-get update

sudo apt-get upgrade -y

SKIP_KERNEL=1 sudo rpi-update

add cma=32M into /boot/cmdline.txt

add dtoverlay=tc358743 into /boot/config.txt

sudo reboot

compile and install Gstreamer and gst-omx from source code

sudo v4l2-ctl --set-edid=file=1080P50EDID.txt --fix-edid-checksums

sudo GST_DEBUG=omx*:7 gst-launch-1.0 -vvv -e v4l2src ! video/x-raw,format=UYVY,framerate=60/1,colorimetry=bt601 ! omxh264enc target-bitrate=2000000 control-rate=variable ! h264parse ! matroskamux ! filesink location=foo.mkv

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 7267
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

Wed Nov 21, 2018 10:28 am

Jacky Chen wrote:
Wed Nov 21, 2018 8:20 am
sudo GST_DEBUG=omx*:7 gst-launch-1.0 -vvv -e v4l2src ! video/x-raw,format=UYVY,framerate=60/1,colorimetry=bt601 ! omxh264enc target-bitrate=2000000 control-rate=variable ! h264parse ! matroskamux ! filesink location=foo.mkv
The whole reason for requesting you add GST_DEBUG=omx*:7 was that you post the log that results! You may want to use
GST_DEBUG=omx*:7,v4l2*:7 to get logging from both components.
Sorry, but I don't have time to invest in this. If yavta is working and you don't provide any logs, then I'm not going to take it any further.

I assume you have manually set the timings as well as the EDID. yavta is doing that automatically, whilst GStreamer won't.
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.

Jacky Chen
Posts: 9
Joined: Thu Sep 27, 2018 8:08 am

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

Wed Nov 21, 2018 1:10 pm

Hi 6by9,I am very sorry. Following is my log information. Before running the gstreamer pipe, EDID(1080P50EDID.txt) had been set,
But I am not very clear about " Manually set the timings" .
According to my understanding, first is to use"v4l2-ctl --query-dv-timings" to detect input video timing and the second is to find the same one in the timing list by "v4l2-ctl --list-dv-timings" and use "v4l2-ctl --set-dv-timings" to set V4L2. My understand is right?

"sudo GST_DEBUG=omx*:7 gst-launch-1.0 -vvv -e v4l2src ! video/x-raw,format=UYVY,framerate=60/1,colorimetry=bt601 ! omxh264enc target-bitrate=2000000 control-rate=variable ! h264parse ! matroskamux ! filesink location=foo.mkv
0:00:00.104653085 837 0x159f5a0 DEBUG omx gstomx.c:3476:plugin_init: Registering element 'omxmpeg2videodec'
0:00:00.104879853 837 0x159f5a0 DEBUG omx gstomx.c:3476:plugin_init: Registering element 'omxmpeg4videodec'
0:00:00.104981310 837 0x159f5a0 DEBUG omx gstomx.c:3476:plugin_init: Registering element 'omxh263dec'
0:00:00.105060320 837 0x159f5a0 DEBUG omx gstomx.c:3476:plugin_init: Registering element 'omxh264dec'
0:00:00.105139069 837 0x159f5a0 DEBUG omx gstomx.c:3476:plugin_init: Registering element 'omxtheoradec'
0:00:00.105219380 837 0x159f5a0 DEBUG omx gstomx.c:3476:plugin_init: Registering element 'omxvp8dec'
0:00:00.105330629 837 0x159f5a0 DEBUG omx gstomx.c:3476:plugin_init: Registering element 'omxmjpegdec'
0:00:00.105409430 837 0x159f5a0 DEBUG omx gstomx.c:3476:plugin_init: Registering element 'omxvc1dec'
0:00:00.105492450 837 0x159f5a0 DEBUG omx gstomx.c:3476:plugin_init: Registering element 'omxh264enc'
0:00:00.105573022 837 0x159f5a0 DEBUG omx gstomx.c:3476:plugin_init: Registering element 'omxanalogaudiosink'
0:00:00.105651927 837 0x159f5a0 DEBUG omx gstomx.c:3476:plugin_init: Registering element 'omxhdmiaudiosink'
0:00:00.106064578 837 0x159f5a0 DEBUG omx gstomx.c:3339:_class_init: No sink template caps specified for element 'omxh264enc', using default 'video/x-raw, width = (int) [ 1, max ], height = (int) [ 1, max ], framerate = (fraction) [ 0, max ]'
0:00:00.106266919 837 0x159f5a0 DEBUG omx gstomx.c:3367:_class_init: No src template caps specified for element 'omxh264enc', using default 'video/x-h264, width=(int) [ 16, 4096 ], height=(int) [ 16, 4096 ]'
0:00:00.106382855 837 0x159f5a0 DEBUG omx gstomx.c:3394:_class_init: Using hack: no-component-role
0:00:00.106433844 837 0x159f5a0 DEBUG omx gstomx.c:3394:_class_init: Using hack: no-component-reconfigure
Setting pipeline to PAUSED ...
0:00:00.121446576 837 0x159f5a0 DEBUG omx gstomx.c:154:gst_omx_core_acquire: Successfully loaded core '/opt/vc/lib/libopenmaxil.so'
0:00:00.122031517 837 0x159f5a0 DEBUG omx gstomx.c:169:gst_omx_core_acquire: Successfully initialized core '/opt/vc/lib/libopenmaxil.so'
0:00:00.122854892 837 0x159f5a0 DEBUG omx gstomx.c:967:gst_omx_component_new:<omxh264enc-omxh264enc0> Successfully got component handle 0x15da328 (OMX.broadcom.video_encode) from core '/opt/vc/lib/libopenmaxil.so'
0:00:00.122999473 837 0x159f5a0 DEBUG omx gstomx.c:1212:gst_omx_component_get_state:<omxh264enc-omxh264enc0> Getting state of video_encode
0:00:00.123059316 837 0x159f5a0 DEBUG omx gstomx.c:1262:gst_omx_component_get_state:<omxh264enc-omxh264enc0> video_encode returning state Loaded
0:00:00.123116712 837 0x159f5a0 DEBUG omx gstomx.c:1284:gst_omx_component_add_port:<omxh264enc-omxh264enc0> video_encode adding port 200
0:00:00.123170617 837 0x159f5a0 DEBUG omx gstomx.c:1376:gst_omx_component_get_parameter:<omxh264enc-omxh264enc0> Getting video_encode parameter at index 0x02000001
0:00:00.123304886 837 0x159f5a0 DEBUG omx gstomx.c:1379:gst_omx_component_get_parameter:<omxh264enc-omxh264enc0> Got video_encode parameter at index 0x02000001: None (0x00000000)
0:00:00.123390250 837 0x159f5a0 DEBUG omx gstomx.c:1284:gst_omx_component_add_port:<omxh264enc-omxh264enc0> video_encode adding port 201
0:00:00.123446187 837 0x159f5a0 DEBUG omx gstomx.c:1376:gst_omx_component_get_parameter:<omxh264enc-omxh264enc0> Getting video_encode parameter at index 0x02000001
0:00:00.123576550 837 0x159f5a0 DEBUG omx gstomx.c:1379:gst_omx_component_get_parameter:<omxh264enc-omxh264enc0> Got video_encode parameter at index 0x02000001: None (0x00000000)
0:00:00.123636341 837 0x159f5a0 DEBUG omx gstomx.c:1376:gst_omx_component_get_parameter:<omxh264enc-omxh264enc0> Getting video_encode parameter at index 0x06000004
0:00:00.123763370 837 0x159f5a0 DEBUG omx gstomx.c:1379:gst_omx_component_get_parameter:<omxh264enc-omxh264enc0> Got video_encode parameter at index 0x06000004: None (0x00000000)
0:00:00.123821286 837 0x159f5a0 DEBUG omx gstomx.c:1395:gst_omx_component_set_parameter:<omxh264enc-omxh264enc0> Setting video_encode parameter at index 0x06000004
0:00:00.123963941 837 0x159f5a0 DEBUG omx gstomx.c:1398:gst_omx_component_set_parameter:<omxh264enc-omxh264enc0> Set video_encode parameter at index 0x06000004: None (0x00000000)
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
0:00:00.128293627 837 0x159e000 DEBUG omx gstomx.c:1376:gst_omx_component_get_parameter:<omxh264enc-omxh264enc0> Getting video_encode parameter at index 0x06000001
0:00:00.128528676 837 0x159e000 DEBUG omx gstomx.c:1379:gst_omx_component_get_parameter:<omxh264enc-omxh264enc0> Got video_encode parameter at index 0x06000001: None (0x00000000)
0:00:00.128573363 837 0x159e000 DEBUG omxvideo gstomxvideo.c:146:gst_omx_video_get_supported_colorformats:<omxh264enc-omxh264enc0> Component port 200 supports I420 (20) at index 0
0:00:00.128609456 837 0x159e000 DEBUG omx gstomx.c:1376:gst_omx_component_get_parameter:<omxh264enc-omxh264enc0> Getting video_encode parameter at index 0x06000001
0:00:00.128757736 837 0x159e000 DEBUG omx gstomx.c:1379:gst_omx_component_get_parameter:<omxh264enc-omxh264enc0> Got video_encode parameter at index 0x06000001: None (0x00000000)
0:00:00.128795652 837 0x159e000 DEBUG omxvideo gstomxvideo.c:150:gst_omx_video_get_supported_colorformats:<omxh264enc-omxh264enc0> Component port 200 supports unsupported color format 2130706439 at index 1
0:00:00.128830391 837 0x159e000 DEBUG omx gstomx.c:1376:gst_omx_component_get_parameter:<omxh264enc-omxh264enc0> Getting video_encode parameter at index 0x06000001
0:00:00.128974087 837 0x159e000 DEBUG omx gstomx.c:1379:gst_omx_component_get_parameter:<omxh264enc-omxh264enc0> Got video_encode parameter at index 0x06000001: None (0x00000000)
0:00:00.129012993 837 0x159e000 DEBUG omxvideo gstomxvideo.c:146:gst_omx_video_get_supported_colorformats:<omxh264enc-omxh264enc0> Component port 200 supports NV12 (39) at index 2
0:00:00.129047316 837 0x159e000 DEBUG omx gstomx.c:1376:gst_omx_component_get_parameter:<omxh264enc-omxh264enc0> Getting video_encode parameter at index 0x06000001
0:00:00.129187574 837 0x159e000 DEBUG omx gstomx.c:1379:gst_omx_component_get_parameter:<omxh264enc-omxh264enc0> Got video_encode parameter at index 0x06000001: None (0x00000000)
0:00:00.129224813 837 0x159e000 DEBUG omxvideo gstomxvideo.c:150:gst_omx_video_get_supported_colorformats:<omxh264enc-omxh264enc0> Component port 200 supports unsupported color format 2130706440 at index 3
0:00:00.129259396 837 0x159e000 DEBUG omx gstomx.c:1376:gst_omx_component_get_parameter:<omxh264enc-omxh264enc0> Getting video_encode parameter at index 0x06000001
0:00:00.129400957 837 0x159e000 DEBUG omx gstomx.c:1379:gst_omx_component_get_parameter:<omxh264enc-omxh264enc0> Got video_encode parameter at index 0x06000001: None (0x00000000)
0:00:00.129439082 837 0x159e000 DEBUG omxvideo gstomxvideo.c:146:gst_omx_video_get_supported_colorformats:<omxh264enc-omxh264enc0> Component port 200 supports RGB16 (6) at index 4
0:00:00.129473092 837 0x159e000 DEBUG omx gstomx.c:1376:gst_omx_component_get_parameter:<omxh264enc-omxh264enc0> Getting video_encode parameter at index 0x06000001
0:00:00.129616683 837 0x159e000 DEBUG omx gstomx.c:1379:gst_omx_component_get_parameter:<omxh264enc-omxh264enc0> Got video_encode parameter at index 0x06000001: None (0x00000000)
0:00:00.129654912 837 0x159e000 DEBUG omxvideo gstomxvideo.c:146:gst_omx_video_get_supported_colorformats:<omxh264enc-omxh264enc0> Component port 200 supports BGR (12) at index 5
0:00:00.129688974 837 0x159e000 DEBUG omx gstomx.c:1376:gst_omx_component_get_parameter:<omxh264enc-omxh264enc0> Getting video_encode parameter at index 0x06000001
0:00:00.129829129 837 0x159e000 DEBUG omx gstomx.c:1379:gst_omx_component_get_parameter:<omxh264enc-omxh264enc0> Got video_encode parameter at index 0x06000001: None (0x00000000)
0:00:00.129866108 837 0x159e000 DEBUG omxvideo gstomxvideo.c:150:gst_omx_video_get_supported_colorformats:<omxh264enc-omxh264enc0> Component port 200 supports unsupported color format 11 at index 6
0:00:00.129899805 837 0x159e000 DEBUG omx gstomx.c:1376:gst_omx_component_get_parameter:<omxh264enc-omxh264enc0> Getting video_encode parameter at index 0x06000001
0:00:00.130039803 837 0x159e000 DEBUG omx gstomx.c:1379:gst_omx_component_get_parameter:<omxh264enc-omxh264enc0> Got video_encode parameter at index 0x06000001: None (0x00000000)
0:00:00.130076990 837 0x159e000 DEBUG omxvideo gstomxvideo.c:150:gst_omx_video_get_supported_colorformats:<omxh264enc-omxh264enc0> Component port 200 supports unsupported color format 2130706433 at index 7
0:00:00.130111417 837 0x159e000 DEBUG omx gstomx.c:1376:gst_omx_component_get_parameter:<omxh264enc-omxh264enc0> Getting video_encode parameter at index 0x06000001
0:00:00.130255790 837 0x159e000 DEBUG omx gstomx.c:1379:gst_omx_component_get_parameter:<omxh264enc-omxh264enc0> Got video_encode parameter at index 0x06000001: None (0x00000000)
0:00:00.130296102 837 0x159e000 DEBUG omxvideo gstomxvideo.c:146:gst_omx_video_get_supported_colorformats:<omxh264enc-omxh264enc0> Component port 200 supports ABGR (16) at index 8
0:00:00.130330477 837 0x159e000 DEBUG omx gstomx.c:1376:gst_omx_component_get_parameter:<omxh264enc-omxh264enc0> Getting video_encode parameter at index 0x06000001
0:00:00.130474642 837 0x159e000 DEBUG omx gstomx.c:1379:gst_omx_component_get_parameter:<omxh264enc-omxh264enc0> Got video_encode parameter at index 0x06000001: None (0x00000000)
0:00:00.130514016 837 0x159e000 DEBUG omxvideo gstomxvideo.c:146:gst_omx_video_get_supported_colorformats:<omxh264enc-omxh264enc0> Component port 200 supports YUY2 (25) at index 9
0:00:00.130548078 837 0x159e000 DEBUG omx gstomx.c:1376:gst_omx_component_get_parameter:<omxh264enc-omxh264enc0> Getting video_encode parameter at index 0x06000001
0:00:00.130690785 837 0x159e000 DEBUG omx gstomx.c:1379:gst_omx_component_get_parameter:<omxh264enc-omxh264enc0> Got video_encode parameter at index 0x06000001: None (0x00000000)
0:00:00.130729170 837 0x159e000 DEBUG omxvideo gstomxvideo.c:146:gst_omx_video_get_supported_colorformats:<omxh264enc-omxh264enc0> Component port 200 supports YVYU (26) at index 10
0:00:00.130764951 837 0x159e000 DEBUG omx gstomx.c:1376:gst_omx_component_get_parameter:<omxh264enc-omxh264enc0> Getting video_encode parameter at index 0x06000001
0:00:00.130907293 837 0x159e000 DEBUG omx gstomx.c:1379:gst_omx_component_get_parameter:<omxh264enc-omxh264enc0> Got video_encode parameter at index 0x06000001: None (0x00000000)
0:00:00.130946511 837 0x159e000 DEBUG omxvideo gstomxvideo.c:146:gst_omx_video_get_supported_colorformats:<omxh264enc-omxh264enc0> Component port 200 supports UYVY (27) at index 11
0:00:00.130980677 837 0x159e000 DEBUG omx gstomx.c:1376:gst_omx_component_get_parameter:<omxh264enc-omxh264enc0> Getting video_encode parameter at index 0x06000001
0:00:00.131123852 837 0x159e000 DEBUG omx gstomx.c:1379:gst_omx_component_get_parameter:<omxh264enc-omxh264enc0> Got video_encode parameter at index 0x06000001: None (0x00000000)
0:00:00.131160831 837 0x159e000 DEBUG omxvideo gstomxvideo.c:150:gst_omx_video_get_supported_colorformats:<omxh264enc-omxh264enc0> Component port 200 supports unsupported color format 28 at index 12
0:00:00.131195206 837 0x159e000 DEBUG omx gstomx.c:1376:gst_omx_component_get_parameter:<omxh264enc-omxh264enc0> Getting video_encode parameter at index 0x06000001
0:00:00.131338173 837 0x159e000 DEBUG omx gstomx.c:1379:gst_omx_component_get_parameter:<omxh264enc-omxh264enc0> Got video_encode parameter at index 0x06000001: None (0x00000000)
0:00:00.131375308 837 0x159e000 DEBUG omxvideo gstomxvideo.c:150:gst_omx_video_get_supported_colorformats:<omxh264enc-omxh264enc0> Component port 200 supports unsupported color format 2130706435 at index 13
0:00:00.131409734 837 0x159e000 DEBUG omx gstomx.c:1376:gst_omx_component_get_parameter:<omxh264enc-omxh264enc0> Getting video_encode parameter at index 0x06000001
0:00:00.131552128 837 0x159e000 DEBUG omx gstomx.c:1379:gst_omx_component_get_parameter:<omxh264enc-omxh264enc0> Got video_encode parameter at index 0x06000001: None (0x00000000)
0:00:00.131589420 837 0x159e000 DEBUG omxvideo gstomxvideo.c:150:gst_omx_video_get_supported_colorformats:<omxh264enc-omxh264enc0> Component port 200 supports unsupported color format 23 at index 14
0:00:00.131623950 837 0x159e000 DEBUG omx gstomx.c:1376:gst_omx_component_get_parameter:<omxh264enc-omxh264enc0> Getting video_encode parameter at index 0x06000001
0:00:00.131774521 837 0x159e000 DEBUG omx gstomx.c:1379:gst_omx_component_get_parameter:<omxh264enc-omxh264enc0> Got video_encode parameter at index 0x06000001: None (0x00000000)
0:00:00.131812125 837 0x159e000 DEBUG omxvideo gstomxvideo.c:150:gst_omx_video_get_supported_colorformats:<omxh264enc-omxh264enc0> Component port 200 supports unsupported color format 2130706437 at index 15
0:00:00.131846552 837 0x159e000 DEBUG omx gstomx.c:1376:gst_omx_component_get_parameter:<omxh264enc-omxh264enc0> Getting video_encode parameter at index 0x06000001
0:00:00.148206298 837 0x159e000 DEBUG omx gstomx.c:1379:gst_omx_component_get_parameter:<omxh264enc-omxh264enc0> Got video_encode parameter at index 0x06000001: No more (0x8000100e)
0:00:00.148307078 837 0x159e000 DEBUG omxvideo gstomxvideo.c:150:gst_omx_video_get_supported_colorformats:<omxh264enc-omxh264enc0> Component port 200 supports unsupported color format 2130706437 at index 16
0:00:00.149097433 837 0x159e000 LOG omxvideoenc gstomxvideoenc.c:3191:gst_omx_video_enc_getcaps:<omxh264enc-omxh264enc0> Supported caps video/x-raw, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], format=(string)I420; video/x-raw, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], format=(string)NV12
0:00:00.149716644 837 0x159e000 DEBUG omxvideoenc gstomxvideoenc.c:2959:gst_omx_video_enc_drain:<omxh264enc-omxh264enc0> Draining component
0:00:00.149825966 837 0x159e000 DEBUG omxvideoenc gstomxvideoenc.c:2964:gst_omx_video_enc_drain:<omxh264enc-omxh264enc0> Component not started yet
ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Internal data stream error.
Additional debug info:
gstbasesrc.c(3064): gst_base_src_loop (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
streaming stopped, reason not-negotiated (-4)
EOS on shutdown enabled -- waiting for EOS after Error
Waiting for EOS...
/GstPipeline:pipeline0/GstMatroskaMux:matroskamux0.GstPad:src: caps = video/x-matroska
/GstPipeline:pipeline0/GstFileSink:filesink0.GstPad:sink: caps = video/x-matroska
^Chandling interrupt.
Interrupt: Stopping pipeline ...
Interrupt while waiting for EOS - stopping pipeline...
Execution ended after 0:00:02.735752937
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
0:00:02.865555243 837 0x159f5a0 DEBUG omx gstomx.c:1861:gst_omx_port_set_flushing:<omxh264enc-omxh264enc0> Setting video_encode port 200 to flushing
0:00:02.865720866 837 0x159f5a0 DEBUG omx gstomx.c:1867:gst_omx_port_set_flushing:<omxh264enc-omxh264enc0> video_encode port 200 was flushing already
0:00:02.865839666 837 0x159f5a0 DEBUG omx gstomx.c:1376:gst_omx_component_get_parameter:<omxh264enc-omxh264enc0> Getting video_encode parameter at index 0x02000001
0:00:02.866199610 837 0x159f5a0 DEBUG omx gstomx.c:1379:gst_omx_component_get_parameter:<omxh264enc-omxh264enc0> Got video_encode parameter at index 0x02000001: None (0x00000000)
0:00:02.866328410 837 0x159f5a0 DEBUG omx gstomx.c:1577:gst_omx_port_update_port_definition:<omxh264enc-omxh264enc0> Updated video_encode port 200 definition: None (0x00000000)
0:00:02.866455180 837 0x159f5a0 DEBUG omx gstomx.c:1960:gst_omx_port_set_flushing:<omxh264enc-omxh264enc0> Set video_encode port 200 to flushing: None (0x00000000)
0:00:02.866570022 837 0x159f5a0 DEBUG omx gstomx.c:1861:gst_omx_port_set_flushing:<omxh264enc-omxh264enc0> Setting video_encode port 201 to flushing
0:00:02.866684239 837 0x159f5a0 DEBUG omx gstomx.c:1867:gst_omx_port_set_flushing:<omxh264enc-omxh264enc0> video_encode port 201 was flushing already
0:00:02.866795436 837 0x159f5a0 DEBUG omx gstomx.c:1376:gst_omx_component_get_parameter:<omxh264enc-omxh264enc0> Getting video_encode parameter at index 0x02000001
0:00:02.867085224 837 0x159f5a0 DEBUG omx gstomx.c:1379:gst_omx_component_get_parameter:<omxh264enc-omxh264enc0> Got video_encode parameter at index 0x02000001: None (0x00000000)
0:00:02.867210170 837 0x159f5a0 DEBUG omx gstomx.c:1577:gst_omx_port_update_port_definition:<omxh264enc-omxh264enc0> Updated video_encode port 201 definition: None (0x00000000)
0:00:02.867335533 837 0x159f5a0 DEBUG omx gstomx.c:1960:gst_omx_port_set_flushing:<omxh264enc-omxh264enc0> Set video_encode port 201 to flushing: None (0x00000000)
0:00:02.867489073 837 0x159f5a0 DEBUG omxvideoenc gstomxvideoenc.c:1669:gst_omx_video_enc_stop:<omxh264enc-omxh264enc0> Stopping encoder
0:00:02.867604436 837 0x159f5a0 DEBUG omx gstomx.c:1861:gst_omx_port_set_flushing:<omxh264enc-omxh264enc0> Setting video_encode port 200 to flushing
0:00:02.867715685 837 0x159f5a0 DEBUG omx gstomx.c:1867:gst_omx_port_set_flushing:<omxh264enc-omxh264enc0> video_encode port 200 was flushing already
0:00:02.867826309 837 0x159f5a0 DEBUG omx gstomx.c:1376:gst_omx_component_get_parameter:<omxh264enc-omxh264enc0> Getting video_encode parameter at index 0x02000001
0:00:02.868099430 837 0x159f5a0 DEBUG omx gstomx.c:1379:gst_omx_component_get_parameter:<omxh264enc-omxh264enc0> Got video_encode parameter at index 0x02000001: None (0x00000000)
0:00:02.868223387 837 0x159f5a0 DEBUG omx gstomx.c:1577:gst_omx_port_update_port_definition:<omxh264enc-omxh264enc0> Updated video_encode port 200 definition: None (0x00000000)
0:00:02.868347344 837 0x159f5a0 DEBUG omx gstomx.c:1960:gst_omx_port_set_flushing:<omxh264enc-omxh264enc0> Set video_encode port 200 to flushing: None (0x00000000)
0:00:02.868458540 837 0x159f5a0 DEBUG omx gstomx.c:1861:gst_omx_port_set_flushing:<omxh264enc-omxh264enc0> Setting video_encode port 201 to flushing
0:00:02.868565883 837 0x159f5a0 DEBUG omx gstomx.c:1867:gst_omx_port_set_flushing:<omxh264enc-omxh264enc0> video_encode port 201 was flushing already
0:00:02.868672965 837 0x159f5a0 DEBUG omx gstomx.c:1376:gst_omx_component_get_parameter:<omxh264enc-omxh264enc0> Getting video_encode parameter at index 0x02000001
0:00:02.868932180 837 0x159f5a0 DEBUG omx gstomx.c:1379:gst_omx_component_get_parameter:<omxh264enc-omxh264enc0> Got video_encode parameter at index 0x02000001: None (0x00000000)
0:00:02.869053168 837 0x159f5a0 DEBUG omx gstomx.c:1577:gst_omx_port_update_port_definition:<omxh264enc-omxh264enc0> Updated video_encode port 201 definition: None (0x00000000)
0:00:02.869172490 837 0x159f5a0 DEBUG omx gstomx.c:1960:gst_omx_port_set_flushing:<omxh264enc-omxh264enc0> Set video_encode port 201 to flushing: None (0x00000000)
0:00:02.869276812 837 0x159f5a0 DEBUG omx gstomx.c:1212:gst_omx_component_get_state:<omxh264enc-omxh264enc0> Getting state of video_encode
0:00:02.869384519 837 0x159f5a0 DEBUG omx gstomx.c:1262:gst_omx_component_get_state:<omxh264enc-omxh264enc0> video_encode returning state Loaded
0:00:02.869490351 837 0x159f5a0 DEBUG omx gstomx.c:1212:gst_omx_component_get_state:<omxh264enc-omxh264enc0> Getting state of video_encode
0:00:02.869597276 837 0x159f5a0 DEBUG omx gstomx.c:1262:gst_omx_component_get_state:<omxh264enc-omxh264enc0> video_encode returning state Loaded
Setting pipeline to NULL ...
0:00:02.870551223 837 0x159f5a0 DEBUG omxvideoenc gstomxvideoenc.c:957:gst_omx_video_enc_close:<omxh264enc-omxh264enc0> Closing encoder
0:00:02.870654607 837 0x159f5a0 DEBUG omxvideoenc gstomxvideoenc.c:934:gst_omx_video_enc_shutdown:<omxh264enc-omxh264enc0> Shutting down encoder
0:00:02.870755752 837 0x159f5a0 DEBUG omx gstomx.c:1212:gst_omx_component_get_state:<omxh264enc-omxh264enc0> Getting state of video_encode
0:00:02.870861011 837 0x159f5a0 DEBUG omx gstomx.c:1262:gst_omx_component_get_state:<omxh264enc-omxh264enc0> video_encode returning state Loaded
0:00:02.870969655 837 0x159f5a0 INFO omx gstomx.c:1022:gst_omx_component_free:<omxh264enc-omxh264enc0> Unloading component 0x15431e8 video_encode
0:00:02.871075696 837 0x159f5a0 INFO omx gstomx.c:2313:gst_omx_port_deallocate_buffers_unlocked:<omxh264enc-omxh264enc0> Deallocating buffers of video_encode port 200
0:00:02.871181111 837 0x159f5a0 DEBUG omx gstomx.c:2319:gst_omx_port_deallocate_buffers_unlocked:<omxh264enc-omxh264enc0> No buffers allocated for video_encode port 200
0:00:02.871289130 837 0x159f5a0 DEBUG omx gstomx.c:1376:gst_omx_component_get_parameter:<omxh264enc-omxh264enc0> Getting video_encode parameter at index 0x02000001
0:00:02.871550950 837 0x159f5a0 DEBUG omx gstomx.c:1379:gst_omx_component_get_parameter:<omxh264enc-omxh264enc0> Got video_encode parameter at index 0x02000001: None (0x00000000)
0:00:02.871672199 837 0x159f5a0 DEBUG omx gstomx.c:1577:gst_omx_port_update_port_definition:<omxh264enc-omxh264enc0> Updated video_encode port 200 definition: None (0x00000000)
0:00:02.871787510 837 0x159f5a0 DEBUG omx gstomx.c:2377:gst_omx_port_deallocate_buffers_unlocked:<omxh264enc-omxh264enc0> Deallocated buffers of video_encode port 200: None (0x00000000)
0:00:02.871892352 837 0x159f5a0 INFO omx gstomx.c:2313:gst_omx_port_deallocate_buffers_unlocked:<omxh264enc-omxh264enc0> Deallocating buffers of video_encode port 201
0:00:02.871993028 837 0x159f5a0 DEBUG omx gstomx.c:2319:gst_omx_port_deallocate_buffers_unlocked:<omxh264enc-omxh264enc0> No buffers allocated for video_encode port 201
0:00:02.872096464 837 0x159f5a0 DEBUG omx gstomx.c:1376:gst_omx_component_get_parameter:<omxh264enc-omxh264enc0> Getting video_encode parameter at index 0x02000001
0:00:02.872340107 837 0x159f5a0 DEBUG omx gstomx.c:1379:gst_omx_component_get_parameter:<omxh264enc-omxh264enc0> Got video_encode parameter at index 0x02000001: None (0x00000000)
0:00:02.872454949 837 0x159f5a0 DEBUG omx gstomx.c:1577:gst_omx_port_update_port_definition:<omxh264enc-omxh264enc0> Updated video_encode port 201 definition: None (0x00000000)
0:00:02.872568802 837 0x159f5a0 DEBUG omx gstomx.c:2377:gst_omx_port_deallocate_buffers_unlocked:<omxh264enc-omxh264enc0> Deallocated buffers of video_encode port 201: None (0x00000000)
0:00:02.872962391 837 0x159f5a0 DEBUG omx gstomx.c:211:gst_omx_core_release: Releasing core 0x15c5200
0:00:02.873056661 837 0x159f5a0 DEBUG omx gstomx.c:215:gst_omx_core_release: Deinit core 0x15c5200
Freeing pipeline ...
pi@raspberrypi:/home/cf/yavta $
"

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 7267
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

Wed Nov 21, 2018 1:35 pm

a) PLEASE use the code tags, otherwise your posts become almost unreadable.
b) Don't use sudo. You should never need to for a user application.
c) And I had suggested you set GST_DEBUG=omx*:7,v4l2*:7 - your logs confirm that the issue isn't with the omx component.

"Manually set the timings" - yes you need to call "v4l2-ctl --set-dv-bt-timings" or ioctl(with some form of configuration that correctly defines your source.
Having reread the docs, "v4l2-ctl --set-dv-bt-timings query" does it for you in one step without needing to look stuff up.
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.

Jacky Chen
Posts: 9
Joined: Thu Sep 27, 2018 8:08 am

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

Wed Nov 21, 2018 2:21 pm

Dear 6by9, Many thanks for your help.
Input video timings I detected is:

Code: Select all

v4l2-ctl --query-dv-timings
	Active width: 1280
	Active height: 720
	Total width: 1650
	Total height: 750
	Frame format: progressive
	Polarities: -vsync -hsync
	Pixelclock: 74250000 Hz (60.00 frames per second)
	Horizontal frontporch: 0
	Horizontal sync: 370
	Horizontal backporch: 0
	Vertical frontporch: 0
	Vertical sync: 30
	Vertical backporch: 0
	Standards: 
	Flags: 
But I can't find the same format item in supported video timings list. The most similar to it is index 7. But index 7 Polarities is "+vsync +hsync".
How deal with this problem? Do I need to change EDID file?

Jacky Chen
Posts: 9
Joined: Thu Sep 27, 2018 8:08 am

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

Wed Nov 21, 2018 2:30 pm

Following is supported timings list. I can't find same one with the detected input timing.

Code: Select all

v4l2-ctl --query-dv-timings
	Active width: 1280
	Active height: 720
	Total width: 1650
	Total height: 750
	Frame format: progressive
	Polarities: -vsync -hsync
	Pixelclock: 74250000 Hz (60.00 frames per second)
	Horizontal frontporch: 0
	Horizontal sync: 370
	Horizontal backporch: 0
	Vertical frontporch: 0
	Vertical sync: 30
	Vertical backporch: 0
	Standards: 
	Flags: 

Code: Select all

ioctl: VIDIOC_ENUM_DV_TIMINGS
	Index: 0
	Active width: 640
	Active height: 480
	Total width: 800
	Total height: 525
	Frame format: progressive
	Polarities: -vsync -hsync
	Pixelclock: 25175000 Hz (59.94 frames per second)
	Horizontal frontporch: 16
	Horizontal sync: 96
	Horizontal backporch: 48
	Vertical frontporch: 10
	Vertical sync: 2
	Vertical backporch: 33
	Standards: CEA-861, DMT
	Flags: 

	Index: 1
	Active width: 720
	Active height: 480
	Total width: 858
	Total height: 525
	Frame format: progressive
	Polarities: -vsync -hsync
	Pixelclock: 27000000 Hz (59.94 frames per second)
	Horizontal frontporch: 16
	Horizontal sync: 62
	Horizontal backporch: 60
	Vertical frontporch: 9
	Vertical sync: 6
	Vertical backporch: 30
	Standards: CEA-861
	Flags: CE-video

	Index: 2
	Active width: 720
	Active height: 576
	Total width: 864
	Total height: 625
	Frame format: progressive
	Polarities: -vsync -hsync
	Pixelclock: 27000000 Hz (50.00 frames per second)
	Horizontal frontporch: 12
	Horizontal sync: 64
	Horizontal backporch: 68
	Vertical frontporch: 5
	Vertical sync: 5
	Vertical backporch: 39
	Standards: CEA-861
	Flags: CE-video

	Index: 3
	Active width: 1280
	Active height: 720
	Total width: 3300
	Total height: 750
	Frame format: progressive
	Polarities: +vsync +hsync
	Pixelclock: 59400000 Hz (24.00 frames per second)
	Horizontal frontporch: 1760
	Horizontal sync: 40
	Horizontal backporch: 220
	Vertical frontporch: 5
	Vertical sync: 5
	Vertical backporch: 20
	Standards: CEA-861, DMT
	Flags: framerate can be reduced by 1/1.001

	Index: 4
	Active width: 1280
	Active height: 720
	Total width: 3960
	Total height: 750
	Frame format: progressive
	Polarities: +vsync +hsync
	Pixelclock: 74250000 Hz (25.00 frames per second)
	Horizontal frontporch: 2420
	Horizontal sync: 40
	Horizontal backporch: 220
	Vertical frontporch: 5
	Vertical sync: 5
	Vertical backporch: 20
	Standards: CEA-861
	Flags: CE-video

	Index: 5
	Active width: 1280
	Active height: 720
	Total width: 3300
	Total height: 750
	Frame format: progressive
	Polarities: +vsync +hsync
	Pixelclock: 74250000 Hz (30.00 frames per second)
	Horizontal frontporch: 1760
	Horizontal sync: 40
	Horizontal backporch: 220
	Vertical frontporch: 5
	Vertical sync: 5
	Vertical backporch: 20
	Standards: CEA-861
	Flags: framerate can be reduced by 1/1.001, CE-video

	Index: 6
	Active width: 1280
	Active height: 720
	Total width: 1980
	Total height: 750
	Frame format: progressive
	Polarities: +vsync +hsync
	Pixelclock: 74250000 Hz (50.00 frames per second)
	Horizontal frontporch: 440
	Horizontal sync: 40
	Horizontal backporch: 220
	Vertical frontporch: 5
	Vertical sync: 5
	Vertical backporch: 20
	Standards: CEA-861
	Flags: CE-video

	Index: 7
	Active width: 1280
	Active height: 720
	Total width: 1650
	Total height: 750
	Frame format: progressive
	Polarities: +vsync +hsync
	Pixelclock: 74250000 Hz (60.00 frames per second)
	Horizontal frontporch: 110
	Horizontal sync: 40
	Horizontal backporch: 220
	Vertical frontporch: 5
	Vertical sync: 5
	Vertical backporch: 20
	Standards: CEA-861
	Flags: framerate can be reduced by 1/1.001, CE-video

	Index: 8
	Active width: 1920
	Active height: 1080
	Total width: 2750
	Total height: 1125
	Frame format: progressive
	Polarities: +vsync +hsync
	Pixelclock: 74250000 Hz (24.00 frames per second)
	Horizontal frontporch: 638
	Horizontal sync: 44
	Horizontal backporch: 148
	Vertical frontporch: 4
	Vertical sync: 5
	Vertical backporch: 36
	Standards: CEA-861
	Flags: framerate can be reduced by 1/1.001, CE-video

	Index: 9
	Active width: 1920
	Active height: 1080
	Total width: 2640
	Total height: 1125
	Frame format: progressive
	Polarities: +vsync +hsync
	Pixelclock: 74250000 Hz (25.00 frames per second)
	Horizontal frontporch: 528
	Horizontal sync: 44
	Horizontal backporch: 148
	Vertical frontporch: 4
	Vertical sync: 5
	Vertical backporch: 36
	Standards: CEA-861
	Flags: CE-video

	Index: 10
	Active width: 1920
	Active height: 1080
	Total width: 2200
	Total height: 1125
	Frame format: progressive
	Polarities: +vsync +hsync
	Pixelclock: 74250000 Hz (30.00 frames per second)
	Horizontal frontporch: 88
	Horizontal sync: 44
	Horizontal backporch: 148
	Vertical frontporch: 4
	Vertical sync: 5
	Vertical backporch: 36
	Standards: CEA-861
	Flags: framerate can be reduced by 1/1.001, CE-video

	Index: 11
	Active width: 1920
	Active height: 1080
	Total width: 2640
	Total height: 1125
	Frame format: progressive
	Polarities: +vsync +hsync
	Pixelclock: 148500000 Hz (50.00 frames per second)
	Horizontal frontporch: 528
	Horizontal sync: 44
	Horizontal backporch: 148
	Vertical frontporch: 4
	Vertical sync: 5
	Vertical backporch: 36
	Standards: CEA-861
	Flags: CE-video

	Index: 12
	Active width: 1920
	Active height: 1080
	Total width: 2200
	Total height: 1125
	Frame format: progressive
	Polarities: +vsync +hsync
	Pixelclock: 148500000 Hz (60.00 frames per second)
	Horizontal frontporch: 88
	Horizontal sync: 44
	Horizontal backporch: 148
	Vertical frontporch: 4
	Vertical sync: 5
	Vertical backporch: 36
	Standards: CEA-861, DMT
	Flags: framerate can be reduced by 1/1.001, CE-video

	Index: 13
	Active width: 640
	Active height: 350
	Total width: 832
	Total height: 445
	Frame format: progressive
	Polarities: -vsync +hsync
	Pixelclock: 31500000 Hz (85.08 frames per second)
	Horizontal frontporch: 32
	Horizontal sync: 64
	Horizontal backporch: 96
	Vertical frontporch: 32
	Vertical sync: 3
	Vertical backporch: 60
	Standards: DMT
	Flags: 

	Index: 14
	Active width: 640
	Active height: 400
	Total width: 832
	Total height: 445
	Frame format: progressive
	Polarities: +vsync -hsync
	Pixelclock: 31500000 Hz (85.08 frames per second)
	Horizontal frontporch: 32
	Horizontal sync: 64
	Horizontal backporch: 96
	Vertical frontporch: 1
	Vertical sync: 3
	Vertical backporch: 41
	Standards: DMT
	Flags: 

	Index: 15
	Active width: 720
	Active height: 400
	Total width: 936
	Total height: 446
	Frame format: progressive
	Polarities: +vsync -hsync
	Pixelclock: 35500000 Hz (85.04 frames per second)
	Horizontal frontporch: 36
	Horizontal sync: 72
	Horizontal backporch: 108
	Vertical frontporch: 1
	Vertical sync: 3
	Vertical backporch: 42
	Standards: DMT
	Flags: 

	Index: 16
	Active width: 640
	Active height: 480
	Total width: 832
	Total height: 520
	Frame format: progressive
	Polarities: -vsync -hsync
	Pixelclock: 31500000 Hz (72.81 frames per second)
	Horizontal frontporch: 24
	Horizontal sync: 40
	Horizontal backporch: 128
	Vertical frontporch: 9
	Vertical sync: 3
	Vertical backporch: 28
	Standards: DMT
	Flags: 

	Index: 17
	Active width: 640
	Active height: 480
	Total width: 840
	Total height: 500
	Frame format: progressive
	Polarities: -vsync -hsync
	Pixelclock: 31500000 Hz (75.00 frames per second)
	Horizontal frontporch: 16
	Horizontal sync: 64
	Horizontal backporch: 120
	Vertical frontporch: 1
	Vertical sync: 3
	Vertical backporch: 16
	Standards: DMT
	Flags: 

	Index: 18
	Active width: 640
	Active height: 480
	Total width: 832
	Total height: 509
	Frame format: progressive
	Polarities: -vsync -hsync
	Pixelclock: 36000000 Hz (85.01 frames per second)
	Horizontal frontporch: 56
	Horizontal sync: 56
	Horizontal backporch: 80
	Vertical frontporch: 1
	Vertical sync: 3
	Vertical backporch: 25
	Standards: DMT
	Flags: 

	Index: 19
	Active width: 800
	Active height: 600
	Total width: 1024
	Total height: 625
	Frame format: progressive
	Polarities: +vsync +hsync
	Pixelclock: 36000000 Hz (56.25 frames per second)
	Horizontal frontporch: 24
	Horizontal sync: 72
	Horizontal backporch: 128
	Vertical frontporch: 1
	Vertical sync: 2
	Vertical backporch: 22
	Standards: DMT
	Flags: 

	Index: 20
	Active width: 800
	Active height: 600
	Total width: 1056
	Total height: 628
	Frame format: progressive
	Polarities: +vsync +hsync
	Pixelclock: 40000000 Hz (60.32 frames per second)
	Horizontal frontporch: 40
	Horizontal sync: 128
	Horizontal backporch: 88
	Vertical frontporch: 1
	Vertical sync: 4
	Vertical backporch: 23
	Standards: DMT
	Flags: 

	Index: 21
	Active width: 800
	Active height: 600
	Total width: 1040
	Total height: 666
	Frame format: progressive
	Polarities: +vsync +hsync
	Pixelclock: 50000000 Hz (72.19 frames per second)
	Horizontal frontporch: 56
	Horizontal sync: 120
	Horizontal backporch: 64
	Vertical frontporch: 37
	Vertical sync: 6
	Vertical backporch: 23
	Standards: DMT
	Flags: 

	Index: 22
	Active width: 800
	Active height: 600
	Total width: 1056
	Total height: 625
	Frame format: progressive
	Polarities: +vsync +hsync
	Pixelclock: 49500000 Hz (75.00 frames per second)
	Horizontal frontporch: 16
	Horizontal sync: 80
	Horizontal backporch: 160
	Vertical frontporch: 1
	Vertical sync: 3
	Vertical backporch: 21
	Standards: DMT
	Flags: 

	Index: 23
	Active width: 800
	Active height: 600
	Total width: 1048
	Total height: 631
	Frame format: progressive
	Polarities: +vsync +hsync
	Pixelclock: 56250000 Hz (85.06 frames per second)
	Horizontal frontporch: 32
	Horizontal sync: 64
	Horizontal backporch: 152
	Vertical frontporch: 1
	Vertical sync: 3
	Vertical backporch: 27
	Standards: DMT
	Flags: 

	Index: 24
	Active width: 800
	Active height: 600
	Total width: 960
	Total height: 636
	Frame format: progressive
	Polarities: -vsync +hsync
	Pixelclock: 73250000 Hz (119.97 frames per second)
	Horizontal frontporch: 48
	Horizontal sync: 32
	Horizontal backporch: 80
	Vertical frontporch: 3
	Vertical sync: 4
	Vertical backporch: 29
	Standards: DMT, CVT
	Flags: reduced blanking

	Index: 25
	Active width: 848
	Active height: 480
	Total width: 1088
	Total height: 517
	Frame format: progressive
	Polarities: +vsync +hsync
	Pixelclock: 33750000 Hz (60.00 frames per second)
	Horizontal frontporch: 16
	Horizontal sync: 112
	Horizontal backporch: 112
	Vertical frontporch: 6
	Vertical sync: 8
	Vertical backporch: 23
	Standards: DMT
	Flags: 

	Index: 26
	Active width: 1024
	Active height: 768
	Total width: 1344
	Total height: 806
	Frame format: progressive
	Polarities: -vsync -hsync
	Pixelclock: 65000000 Hz (60.00 frames per second)
	Horizontal frontporch: 24
	Horizontal sync: 136
	Horizontal backporch: 160
	Vertical frontporch: 3
	Vertical sync: 6
	Vertical backporch: 29
	Standards: DMT
	Flags: 

	Index: 27
	Active width: 1024
	Active height: 768
	Total width: 1328
	Total height: 806
	Frame format: progressive
	Polarities: -vsync -hsync
	Pixelclock: 75000000 Hz (70.07 frames per second)
	Horizontal frontporch: 24
	Horizontal sync: 136
	Horizontal backporch: 144
	Vertical frontporch: 3
	Vertical sync: 6
	Vertical backporch: 29
	Standards: DMT
	Flags: 

	Index: 28
	Active width: 1024
	Active height: 768
	Total width: 1312
	Total height: 800
	Frame format: progressive
	Polarities: +vsync +hsync
	Pixelclock: 78750000 Hz (75.03 frames per second)
	Horizontal frontporch: 16
	Horizontal sync: 96
	Horizontal backporch: 176
	Vertical frontporch: 1
	Vertical sync: 3
	Vertical backporch: 28
	Standards: DMT
	Flags: 

	Index: 29
	Active width: 1024
	Active height: 768
	Total width: 1376
	Total height: 808
	Frame format: progressive
	Polarities: +vsync +hsync
	Pixelclock: 94500000 Hz (85.00 frames per second)
	Horizontal frontporch: 48
	Horizontal sync: 96
	Horizontal backporch: 208
	Vertical frontporch: 1
	Vertical sync: 3
	Vertical backporch: 36
	Standards: DMT
	Flags: 

	Index: 30
	Active width: 1024
	Active height: 768
	Total width: 1184
	Total height: 813
	Frame format: progressive
	Polarities: -vsync +hsync
	Pixelclock: 115500000 Hz (119.99 frames per second)
	Horizontal frontporch: 48
	Horizontal sync: 32
	Horizontal backporch: 80
	Vertical frontporch: 3
	Vertical sync: 4
	Vertical backporch: 38
	Standards: DMT, CVT
	Flags: reduced blanking

	Index: 31
	Active width: 1152
	Active height: 864
	Total width: 1600
	Total height: 900
	Frame format: progressive
	Polarities: +vsync +hsync
	Pixelclock: 108000000 Hz (75.00 frames per second)
	Horizontal frontporch: 64
	Horizontal sync: 128
	Horizontal backporch: 256
	Vertical frontporch: 1
	Vertical sync: 3
	Vertical backporch: 32
	Standards: DMT
	Flags: 

	Index: 32
	Active width: 1280
	Active height: 768
	Total width: 1440
	Total height: 790
	Frame format: progressive
	Polarities: -vsync +hsync
	Pixelclock: 68250000 Hz (59.99 frames per second)
	Horizontal frontporch: 48
	Horizontal sync: 32
	Horizontal backporch: 80
	Vertical frontporch: 3
	Vertical sync: 7
	Vertical backporch: 12
	Standards: DMT, CVT
	Flags: reduced blanking

	Index: 33
	Active width: 1280
	Active height: 768
	Total width: 1664
	Total height: 798
	Frame format: progressive
	Polarities: +vsync -hsync
	Pixelclock: 79500000 Hz (59.87 frames per second)
	Horizontal frontporch: 64
	Horizontal sync: 128
	Horizontal backporch: 192
	Vertical frontporch: 3
	Vertical sync: 7
	Vertical backporch: 20
	Standards: DMT, CVT
	Flags: 

	Index: 34
	Active width: 1280
	Active height: 768
	Total width: 1696
	Total height: 805
	Frame format: progressive
	Polarities: +vsync -hsync
	Pixelclock: 102250000 Hz (74.89 frames per second)
	Horizontal frontporch: 80
	Horizontal sync: 128
	Horizontal backporch: 208
	Vertical frontporch: 3
	Vertical sync: 7
	Vertical backporch: 27
	Standards: DMT, CVT
	Flags: 

	Index: 35
	Active width: 1280
	Active height: 768
	Total width: 1712
	Total height: 809
	Frame format: progressive
	Polarities: +vsync -hsync
	Pixelclock: 117500000 Hz (84.84 frames per second)
	Horizontal frontporch: 80
	Horizontal sync: 136
	Horizontal backporch: 216
	Vertical frontporch: 3
	Vertical sync: 7
	Vertical backporch: 31
	Standards: DMT, CVT
	Flags: 

	Index: 36
	Active width: 1280
	Active height: 768
	Total width: 1440
	Total height: 813
	Frame format: progressive
	Polarities: -vsync +hsync
	Pixelclock: 140250000 Hz (119.80 frames per second)
	Horizontal frontporch: 48
	Horizontal sync: 32
	Horizontal backporch: 80
	Vertical frontporch: 3
	Vertical sync: 7
	Vertical backporch: 35
	Standards: DMT, CVT
	Flags: reduced blanking

	Index: 37
	Active width: 1280
	Active height: 800
	Total width: 1440
	Total height: 823
	Frame format: progressive
	Polarities: -vsync +hsync
	Pixelclock: 71000000 Hz (59.91 frames per second)
	Horizontal frontporch: 48
	Horizontal sync: 32
	Horizontal backporch: 80
	Vertical frontporch: 3
	Vertical sync: 6
	Vertical backporch: 14
	Standards: DMT, CVT
	Flags: reduced blanking

	Index: 38
	Active width: 1280
	Active height: 800
	Total width: 1680
	Total height: 831
	Frame format: progressive
	Polarities: +vsync -hsync
	Pixelclock: 83500000 Hz (59.81 frames per second)
	Horizontal frontporch: 72
	Horizontal sync: 128
	Horizontal backporch: 200
	Vertical frontporch: 3
	Vertical sync: 6
	Vertical backporch: 22
	Standards: DMT, CVT
	Flags: 

	Index: 39
	Active width: 1280
	Active height: 800
	Total width: 1696
	Total height: 838
	Frame format: progressive
	Polarities: +vsync -hsync
	Pixelclock: 106500000 Hz (74.93 frames per second)
	Horizontal frontporch: 80
	Horizontal sync: 128
	Horizontal backporch: 208
	Vertical frontporch: 3
	Vertical sync: 6
	Vertical backporch: 29
	Standards: DMT, CVT
	Flags: 

	Index: 40
	Active width: 1280
	Active height: 800
	Total width: 1712
	Total height: 843
	Frame format: progressive
	Polarities: +vsync -hsync
	Pixelclock: 122500000 Hz (84.88 frames per second)
	Horizontal frontporch: 80
	Horizontal sync: 136
	Horizontal backporch: 216
	Vertical frontporch: 3
	Vertical sync: 6
	Vertical backporch: 34
	Standards: DMT, CVT
	Flags: 

	Index: 41
	Active width: 1280
	Active height: 800
	Total width: 1440
	Total height: 847
	Frame format: progressive
	Polarities: -vsync +hsync
	Pixelclock: 146250000 Hz (119.91 frames per second)
	Horizontal frontporch: 48
	Horizontal sync: 32
	Horizontal backporch: 80
	Vertical frontporch: 3
	Vertical sync: 6
	Vertical backporch: 38
	Standards: DMT, CVT
	Flags: reduced blanking

	Index: 42
	Active width: 1280
	Active height: 960
	Total width: 1800
	Total height: 1000
	Frame format: progressive
	Polarities: +vsync +hsync
	Pixelclock: 108000000 Hz (60.00 frames per second)
	Horizontal frontporch: 96
	Horizontal sync: 112
	Horizontal backporch: 312
	Vertical frontporch: 1
	Vertical sync: 3
	Vertical backporch: 36
	Standards: DMT
	Flags: 

	Index: 43
	Active width: 1280
	Active height: 960
	Total width: 1728
	Total height: 1011
	Frame format: progressive
	Polarities: +vsync +hsync
	Pixelclock: 148500000 Hz (85.00 frames per second)
	Horizontal frontporch: 64
	Horizontal sync: 160
	Horizontal backporch: 224
	Vertical frontporch: 1
	Vertical sync: 3
	Vertical backporch: 47
	Standards: DMT
	Flags: 

	Index: 44
	Active width: 1280
	Active height: 1024
	Total width: 1688
	Total height: 1066
	Frame format: progressive
	Polarities: +vsync +hsync
	Pixelclock: 108000000 Hz (60.02 frames per second)
	Horizontal frontporch: 48
	Horizontal sync: 112
	Horizontal backporch: 248
	Vertical frontporch: 1
	Vertical sync: 3
	Vertical backporch: 38
	Standards: DMT
	Flags: 

	Index: 45
	Active width: 1280
	Active height: 1024
	Total width: 1688
	Total height: 1066
	Frame format: progressive
	Polarities: +vsync +hsync
	Pixelclock: 135000000 Hz (75.02 frames per second)
	Horizontal frontporch: 16
	Horizontal sync: 144
	Horizontal backporch: 248
	Vertical frontporch: 1
	Vertical sync: 3
	Vertical backporch: 38
	Standards: DMT
	Flags: 

	Index: 46
	Active width: 1280
	Active height: 1024
	Total width: 1728
	Total height: 1072
	Frame format: progressive
	Polarities: +vsync +hsync
	Pixelclock: 157500000 Hz (85.02 frames per second)
	Horizontal frontporch: 64
	Horizontal sync: 160
	Horizontal backporch: 224
	Vertical frontporch: 1
	Vertical sync: 3
	Vertical backporch: 44
	Standards: DMT
	Flags: 

	Index: 47
	Active width: 1360
	Active height: 768
	Total width: 1792
	Total height: 795
	Frame format: progressive
	Polarities: +vsync +hsync
	Pixelclock: 85500000 Hz (60.02 frames per second)
	Horizontal frontporch: 64
	Horizontal sync: 112
	Horizontal backporch: 256
	Vertical frontporch: 3
	Vertical sync: 6
	Vertical backporch: 18
	Standards: DMT
	Flags: 

	Index: 48
	Active width: 1360
	Active height: 768
	Total width: 1520
	Total height: 813
	Frame format: progressive
	Polarities: -vsync +hsync
	Pixelclock: 148250000 Hz (119.97 frames per second)
	Horizontal frontporch: 48
	Horizontal sync: 32
	Horizontal backporch: 80
	Vertical frontporch: 3
	Vertical sync: 5
	Vertical backporch: 37
	Standards: DMT, CVT
	Flags: reduced blanking

	Index: 49
	Active width: 1366
	Active height: 768
	Total width: 1792
	Total height: 798
	Frame format: progressive
	Polarities: +vsync +hsync
	Pixelclock: 85500000 Hz (59.79 frames per second)
	Horizontal frontporch: 70
	Horizontal sync: 143
	Horizontal backporch: 213
	Vertical frontporch: 3
	Vertical sync: 3
	Vertical backporch: 24
	Standards: DMT
	Flags: 

	Index: 50
	Active width: 1366
	Active height: 768
	Total width: 1500
	Total height: 800
	Frame format: progressive
	Polarities: +vsync +hsync
	Pixelclock: 72000000 Hz (60.00 frames per second)
	Horizontal frontporch: 14
	Horizontal sync: 56
	Horizontal backporch: 64
	Vertical frontporch: 1
	Vertical sync: 3
	Vertical backporch: 28
	Standards: DMT
	Flags: reduced blanking

	Index: 51
	Active width: 1400
	Active height: 1050
	Total width: 1560
	Total height: 1080
	Frame format: progressive
	Polarities: -vsync +hsync
	Pixelclock: 101000000 Hz (59.95 frames per second)
	Horizontal frontporch: 48
	Horizontal sync: 32
	Horizontal backporch: 80
	Vertical frontporch: 3
	Vertical sync: 4
	Vertical backporch: 23
	Standards: DMT, CVT
	Flags: reduced blanking

	Index: 52
	Active width: 1400
	Active height: 1050
	Total width: 1864
	Total height: 1089
	Frame format: progressive
	Polarities: +vsync -hsync
	Pixelclock: 121750000 Hz (59.98 frames per second)
	Horizontal frontporch: 88
	Horizontal sync: 144
	Horizontal backporch: 232
	Vertical frontporch: 3
	Vertical sync: 4
	Vertical backporch: 32
	Standards: DMT, CVT
	Flags: 

	Index: 53
	Active width: 1400
	Active height: 1050
	Total width: 1896
	Total height: 1099
	Frame format: progressive
	Polarities: +vsync -hsync
	Pixelclock: 156000000 Hz (74.87 frames per second)
	Horizontal frontporch: 104
	Horizontal sync: 144
	Horizontal backporch: 248
	Vertical frontporch: 3
	Vertical sync: 4
	Vertical backporch: 42
	Standards: DMT, CVT
	Flags: 

	Index: 54
	Active width: 1440
	Active height: 900
	Total width: 1600
	Total height: 926
	Frame format: progressive
	Polarities: -vsync +hsync
	Pixelclock: 88750000 Hz (59.90 frames per second)
	Horizontal frontporch: 48
	Horizontal sync: 32
	Horizontal backporch: 80
	Vertical frontporch: 3
	Vertical sync: 6
	Vertical backporch: 17
	Standards: DMT, CVT
	Flags: reduced blanking

	Index: 55
	Active width: 1440
	Active height: 900
	Total width: 1904
	Total height: 934
	Frame format: progressive
	Polarities: +vsync -hsync
	Pixelclock: 106500000 Hz (59.89 frames per second)
	Horizontal frontporch: 80
	Horizontal sync: 152
	Horizontal backporch: 232
	Vertical frontporch: 3
	Vertical sync: 6
	Vertical backporch: 25
	Standards: DMT, CVT
	Flags: 

	Index: 56
	Active width: 1440
	Active height: 900
	Total width: 1936
	Total height: 942
	Frame format: progressive
	Polarities: +vsync -hsync
	Pixelclock: 136750000 Hz (74.98 frames per second)
	Horizontal frontporch: 96
	Horizontal sync: 152
	Horizontal backporch: 248
	Vertical frontporch: 3
	Vertical sync: 6
	Vertical backporch: 33
	Standards: DMT, CVT
	Flags: 

	Index: 57
	Active width: 1440
	Active height: 900
	Total width: 1952
	Total height: 948
	Frame format: progressive
	Polarities: +vsync -hsync
	Pixelclock: 157000000 Hz (84.84 frames per second)
	Horizontal frontporch: 104
	Horizontal sync: 152
	Horizontal backporch: 256
	Vertical frontporch: 3
	Vertical sync: 6
	Vertical backporch: 39
	Standards: DMT, CVT
	Flags: 

	Index: 58
	Active width: 1600
	Active height: 900
	Total width: 1800
	Total height: 1000
	Frame format: progressive
	Polarities: +vsync +hsync
	Pixelclock: 108000000 Hz (60.00 frames per second)
	Horizontal frontporch: 24
	Horizontal sync: 80
	Horizontal backporch: 96
	Vertical frontporch: 1
	Vertical sync: 3
	Vertical backporch: 96
	Standards: DMT
	Flags: reduced blanking

	Index: 59
	Active width: 1600
	Active height: 1200
	Total width: 2160
	Total height: 1250
	Frame format: progressive
	Polarities: +vsync +hsync
	Pixelclock: 162000000 Hz (60.00 frames per second)
	Horizontal frontporch: 64
	Horizontal sync: 192
	Horizontal backporch: 304
	Vertical frontporch: 1
	Vertical sync: 3
	Vertical backporch: 46
	Standards: DMT
	Flags: 

	Index: 60
	Active width: 1680
	Active height: 1050
	Total width: 1840
	Total height: 1080
	Frame format: progressive
	Polarities: -vsync +hsync
	Pixelclock: 119000000 Hz (59.88 frames per second)
	Horizontal frontporch: 48
	Horizontal sync: 32
	Horizontal backporch: 80
	Vertical frontporch: 3
	Vertical sync: 6
	Vertical backporch: 21
	Standards: DMT, CVT
	Flags: reduced blanking

	Index: 61
	Active width: 1680
	Active height: 1050
	Total width: 2240
	Total height: 1089
	Frame format: progressive
	Polarities: +vsync -hsync
	Pixelclock: 146250000 Hz (59.95 frames per second)
	Horizontal frontporch: 104
	Horizontal sync: 176
	Horizontal backporch: 280
	Vertical frontporch: 3
	Vertical sync: 6
	Vertical backporch: 30
	Standards: DMT, CVT
	Flags: 

	Index: 62
	Active width: 1920
	Active height: 1200
	Total width: 2080
	Total height: 1235
	Frame format: progressive
	Polarities: -vsync +hsync
	Pixelclock: 154000000 Hz (59.95 frames per second)
	Horizontal frontporch: 48
	Horizontal sync: 32
	Horizontal backporch: 80
	Vertical frontporch: 3
	Vertical sync: 6
	Vertical backporch: 26
	Standards: DMT, CVT
	Flags: reduced blanking

	Index: 63
	Active width: 2048
	Active height: 1152
	Total width: 2250
	Total height: 1200
	Frame format: progressive
	Polarities: +vsync +hsync
	Pixelclock: 162000000 Hz (60.00 frames per second)
	Horizontal frontporch: 26
	Horizontal sync: 80
	Horizontal backporch: 96
	Vertical frontporch: 1
	Vertical sync: 3
	Vertical backporch: 44
	Standards: DMT
	Flags: reduced blanking

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 7267
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

Wed Nov 21, 2018 2:35 pm

Jacky Chen wrote:
Wed Nov 21, 2018 2:21 pm
But I can't find the same format item in supported video timings list. The most similar to it is index 7. But index 7 Polarities is "+vsync +hsync".
How deal with this problem? Do I need to change EDID file?
As noted in my previous comment, just use "v4l2-ctl --set-dv-bt-timings query" and it should use whatever it has detected.
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.

geosapien
Posts: 14
Joined: Fri Nov 23, 2018 7:01 pm

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

Fri Nov 23, 2018 7:08 pm

Hello,

I have been handed the task of getting a RPI3 to work with a B101 to make an encoder that will pass a UDP stream of it's captured content.
I have been going through all of the posts starting day 1 on this thread, trying everything along the way, and have yet to get this to work.
I have followed all of the instructions at https://www.mouser.com/ds/2/864/B10x_te ... 130369.pdf for the initial setup and for the FFMPEG to get UDP to work.
Here is my first concern when following your instructions:

pi@raspberrypi:~ $ deb http://www.linux-projects.org/listing/u ... an/stretch stretch main
-bash: deb: command not found
pi@raspberrypi:~ $ v4l2-ctl --set-edid=file=1080P50EDID.txt --fix-edid-checksums
-bash: v4l2-ctl: command not found
pi@raspberrypi:~ $ v4l2-ctl --query-dv-timings
-bash: v4l2-ctl: command not found

My other concern is that for anyone like me who is intermediate at best, who is following this thread and wishes to make this work, that all of the information in this thread can be overwhelming. Is there a final procedure for this set up? Just getting the 101 to pass video, not any thing else.

Thanks in advance

koop_g
Posts: 9
Joined: Sun Jan 14, 2018 2:20 pm

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

Mon Dec 31, 2018 8:29 am

Found some official info about the chip, maybe it would help some one to help us 8-)

TC358743

Features
HDMI-RX Interface
• HDMI 1.4
– Video Formats Support (Up to 1080P)
• RGB, YUV444: 24-bpp@60 fps
• YUV422 24-bpp @60 fps
– Audio Supports
• Internal Audio PLL to track N/CTS value transmitted by
the ACR packet
– 3D support
– Support for HDCP (High-bandwidth Digital Content
Protection)
– Support for DDC (Display Data Channel)


– Support for EDID (Extended Display Identification Data)
• Release A, Revision 1 (Feb 9, 2000)
• First 128 byte (EDID 1.3 structure)
• First E-EDID Extension: 128 bytes of CEA Extension version 3 (specified in CEA-861-D)
• Embedded 1K-byte SRAM (EDID_SRAM) – Maximum HDMI clock speed: 165 MHz
• Does not support Audio Return Path and HDMI Ethernet Channels CSI-2 TX Interface
• MIPI CSI-2 compliant (Version 1.01 Revision 0.04 – 2 April 2009) – Supports up to 4 data lanes
• Supports up to 1 Gbps per data lane – Video, Audio and InfoFrame data can be transmitted I2C Slave Interface
• Support for normal mode (100 KHz), fast mode (400KHz), and ultra fast mode (2 MHz)
• Configure all H2C internal registers Audio Output Interface Either I2 S or TDM Audio interface available (pins are multiplexed) 2S Audio Interface

• Single stereo channel
• Support Master Clock mode only
• Support 16, 18, 20 or 24-bit data (based on HDMI input stream)
• Support for left-justify or right-justify with MSB first TDM (Time Division Multiplexed) Audio Interface
• Single data link
• Support Master Clock mode only
• Up to 2,4,6 or 8 channels (based on HDMI input stream)
• Support 16, 18, 20 or 24-bit PCM audio data word (based on HDMI input stream) InfraRed (IR)
• Support NEC InfraRed protocol Power Supply Inputs
• Core and MIPI D-PHY: 1.2V
• I/O: 1.8V – 3.3V
• HDMI: 3.3V
• APLL: 3.3V/2.5V Package
• TC358743XBG: 64-pin, 6.0 x 6.0 mm, 0.65 mm ball pitch, 1.2 mm height

koop_g
Posts: 9
Joined: Sun Jan 14, 2018 2:20 pm

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

Mon Dec 31, 2018 1:45 pm

I can confirm :D
  • 2018-11-13-raspbian-stretch-lite
    official clean light stretch
    sudo apt-get update
    sudo apt-get upgrade -y
    SKIP_KERNEL=1 sudo rpi-update
    add cma=32M into /boot/cmdline.txt
    add dtoverlay=tc358743 into /boot/config.txt
    sudo reboot
    raspi-config
    SSH = TRUE
    ISP = TRUE
    I2C = TRUE
    PI-CAMERA = TRUE
    sudo apt-get install git
    git clone https://github.com/6by9/yavta
    wget https://raw.githubusercontent.com/6by9/ ... 50EDID.txt
    v4l2-ctl --set-edid=file=1080P50EDID.txt --fix-edid-checksums
    v4l2-ctl --query-dv-timings
    ./yavta --capture=1000 -n 3 --encode-to=file.h264 -f UYVY -m -T /dev/video0

and a canon 5d hdmi connected to a b101 board is playing on my monitor :D

THANK YOU @6by9 :mrgreen: :D

HAPPY NEW YEAR PI's
Last edited by koop_g on Wed Jan 02, 2019 9:25 pm, edited 2 times in total.

geosapien
Posts: 14
Joined: Fri Nov 23, 2018 7:01 pm

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

Wed Jan 02, 2019 4:39 pm

Thank you Koop!

I ran into this when following your instructions

pi@raspberrypi:~ $ v4l2-ctl --set-edid=file=1080P50EDID.txt --fix-edid-checksums
Failed to open 1080P50EDID.txt: No such file or directory

Also, what is PASS TNULEHIKANES ?
Any ideas?

Return to “Graphics, sound and multimedia”