Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | |
ffmpeg [2023/08/27 20:51] – FFmpeg Explorer rjt | ffmpeg [2025/04/10 23:33] (current) – note on what copy means. rjt |
---|
<code>ffmpeg -i [input].mp3 -c:a libvorbis -q:a 4 [output].ogg</code> | <code>ffmpeg -i [input].mp3 -c:a libvorbis -q:a 4 [output].ogg</code> |
| |
Fuck-off those .WEBMs: | Fuck-off those .WEBMs. ''copy'' here copies those streams, so they're no reencoded, it's just changing the container: |
| |
<code>ffmpeg -i [input].webm -acodec copy -vcodec copy [output].mkv</code> | <code>ffmpeg -i [input].webm -acodec copy -vcodec copy [output].mkv</code> |
| |
| So if you wanted to copy the video stream and just reencode/change the audio, for example: |
| |
| <code>ffmpeg -i [input].[ext] -acodec aac -vcodec copy [output].[ext]</code> |
| |
=== Multiple === | === Multiple === |
<code>for i in *.mp3; do ffmpeg -i "$i" -c:a libvorbis -q:a 4 -map a "${i%.*}.ogg"; done</code> | <code>for i in *.mp3; do ffmpeg -i "$i" -c:a libvorbis -q:a 4 -map a "${i%.*}.ogg"; done</code> |
| |
You can use the wildcard ''*'' in the file extension to, so if you've got a mix of .mkv and .mp4 files from Youtube you can do. say: | You can use the wildcard ''*'' in the file extension too, so if you've got a mix of .mkv and .mp4 files from Youtube you can do. say: |
| |
<code>for i in *.m*; do ffmpeg -i "$i" "${i%.*}.ogv"; done</code> | <code>for i in *.m*; do ffmpeg -i "$i" "${i%.*}.ogv"; done</code> |