Updates - Raspberry.Ninja
- Following up on the updated Raspberry.Ninja I did for the RPi the other day, I now finished building an updated version for the Nvidia Jetson Nano also. Download: https://drive.google.com/file/d/1B_ywphXQ49F9we3ytcM-Zn1h7dCYOLBh/view?usp=share_link -- It comes with GStreamer 1.23.0 installed, with libcamera, SRT, RTMP, ffmpeg, hardware-encode, and av1 support ready to go. -- Should fit on most 16-GB or larger uSD cards - username is
vdo
and the password isninja
The installer file is also updated, if you want to diy: https://github.com/steveseguin/raspberry_ninja/tree/main/nvidia_jetson
- Raspberry.Ninja was updated for Pi devices (1080p30 video from a Raspberry Pi device, straight to VDO.Ninja) -- created a new image for Raspberry Pi devices. It uses the newest Bullseye OS and has built-in support for many new advanced Sony cameras (the low light IMX462 was tested) -- libcamera support added (
python3 publish.py --libcamera
to use) -- av1, srt, and other codecs added to the image as well; should future-proof the image a bit, so I can add support for those down the road with updates. -- Newest version of gstreamer/WebRTC lib is installed now, so the video is more stable than ever; less frame loss than previous versions. -- install script also updated for the pi devices , so if you want to build the image yourself, now's your chance to do it hassle free. https://github.com/steveseguin/raspberry_ninja/blob/main/raspberry_pi/README.md (image + install for Raspberry Pi)
- Added pipe-in media support to Raspberry.Ninja. This lets you publish from FFmpeg, OBS, applications, etc to VDO.Ninja, without needing a browser, and optionally without having to do further transcoding. You can either have Raspberry.Ninja do transcoding with
--pipein auto
(automatic decode detectio) or--pipein raw
(just encode raw data), or you can do pass-thru without transcoding with--pipein=h264
,--pipein=vp9
,--pipein=vp8
or--pipein=mpegts
(mpegts is for YouTube-dl doing h264 /w audio) example usage:ffmpeg -i xxxx -o - | python publish.py --pipein auto
I've been developing and testing this code on an Nvidia Jetson, and so I've updated to theinstaller.sh
for that system as well, including adding SRT to it. Currently I just am support Linux with this code, but with some help I could have it working on Windows/Mac I bet -- I've been struggling to get it working on Windows, but I see a lot of value for it there.
- Added the option to stream a video file to VDO.Ninja using Raspberry.Ninja. You can do it with or without transcoding the file; audio isn't supported yet, but its a start. vp8/vp9 formats work best, but compatible variations of h264 files will work also. Technically, if streaming from Raspberry.Ninja -> Raspberry.Ninja, transparency layers should be preservable I think.
- Added support for the Theta Z1 360 4K camera to the Raspberry Ninja (jetson tested).
- Pushed a patch to Raspberry.Ninja; this patch offers a workaround for an issue on the pi/jetson disk images I'm hosting.. at least until I can get some new disk images made with a better fix. (there's a bug in the older libraries used, so I need to recompile it all to fix it properly)
- Updated Raspberry.Ninja with Error Correction + Dynamic Bitrate support. This essentially makes the video stability substantially better, and it's even a bit adaptive now to changes in available bandwidth.
--nored => Disable error correction. If you don't disable it,
the bandwidth may be up to 2x higher than the target video bitrate.
I do not recommend removing, unless you're on a pristine connection.
--noqos => "qos" will lower the bitrate of the video encoder if packet loss
is detected. It won't lower it more than 5x (20% of target),
but I find this works well to combat times where the network bandwidth is
insufficient. Error correction just doesn't work if it can't actually send
enough data. Using --noqos disables this feature
I lowered the default bitrate to 2500, which will be 5000-kbps with error
correction on. On a typical spotty WIFI connection, it might drop to 2000-kbps
(4-mbps total bandwidth).
I do NOT dynamically change the resolution, and 1500-kbps is about as low as
1080p will allow. So, if on weak cellular or wifi, you might want to use 720p
as the resolution. This should allow for a lower bitrate floor, allowing for
use in bad environments.
main
- https://raspberry.ninja/
To update, just go into the raspberry_ninja folder on your device, and do
git pull
.
I've yet to do full testing on a PI with it, but it's been working great on a Jetson board so far.- You can wire up an LED to the Raspberry_Ninja project now, on a RPI, to use as a connection-status indicator. see
https://raspberry.ninja/raspberry_pi/
- New URL for the Raspberry_Ninja project: https://raspberry.ninja/ (rather than having to scour GitHub to find it). And it's prettier than it used to be.
- Created a new uSD image for the Nvidia Jetson and the Raspberry_Ninja project; might help with audio issues. Might also work with newer Jetson boards. Compatible with uSD cards of size 16-GB and greater now.
- Added the ability to save the outbound video stream to disk when using raspberry_ninja. Just add
--save
as a CLI option and it will start saving the video + audio to disk. Viewers can connect as needed without disturbing the recording. - improved the rotate function recently added to raspberry_ninja; now does a native rotation when using the official raspberry pi camera
- Faster reconnecting when not using
--multiviewer
on the raspberry_ninja; hangs up the old connection immediately when it intentionally disconnects (such as a browser refresh)
- Added the ability to rotate the camera (via command line ) on the Raspberry_Ninja. Portrait mode or flipped video can be supported as a result.
- Added basic room support to raspberry_ninja. Use:
--room ROOMNAME --multiviewer
- Fixed a couple glitches with the raspberry_ninja project when self hosting with multiple cameras and related fixes/improvements (like not needing to refresh the viewer page to trigger it to play). Updates on GitHub
- Added the ability to customize the audio bitrate with raspberry_ninja
--audiobitrate 256
- The raspberry_ninja project had a major update; new RPI image (v3), which enables USB video to now hardware encode properly at 1080p30. Also, HDMI to CSI adapter support added (audio support still needs some work tho). This project lets you stream HD video at sub-second latency to VDO.Ninja using a raspberry pi or Jetson from the command line and headless.
Last modified 1mo ago