Cette page sert juste de mémo pour moi pour quelques opérations de base pour ffmpeg (je n'arrête pas d'oublier les options):
ffmpeg
est parfois disponible sous le nom d'avconv
, disponible dans le paquet libav-tools
.
ffmpeg -i entree.avi sortie.webm
ffmpeg -i input -b:v 1700k -b:a 192k output
ffmpeg -i entree.mp4 -f avi -vcodec libxvid -acodec mp3 -b:v 1700k -b:a 192k sortie.avi
ffmpeg -i entree.mp4 -f ogg -vcodec libtheora -acodec libvorbis -b:v 900k -b:a 128k sortie.ogv
-acodec copy
-vcodec copy
ffmpeg -i %1 -acodec copy -vcodec copy output.avi
ffmpeg -i entree.avi -aspect 704:300 -c copy sortie.mp4
ffmpeg -i %1 -f mp3 -acodec mp3 -b:a 196k %1.mp3
ffmpeg -i musique.mp3 musique.wav
ffmpeg -ss 00:02:58 -t 00:09:34 -i entree.webm -vcodec copy -acodec copy sortie.webm
-vf scale=640:480
-vf scale=-1:480
find -name "*.flac" -exec ffmpeg -i {} -acodec libmp3lame -ab 192k {}.mp3 \;
gifenc.sh
:#!/bin/sh # Convert any video file to animated GIF palette=`mktemp --suffix=.png` filters="fps=15,scale=-1:-1" # No scaling. #filters="fps=15,scale=320:-1:flags=lanczos" # If you want to rescale video. ffmpeg -v warning -i "$1" -vf "$filters,palettegen" -y "$palette" ffmpeg -v warning -i "$1" -i $palette -lavfi "$filters [x]; [x][1:v] paletteuse" -y "$1-converted.gif" rm "$palette"
./gifenc.sh mavideo.mp4
sortira un fichier mavideo.mp4-converted.gif
.ffmpeg -i %1 -f avi -vcodec libxvid -acodec mp3 -b:v 1700k -b:a 192k %1_freebox.avi
ffmpeg -i %1 -f avi -vcodec libxvid -acodec mp3 -vf scale=-1:360 -b:v 1700k -b:a 192k %1_freebox.avi
ffmpeg -i %1 -s 448x336 -f ogg -vcodec libtheora -acodec libvorbis -b:v 900k -b:a 128k %1_videobin.ogg
ffmpeg -i %1 -s 512x288 -f ogg -vcodec libtheora -acodec libvorbis -b:v 640k -b:a 128k %1_videobin.ogg
ffmpeg -i %1 -c:v libx264 -profile:v baseline -b:v 600k -acodec aac -strict -2 -ar 44100 -ac 2 -b:a 128k -movflags faststart %1_android.mp4