Hello there :)
I see that experimental support was added for H264 streaming, but I don't see any way to enable it in the GUI. I'm guessing it's done over SSH and if so, how?
Thanks!
- Michael Lynch @michael2022-05-13 12:07:09.695Z2022-05-16 15:48:50.106Z
We're in the process of simplifying these instructions for a blog post Monday, but here's the current process once you've updated to 2.4.1:
Requirements
- Debian 10 (Buster)
We don't yet have builds working for Ubuntu or later versions of Debian.
Enable H264
echo 'ustreamer_h264_sink: tinypilot::ustreamer::h264 ustreamer_h264_sink_mode: 777 ustreamer_h264_sink_rm: yes ustreamer_compile_janus_plugin: yes tinypilot_install_janus: yes' | sudo tee --append /home/tinypilot/settings.yml && \ sudo /opt/tinypilot/quick-install && \ sudo apt-get autoremove --yes && \ sudo reboot
Note that the installation process builds the WebRTC server from source on the device, so it takes about 30 minutes for the initial installation. We're working on a pre-made binary to avoid this slow process.
Disable H264
TINYPILOT_SETTINGS='/home/tinypilot/settings.yml' sudo sed --in-place '/^ustreamer_h264_sink:/d' "${TINYPILOT_SETTINGS}" && \ sudo sed --in-place '/^ustreamer_h264_sink_mode:/d' "${TINYPILOT_SETTINGS}" && \ sudo sed --in-place '/^ustreamer_h264_sink_rm:/d' "${TINYPILOT_SETTINGS}" && \ sudo sed --in-place '/^ustreamer_compile_janus_plugin:/d' "${TINYPILOT_SETTINGS}" && \ sudo sed --in-place '/^tinypilot_install_janus:/d' "${TINYPILOT_SETTINGS}" && \ sudo systemctl disable janus && \ sudo service janus stop && \ sudo /opt/tinypilot/quick-install && \ sudo reboot
- NNightLink42 @NightLonk42
Awesome ty!
I did get an error trying to disable H64 though
TASK [tinypilot.tinypilot-pro : patch Janus plugin.h file to successfully include refcount.h file] *** skipping: [localhost] TASK [ansible-role-ustreamer : check that the H264 variables are in a consistent state] *** fatal: [localhost]: FAILED! => {"changed": false, "msg": "The H264 variables are in an inconsistent state. You must set the ustreamer_h264_sink variable in order to set other H264 variables."}
- Michael Lynch @michael2022-05-16 15:43:02.364Z
Sorry about that! I had an error in the disabling instructions. I've updated the snippet above. If you re-run the instructions, it should disable H264 successfully.
- In reply tomichael⬆:DDan Medhurst @d4nm3d
Hi, i've just tried to enable after updating and i receive the following error :
TASK [ansible-role-janus-gateway : Install required platform dependencies] *************************************************************************************************************************************
fatal: [localhost]: FAILED! => {"changed": false, "msg": "No package matching 'gstreamer1.0-doc' is available"}- Michael Lynch @michael2022-05-16 15:41:53.023Z
Thanks for reporting this! What OS is running on the target system?
- DDan Medhurst @d4nm3d
HI, it's running :
Distributor ID: Raspbian
Description: Raspbian GNU/Linux 11 (bullseye)
Release: 11
Codename: bullseye- Michael Lynch @michael2022-05-16 15:51:28.410Z
Ah, it needs to be Debian Buster. I've updated the instructions above.
A huge part of the Pi's H264 encoding stack changed between Buster and Bullseye, and the Bullseye APIs are unfortunately not backwards compatible, so it's going to take some more work to get everything working on Bullseye.
I've enabled H264 and it works well. Are the GUI video settings no longer relevant with H264?
- Michael Lynch @michael2022-05-18 18:40:01.882Z
Frame rate still has an effect, but JPEG quality doesn't. We're working on integrating H264 support into the web UI so that the settings match the video mode you're using.
- LIn reply toNightLonk42⬆:Michael @Lateralus11235
I was able to successfully install this update. Here are some observations:
- Will not work in Safari (latest releases) in either iOS or MacOS. The site comes up but the video will not display. If I refresh in iOS is briefly shows up and then disappears. This is with or without the visual keyboard on.
- Works fine using the Edge browser in MacOS, but not on iOS.
- I have Tailscale installed on my tiny pilot. I cannot access it on either iOS (same issue above re: browsers likely the issue) but also can’t from a MacBook Pro running Edge.
- On a very positive note, it’s very smooth rendering when using the Edge browser - a definite improvement.
- Michael Lynch @michael2022-05-18 18:42:54.712Z
Thanks for reporting this! I've filed a Github issue to track the issue on Safari:
https://github.com/tiny-pilot/tinypilot/issues/979
Did video streaming work on Edge under iOS before H264?
- LMichael @Lateralus11235
Yes, stream worked (works) fine in both Safari and Edge. Not sure if this helps but if I refresh the page repeatedly in edge or Safari on iOS I see the server screen (and it is live), but it immediately drops.
- In reply toLateralus11235⬆:
On a similar note, Firefox lags more than Chrome, and seems the same as MJPEG. I'm not sure if that is to be expected.