

home/guel/ffmpeg_build/lib/libx264.a: error adding symbols: Bad valueĬollect2: error: ld returned 1 exit status usr/bin/ld: /home/guel/ffmpeg_build/lib/libx264.a(common.o): relocation R_X86_64_32 against '.rodata.str1.1' can not be used when making a shared object recompile with -fPIC When I try to compile FFmpeg with -enable-shared option as above, I get this error: configure -prefix="$HOME/ffmpeg_build" -pkg-config-flags="-static" -extra-cflags="-fPIC -m64 -I$HOME/ffmpeg_build/include" -extra-ldflags="-L$HOME/ffmpeg_build/lib" -bindir="$HOME/bin" -enable-gpl -enable-libass -enable-libfdk-aac -enable-libfreetype -enable-libmp3lame -enable-libopus -enable-libtheora -enable-libvorbis -enable-libvpx -enable-libx264 -enable-libx265 -enable-nonfree -enable-pic -extra-ldexeflags=-pie -enable-shared PATH="$HOME/bin:$PATH" PKG_CONFIG_PATH="$HOME/ffmpeg_build/lib/pkgconfig". Mess around with it and see for yourself! At the end of the day, the little tools that come with a Linux build are usually a solid option.I ran the. It’s always better than relying on a third party service, and even compresses quite a bit more. For my own purposes, compressing video files is useful enough on its own. If you look at the docs, you’ll see there’s a much wider range of potential. What I presented here is powerful, but only a small fraction of what ffmpeg can accomplish. This works because ffmpeg performs some optimizations when run on its own. You can also run ffmpeg with no arguments and get decent results: Turns out, you can also compress using the libx264 argument. The number after -crf can range from 18 to 24, so there’s room for experimentation there.įor my purposes, I uploaded a compressed video through the WordPress admin, but the video on the front end wasn’t loading. This command sets the constant rate factor and also lowers the overall bitrate. Here’s what I use:įfmpeg -i input.mp4 -vcodec libx265 -crf 20 output.mp4 All you need to do is cd into the directory that contains the video, then run the command you need to compress. Here’s the fun part: seeing the real magic of ffmpeg. You can likely do this with any other unplayable media type, just modify the arguments. There’s also a shorthand code: ffmpeg -i input.m4v -c copy output.mp4. This takes input.mv4(the file you want to convert) and turns it into output.mp4(the name of the new returned file).

From there, it should be easy to compress.įfmpeg -i input.m4v -vcodec copy -acodec copy output.mp4 I’ll show an example to convert a mv4 file into mp4. Luckily, converting this with ffmpeg is a breeze. Sometimes, video formats can be “locked” to something like mv4, which makes it hard to do anything with the data. Making sure you have the right formatįirst things first, to compress a video file, it needs to be in a common format such as mp4. If you’re on another distro besides Ubuntu/Debian, just type in the equivalent for your package manager.
#Linux paste the ffmpeg build command install#
Otherwise, it should be as simple as running sudo apt install ffmpeg. If you’re on a modern Linux distro, it’s most likely already on your system.
#Linux paste the ffmpeg build command how to#
Once you learn how to use it, it really starts to come in handy. Want to compress a file as much as possible? ffmpeg for sure. Want to convert a video file between two formats? ffmpeg. In short: ffmpeg is a library that will take care of all your multimedia needs. In this article, I hope to shine light on an alternative that comes with many Linux systems out of the box, is free, and quick to use and learn.
