poker
Posts: 3
Joined: Mon Aug 05, 2019 12:43 pm

raspberry pi zero w no camera preview on tv out pin (composit)

Mon Aug 05, 2019 12:53 pm

Hi
I connected a v2 camera to my Raspberry pi zero w and i can see camera preview with hdmi port but when i connect my Raspberry with tv out pin I can't see camera preview with raspivid command and python script using picamera .
What should I do?
Please help.

fruitoftheloom
Posts: 20907
Joined: Tue Mar 25, 2014 12:40 pm
Location: Delightful Dorset

Re: raspberry pi zero w no camera preview on tv out pin (composit)

Mon Aug 05, 2019 2:21 pm

poker wrote:
Mon Aug 05, 2019 12:53 pm
Hi
I connected a v2 camera to my Raspberry pi zero w and i can see camera preview with hdmi port but when i connect my Raspberry with tv out pin I can't see camera preview with raspivid command and python script using picamera .
What should I do?
Please help.

Is this how you achieved Composite Output ?

https://thepihut.com/blogs/raspberry-pi ... ry-pi-zero
Retired disgracefully.....

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

Re: raspberry pi zero w no camera preview on tv out pin (composit)

Mon Aug 05, 2019 2:36 pm

You've disconnected the HDMI display, and have the console/GUI visible on the composite out?

The Pi0 will only put the console/GUI on one display at a time, and HDMI and TV out are mutually exclusive.
If the console/GUI is on the composite out, then raspivid's preview should follow that.
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.

poker
Posts: 3
Joined: Mon Aug 05, 2019 12:43 pm

Re: raspberry pi zero w no camera preview on tv out pin (composit)

Mon Aug 05, 2019 4:24 pm

fruitoftheloom wrote:
Mon Aug 05, 2019 2:21 pm
poker wrote:
Mon Aug 05, 2019 12:53 pm
Hi
I connected a v2 camera to my Raspberry pi zero w and i can see camera preview with hdmi port but when i connect my Raspberry with tv out pin I can't see camera preview with raspivid command and python script using picamera .
What should I do?
Please help.

Is this how you achieved Composite Output ?

https://thepihut.com/blogs/raspberry-pi ... ry-pi-zero
Yes i achieved Composite Output fully like this

poker
Posts: 3
Joined: Mon Aug 05, 2019 12:43 pm

Re: raspberry pi zero w no camera preview on tv out pin (composit)

Mon Aug 05, 2019 5:18 pm

6by9 wrote:
Mon Aug 05, 2019 2:36 pm
You've disconnected the HDMI display, and have the console/GUI visible on the composite out?

The Pi0 will only put the console/GUI on one display at a time, and HDMI and TV out are mutually exclusive.
If the console/GUI is on the composite out, then raspivid's preview should follow that.
yes i have a visible console on composite
but i cant see camera preview on composite if i remove composite and connect hdmi i can see camera preview
it seems that raspbian only render camera to hdmi port is it true?
and how i can change this ?

SanderV2
Posts: 5
Joined: Wed Sep 18, 2019 9:58 am

Re: raspberry pi zero w no camera preview on tv out pin (composit)

Wed Sep 18, 2019 10:07 am

Hi All,

I am experincing the exact same issue. I did find a post of someone who seems to have got it working, but it didn't work for me. See link below.
https://hackaday.io/project/12450-raspb ... escription

Did you get it working by any chance?

SanderV2
Posts: 5
Joined: Wed Sep 18, 2019 9:58 am

Re: raspberry pi zero w no camera preview on tv out pin (composit)

Wed Sep 18, 2019 2:03 pm

Small update.

I downgraded to Raspbian Stretch and there it works like a charm. So it seems to be an issue with Raspbian Buster.

I have no idea how to solve this so I will stick to Stretch for now.

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

Re: raspberry pi zero w no camera preview on tv out pin (composit)

Wed Sep 18, 2019 2:14 pm

This is most likely to be something having changed in the firmware, but it would help if you could identify roughly where/when.

- Backup your SD card in case things go bad
- Use "sudo rpi-update" to update your Stretch install to the latest firmware and kernel.
- Reboot.
- Does that fail?
If it does then use "sudo rpi-update <hash>" where <hash> is a commit ID from https://github.com/Hexxeh/rpi-firmware/commits/master to downgrade to an older firmware.
Report back roughly where things change from working to not working.

