Composite Video in LE10 on RPi4

  • Hi there,

    I've been using my Raspberry Pi 4 4GB with LE9 connected to an old crt tv for some time by adding enable_tvout=1 to the config.txt. That doesn't seem to be working in the beta2 of LE10 or the latest nightly, the pi shows the rainbow screen on startup, but then just a black screen. I've seen some other posts that mention using a commandline file to set video options in LE 10, but I'm not sure how to set that up with composite video. Basically, am I configuring things wrong, or have I run into a bug in the beta?

  • Composite video output isn't fully implemented yet in the new graphics driver.

    Some initial support was recently included in the RPi kernel but these changes aren't available in LibreELEC builds yet - the latest RPi kernels introduced some regressions and we are waiting for these to be fixed before we include the update in LE.

    so long,

    Hias

  • Okay, thanks for the response! I'll stick with LE9 for now. What's the best way to keep up with the changelogs for LE10 so I can see when composite support is added?

  • You can follow the master branch on github GitHub - LibreELEC/LibreELEC.tv: Just enough OS for KODI or the LE release posts.

    If RPi kernel is bumped to 5.10.30 or newer it'll have the initial composite patches.

    But note that the composite change is pretty new, probably incomplete and/or needs additional configuration - I haven't tested that myself yet (my TV doesn't have analog video inputs so I have to leave that to someone else).

    so long,

    Hias

  • Let me continue on this thread as my problem is exact the same as the initial request, just that I'm not able to get the composite output working at all.

    - Tried both 9.7 and 10.x

    - Tried adding: enable_tvout=1, sdtv_mode=2 to the config.txt

    - Tried different cables

    - Tried reinstalling several times the raspberry sd.

    All that and a lot more without success for 1 week.

    Somehow I was able to see a rainbow on the tv and then a blank screen, but that the most I couldn't get.

    Any idea what else to check or test in order to get the composite output working?


    Help would be much appreciated!

  • I think you'll need to add to cmdline.txt (on same line) something like:

    video=Composite-1:720x576@50i

    if you are using LE10. But I don't have a composite display to hand so can't confirm that.

  • Getting composite video on RPi4 is currenntly a bit messy as composite has to be expicitly enabled in the kms driver, too (on RPi0-3 it's enabled by default in kms and there's an option to disable it).

    This means you either have to modify distroconfig.txt (which isn't great as it will be replaced on every upgrade) or copy the contents of distroconfig.txt to config.txt and disable the distroconfig.txt include (which isn't great either as you may miss important changes to distroconfig.txt on upgrades).

    That being said you need to make 3 changes to get composite out on LE 10.0.1:

    add "composite=1" to the kms dtoverlay in distroconfig.txt

    Code
    dtoverlay=vc4-kms-v3d,cma-512,composite=1

    enable tvout in config.txt

    Code
    enable_tvout=1

    set your desired mode in cmdline.txt (on the same line after "quiet"). eg for PAL:

    Code
    video=Composite-1:720x576@50ie

    or for NTSC:

    Code
    video=Composite-1:720x480@60ie

    Note the "e" at the end, it's important, if you omit this kodi won't detect the output (as connector status is "unknown" because composite doesn't have hotplug detect, with "e" in the mode it's forced to "on").

    so long,

    Hias

  • Hello @Hias,

    I'm having the same issue as saidsoftly (R PI 8GB with LE 10) and tried your suggestion but it didn't work. In my case, I get a black screen and the red RCA line causes buzzing on the TV. What's more, your note about, (on the same line after "quiet"), there isn't such a line for me in the config file under /flash/config.txt. Am I updating the wrong config.txt file?

    Thanks,

    Moe

  • Hias, Thank you for your time and effort. I am getting better results now. Ok, as noted in my original post, the Red RCA plug buzzes when plugged in? Turns out that the buzzing was the video signal. So when I plug the Red cable into the Video (Yellow) socket of the TV, I got VIDEO but no sound when plugging in the white and yellow into the remaining white and red RCA sockets. So I got out my multimeter to confirm my 4-pole jack and did some research, seems that this is what is the coloring/standard Raspberry PI follows (note pin #4 closest to the body of the jack):



    and this is how my cable is colored (Yellow and Red are swapped):



    So Red plug rather than Yellow for the video signal, no big deal. But any clues as to why I don't get any audio? No audio from Kodi's menu navigation sounds nor when playing a movie. I toned out the other RCA plugs (white and yellow) and ground pin, they all consistent--just minor color difference in Video.

    Here are my edits noted in bold red text:


    distroconfig.txt (complete file contents)

    # WARNING: DO NOT EDIT THIS FILE - IT WILL BE OVERWRITTEN WHEN UPGRADING!

    arm_64bit=1

    kernel=kernel.img

    dtoverlay=vc4-kms-v3d,cma-512,composite=1

    dtoverlay=rpivid-v4l2

    dtoverlay=

    disable_overscan=1

    disable_fw_kms_setup=1

    config.txt (file excerpt)

    # Don't send initial active source message.

    # Avoids bringing CEC (enabled TV) out of standby and channel switch when

    # rebooting.

    hdmi_ignore_cec_init=1

    enable_tvout=1

    cmdline.txt (complete file contents)

    boot=UUID=3010-5350 disk=UUID=a8e8a687-3b0f-472c-a2e4-3e8c903fd088 quiet video=Composite-1:720x480@60ie


    Side Note: This is an awesome site for posting images and general editing of forum posts, very modern and easy to get the formatting and layout one would need.

  • HiassofT, I also read up on your post about adding the following to config.txt, but this didn't work. Would you recommend downgrading to LE 9.X to get the Analog/3.5mm audio to work?

    Code
    dtparam=audio=on
    audio_pwm_mode=1
  • You don't need to downgrade LE to 9.x (to get the Audio working on Analog jack) if you added audio parameters mentioned above to config.txt, just reboot and then set the Audio output device in Settings/System/Audio to ALSA:bcm2835 Headphones, bcm2835 Headphones

    Hopefully it should work.

  • Follow up issue and I read this on another thread. The issue is minor but noticeable. There is some small humming/buzzing noise on the composite/analog output line. Any ideas?

  • Maybe you can try audio_pwm_mode=2 instead, I think I saw a mention somewhere here that it could improve an analog sound quality.

    Otherwise it could be a cabling issue (a ground loop or a cable shield issue) or a Power Supply issue (insufficient power, the PSU should be at least 15W type = 5V/3A). Also make sure the both devices, connected with AV cable, are powered from the 'same or very next' power outlet.

    You may also try to test just the audio output with headphones / audio bar (if you have one, powered by battery) connected through 3 wires audio cable only to see if the issue is the same or not.

  • ghtester After some testing, audio_pwm_mode=2 sounds better but every 7 seconds the audio cuts out for a second then comes back, this repeats indefinitely. After careful listening, audio_pwm_mode=1 works fine actually (seems the humming/buzzing may be related to what you noted about grounding or power and reseating the connectors may have helped?). However, after continuous listening to different movie playback, it appears there is some low frequency rumbling going on when audio is playing--at least that was the case for the movies I tested with and they were 720p quality. At this point, going to stick with how things are as this is going to be running on a Pi 4 in our SUV and this SUV has the ability to accept Bluetooth audio, so will be trying that out in the near future as it appears Pi 4 can send audio over Bluetooth but this is a battle for another day. Thanks again!

    Update: That low rumbling noise on playback was my mistake, I had Kodi's "Volume Amplification" maxed out where it should have been like 8-`10 dB:



    Once I had adjusted this, the sounds was very good! Nice! Thanks again for all the awesome support all.

    Edited 2 times, last by moehoward (November 20, 2021 at 6:08 PM).

  • Thank you for the tip regarding config.txt! It's now possible to use the analog audio output.

    In LibreELEC9 I've been using a setting which allowed HDMI and analog output at the same time. I had it enabled all the time and found it very convenient. Is there a setting like this in LibreELEC 10? I've tried all the entries in Audio Output settings but it was always HDMI or analog.