steveseguin / raspberry_ninja

Publish or capture VDO.Ninja streams with Python (Raspberry Pi, Linux, Mac, Windows WSL)
https://raspberry.ninja
151 stars 30 forks source link

No audio orangepi #39

Closed estudio6-streaming closed 7 months ago

estudio6-streaming commented 7 months ago

On the orange pi this command is executed. python3 publish.py --v4l2 /dev/video0 --alsa h:0,0 --streamid SomeStreamID --bitrate 2000. there is no audio, but this one is executed. python3 publish.py --v4l2 /dev/video0 --alsa h:0,0 --zerolatency --streamid SomeStreamID --bitrate 2000. now there is audio but no video What can be?

steveseguin commented 7 months ago

which orange pi and which OS?

what audio device is connected?

Which install instructions did you follow?

estudio6-streaming commented 7 months ago

which orange pi and which OS? It is an Orange PI 5B with a debian operating system (Orangepi5b_1.0.8_debian_bullseye_server_linux6.1.43) what audio device is connected? I have a webcam connected Which install instructions did you follow? I followed the instructions in the Orangepi folder but the test did not work, it said that python3 is not installed, so I continued with the generic quick installation method thank you

steveseguin commented 7 months ago

I updated the Orange Pi install instructions, but they are now pretty much the same as the generic install. Bookworm broke something with the older instructions.

I installed Bookworm on my OP5+ and connected a Logitech webcam.

Things work with python3 publish.py without issue. It auto-detected the right audio device and audio/video work. For me, the audio device is on hw:4,0 , not h:0,0, but that may not be the issue here.

image

You can add --debug to see the error, if there is one, such as:

image

Using this python3 publish.py --v4l2 /dev/video0 --alsa hw:4,0 --bitrate 2000 works for me, with audio and video. However, with --zerolatency, it does break the video, but that's a bit expected.

--zerolatency is designed for low latency audio. It will disable the video to ensure the audio is low latency as possible. The video pipeline is already configured to be low latency, so this is purely for audio where packet loss is less of an issue to the end result. So instead, --zerolatency disables audio resampling, drops the bitrate to 16kbps, disables error correction, and makes the chunk size 20ms I think.

image

Anyways, if the audio isn't working without zerolatency, I'd double check the alsa device is right, and if it is, publish the gstreamer pipeline here, and perhaps also the debug log.

As mentioned, it's all working fine here, with a mirrored setup, so I'm not sure what could be wrong.

estudio6-streaming commented 7 months ago

Hello, it works now, I installed the Bookworm version and followed the steps and it works perfectly. Thank you