Android emulator and Docker on Windows can’t be used at the same time. I want to use Raspberry Pi to set up a development environment. I just watched the live broadcast recently, so maybe running an RTMP live broadcast on the Raspberry Pi is a good idea.
The live streaming is using FFmpeg, a command-line tool for video conversion. By installing H264 and FFmpeg on the Raspberry Pi, we can use Pi for RTMP streaming live.
The advantage of this solution is that the Raspberry Pi low power consumption, but can the same hardware solution by GPU, the CPU occupancy rate is not high, which can support Raspberry Pi running more tasks simultaneously.
It is nothing more than compile and install, just pay attention to speed up the compilation with multi-threading.
Install H264, the sample code is as follows
sudo git clone git://git.videolan.org/x264
Install FFMPEG, the sample code is as follows
sudo git clone git://source.ffmpeg.org/ffmpeg.git
Then you can push streaming, sample code as follows
ffmpeg -re -i "1.mp4" -vcodec copy -acodec aac -b:a 192k -f flv "rtmp地址及推流码"
This is my testing [live room address] (https://live.bilibili.com/4683991), the loading is slow (the upload bandwidth is small), and sometimes it is disconnected (the network is unstable).
The login of the Bilibili is a bit strict. I use the cookies to keep the login status, and then simulate the check-in.
crontab -e to set up scheduled tasks, so you don’t have to manually check in before the cookies expire.
————————–2018.03.22 updated ——————————–
Added time display in the log.