![]() This post explains to you how to install FFmpeg on Ubuntu 18.04 / Ubuntu 16.04 & Linux Mint 19 and use it. Also, it can capture and encode in real-time from hardware such as the TV capture card. With FFmpeg, you can convert various video and audio formats. It is a suite, contains a set of shared libraries such as libswresample, libavcodec, libavformat, and libavutil and programs for handling video, audio, and other multimedia files and streams. Using chromakey, overlay, and format filters: ffmpeg -re -i background.jpg -f v4l2 -i /dev/video0 -filter_complex "chromakey=color=#326964:similarity=0.07:blend=0.FFmpeg is an open source software (also a command line tool) for transcoding multimedia files. See How to position drawtext text? Greenscreen / chroma key / replace background With drawtext filter: ffmpeg -f v4l2 -i /dev/video0 -vf "drawtext=text='Hello World':fontsize=12:fontcolor=white:font=Arial:x=w-tw-10:y=h-th-10,format=yuv420p" -f v4l2 /dev/video1 Webcam → ffmpeg → Virtual webcam Add text Image to virtual camera ffmpeg -re -loop 1 -i input.jpg -vf format=yuv420p -f v4l2 /dev/video0 Video file (MP4) to virtual camera ffmpeg -re -i input.mp4 -map 0:v -f v4l2 /dev/video0 Example for desktop using x11grab: ffmpeg -f x11grab -framerate 15 -video_size 1280x720 -i :0.0 -f v4l2 /dev/video0 ![]() Check output of ls /dev/video* or v4l2-ctl -list-devices. Note that the actual video number may vary depending if an existing device is already using /dev/video0. If you want to remove the package you compiled: sudo apt-get remove v4l2loopback Sudo checkinstall -pkgname=v4l2loopback -pkgversion="$(date +%Y%m%d%H%M)-git" -default If it's not in the repository for your Ubuntu version, or you want the latest version, you can compile it: sudo apt-get install build-essential checkinstall This is easy but older versions of v4l2loopback have some known bugs, so consider compiling it instead if you encounter any issues. ![]() First you need to install it: Install v4l2loopback Method 1: Install v4l2loopback from the repository sudo apt install v4l2loopback-dkms ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |