![]() ![]() ![]() If your PC ip is 192.168.0.10, then the rtsp stream is played by this command: vlc rtsp://192.168.0. Here's the ffmpeg|vlc command: ffmpeg -thread_queue_size 1024 -f video4linux2 -input_format mjpeg -i /dev/video0 -r 30 -f alsa -ac 1 -thread_queue_size 1024 -i hw:1,0 -acodec aac -vcodec libx264 -preset ultrafast -crf 18 -s hd720 -vf format=yuv420p -profile:v main -threads 0 -f mpegts -|vlc -I dummy -sout='#std -sout-all -sout-keep' In the server core container, FFmpeg fails because the container OS image does not have the required APIs. ![]() You will need to understand some Docker basics to use this image and be familiar with how to construct an FFmpeg command. docker run -rm -i -isolationprocess ffmpeg:latest -L You can see a license information message of the FFmpeg binary. Unlike most of our container library this image is meant to be run ephemerally from the command line parsing user input for a custom FFmpeg command. After then, let’s run the FFmpeg container to test. If you're using a file as input, you won't need all that v4l2 and alsa stuff. docker build -t ffmpeg:latest -isolationprocess -no-cache. You will have to adjust the command for your device or file. I've also had audio-sync issues with some of the other methods, where this method always has perfect audio-sync. Piping through vlc must be CPU-friendly, because my old dual-core Pentium CPU is able to do the real-time encoding with no dropped frames. I'm using a video capture HDMI>USB device that sets itself up on the video4linux2 driver as input. This image can be used as a base for an encoding farm or for Shinobi CCTV hardware accelerated Docker images. You can install the latest build of this image by running docker pull migoller/ffmpeg. I've tried both, but the http ts stream seems to work glitch-free on my playback devices. Minimalistic Docker image with FFmpeg and support for hardware acceleration based on archlinux. In the example I use an mpeg transport stream (ts) over http, instead of rtsp. If you don't have these installed, you can add them: sudo apt install vlc ffmpeg Another streaming command I've had good results with is piping the ffmpeg output to vlc to create a stream. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |