ffmpeg overwrite output file if exists
I ran: ffmpeg -i input.flac output.mp3 This prompts: File ‘output.mp3’ already exists. Overwrite? [y/N] y How do I automatically say “yes”? 3 Answers 3
I ran: ffmpeg -i input.flac output.mp3 This prompts: File ‘output.mp3’ already exists. Overwrite? [y/N] y How do I automatically say “yes”? 3 Answers 3
I have been meaning to install ffmpeg as an extension to my PHP setup. So before I can install it, I need to phpize it. I installed php5-dev by sudo apt-get install php5-dev. But now when I run phpize I get the following error : phpize Cannot find config.m4. Make sure that you run ‘/usr/bin/phpize’ … Read more
I am trying to encode a .mp4 video from a set of frames using FFMPEG using the libx264 codec. This is the command I am running: /usr/local/bin/ffmpeg -r 24 -i frame_%05d.jpg -vcodec libx264 -y -an video.mp4 I sometimes get the following error: [libx264 @ 0xa3b85a0] height not divisible by 2 (520×369) After searching around a … Read more
How do you convert an entire directory/folder with ffmpeg via command line or with a batch script? 31 Answers 31 For Linux and macOS this can be done in one line, using parameter expansion to change the filename extension of the output file: for i in *.avi; do ffmpeg -i “$i” “${i%.*}.mp4”; done
I tried the following command to extract audio from video: ffmpeg -i Sample.avi -vn -ar 44100 -ac 2 -ab 192k -f mp3 Sample.mp3 but I get the following output libavutil 50.15. 1 / 50.15. 1 libavcodec 52.72. 2 / 52.72. 2 libavformat 52.64. 2 / 52.64. 2 libavdevice 52. 2. 0 / 52. 2. 0 … Read more
I have been trying to figure out how to rotate videos with FFmpeg. I am working with iPhone videos taken in portrait mode. I know how to determine the current degrees of rotation using MediaInfo (excellent library, btw) but I’m stuck on FFmpeg now. From what I’ve read, what you need to use is a … Read more
I’m trying to concatenate two mp4 files using ffmpeg. I need this to be an automatic process hence why I chose ffmpeg. I’m converting the two files into .ts files and then concatenating them and then trying to encode that concatenated .ts file. The files are h264 and aac encoded and I’m hoping to keep … Read more