(The fastest way to go about this is to jump back 20 or so versions at a time. When it starts working, then come forward 10 versions. Depending on whether that works go back or forward 5 commits. Within not very many tests you'll have found where the breakage actually happens).
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.

User avatar
HermannSW
Posts: 1581
Joined: Fri Jul 22, 2016 9:09 pm
Location: Eberbach, Germany
Contact: Website Twitter YouTube

Re: raspberry pi zero w no camera preview on tv out pin (composit)

Wed Sep 18, 2019 2:39 pm

6by9 wrote:
Wed Sep 18, 2019 2:14 pm
..., but it would help if you could identify roughly where/when.

- Backup your SD card in case things go bad
- Use "sudo rpi-update" to update your Stretch install to the latest firmware and kernel.
- Reboot.
- Does that fail?
If it does then use "sudo rpi-update <hash>" where <hash> is a commit ID from https://github.com/Hexxeh/rpi-firmware/commits/master to downgrade to an older firmware.
Report back roughly where things change from working to not working.

(The fastest way to go about this is to jump back 20 or so versions at a time. When it starts working, then come forward 10 versions. Depending on whether that works go back or forward 5 commits. Within not very many tests you'll have found where the breakage actually happens).
Thanks for that problem identification procedure -- this information would be good to have in a new pinned thread, perhaps in Troubleshooting forum ...
⇨https://stamm-wilbrandt.de/en/Raspberry_camera.html

https://github.com/Hermann-SW/Raspberry_v1_camera_global_external_shutter
https://gitlab.freedesktop.org/HermannSW/gst-template
https://github.com/Hermann-SW/fork-raspiraw
https://twitter.com/HermannSW

SanderV2
Posts: 5
Joined: Wed Sep 18, 2019 9:58 am

Re: raspberry pi zero w no camera preview on tv out pin (composit)

Tue Oct 01, 2019 8:27 am

Updated to the latest version of Stretch and it works like it should. Seems to be an issues specific to Buster.

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

Re: raspberry pi zero w no camera preview on tv out pin (composit)

Tue Oct 01, 2019 10:01 am

SanderV2 wrote:
Tue Oct 01, 2019 8:27 am
Updated to the latest version of Stretch and it works like it should. Seems to be an issues specific to Buster.
Stretch is no longer being updated, therefore it will be on an old kernel and firmware. Use "vcgencmd version" and "uname -a" to confirm.

Run "sudo rpi-update" on your Stretch install and you will get the latest kernel and firmware. I suspect you'll get the same issue there.

It is highly unlikely to be anything to do with Buster per se.

As requested in the previous instructions, please use rpi-update with a commit hash to identify roughly when things start failing. Engineering time to investigate any issues is in short supply, so if you've done some of the detective work, then we can get to the bottom of the issue far faster.
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.

SanderV2
Posts: 5
Joined: Wed Sep 18, 2019 9:58 am

Re: raspberry pi zero w no camera preview on tv out pin (composit)

Wed Oct 02, 2019 4:05 pm

6by9 wrote:


Run "sudo rpi-update" on your Stretch install and you will get the latest kernel and firmware. I suspect you'll get the same issue there.
This is exactly what I did and the issue still did not occur.
6by9 wrote:
Stretch is no longer being updated, therefore it will be on an old kernel and firmware. Use "vcgencmd version" and "uname -a" to confirm.
I will run these commands tomorrow and inform you on the results

SanderV2
Posts: 5
Joined: Wed Sep 18, 2019 9:58 am

Re: raspberry pi zero w no camera preview on tv out pin (composit)

Thu Oct 03, 2019 12:35 pm

Below is the terminal after running the commands that were mentioned.

Code: Select all

[email protected]:~ $ vcgencmd version 
Sep 24 2019 17:39:25 
Copyright (c) 2012 Broadcom 
version 6820edeee4ef3891b95fc01cf02a7abd7ca52f17 (clean) (release) (start_x) 
[email protected]:~ $  uname -a
Linux raspberrypi 4.19.75+ #1270 Tue Sep 24 18:38:54 BST 2019 armv61 GNU/Linux 

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

Re: raspberry pi zero w no camera preview on tv out pin (composit)

Thu Oct 03, 2019 2:22 pm

I don't have a Pi0 with composite header wired in to hand, but testing on a Pi3 with Buster it is working fine.

If you can SSH in, then run raspistill, and whilst it is running run "vcgencmd dispmanx_list" to dump out the list of elements that are on the display. For me with composite connected I get

Code: Select all

[email protected]:~ $ vcgencmd dispmanx_list
display:3 format:RGB565 transform:0 layer:-127 720x480 src:0,0,720,480 dst:0,0,720,480 cost:389 lbm:0 
display:3 format:YUV420 transform:0 layer:2 1024x768 src:0,0,1024,768 dst:40,0,640,480 cost:1232 lbm:10240 
The RGB565 layer is the frame buffer, and the YUV420 layer is the preview window. The fact that they are tagged as "display=3" means they are on the composite output. HDMI would be display=2, and DPI or DSI would be display=0.
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.

CarstenT
Posts: 23
Joined: Tue May 14, 2013 9:04 am

Re: raspberry pi zero w no camera preview on tv out pin (composit)

Fri Nov 08, 2019 5:59 pm

For what it's worth, I lost the preview after having seen it the first couple of times. The camera sits on a rpi 4b (two hdmi out?) and goes to a fairly new tv with hdmi in. The tv has multible options that somewhat fooled the screen-setup, but that's ok now. I could have got the preview before updating buster, but I'm not sure. I havn't been at this problem for long so just this as an add-on to this thread.

User avatar
HermannSW
Posts: 1581
Joined: Fri Jul 22, 2016 9:09 pm
Location: Eberbach, Germany
Contact: Website Twitter YouTube

Re: raspberry pi zero w no camera preview on tv out pin (composit)

Fri Nov 08, 2019 8:06 pm

6by9 wrote:
Thu Oct 03, 2019 2:22 pm
The fact that they are tagged as "display=3" means they are on the composite output. HDMI would be display=2, and DPI or DSI would be display=0.
From a 6by9 hint in another thread, HDMI1 is 7:
https://www.raspberrypi.org/forums/view ... 4#p1545341
0 = DSI/DPI LCD
2 = HDMI0
3 = SDTV
7 = HDMI1
⇨https://stamm-wilbrandt.de/en/Raspberry_camera.html

https://github.com/Hermann-SW/Raspberry_v1_camera_global_external_shutter
https://gitlab.freedesktop.org/HermannSW/gst-template
https://github.com/Hermann-SW/fork-raspiraw
https://twitter.com/HermannSW

Return to “Camera board”