Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
ffmpeg [2015/05/29 08:24] slackermedia |
ffmpeg [2021/06/03 19:48] (current) |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | [[{arrowp.png|border:0;background:none;width:0;display:inline-block;position:absolute;top:0;left:0;}digikam|]] | ||
- | |||
- | [[{arrown.png|border:0;background:none;width:0;display:inline-block;position:absolute;top:0;margin-left:2.5em;}ffmpeg2theora|]] | ||
- | |||
====== Ffmpeg HOWTO ====== | ====== Ffmpeg HOWTO ====== | ||
Line 385: | Line 381: | ||
Run a few hundred encoding tests overnight, study the results, and you'll be an expert in no time. | Run a few hundred encoding tests overnight, study the results, and you'll be an expert in no time. | ||
- | =====Calling an Editor's Bluff===== | + | =====Performance Boost===== |
- | On Linux, a common design scheme is to enable everything with the expectation that the user (you) will be the best judge of how to use with all the bits of exposed circuitry. This enables the user to explore avenues that would have been closed off otherwise, and potentially discover completely new methods of working and creating, but don't confuse that freedom to mean that everything //possible// is necessarily //smart//. | + | Linux video and audio editors generally support every possible codec they can, and that's quite a lot. This affords you great freedom, but should you experience performance issues while working with a compressed file format (such as MP3, Vorbis, Theora, Dirac, and so on), consider extracting the video and audio streams from their compressed containers and working with them as native or [nearly] uncompressed files. |
- | If you are attempting edit a file in a video so audio editor and it is clearly causing issues, try converting the file to something else. Generally, file formats that are not compressed work better than compressed formats. After all, you wouldn't try to edit a spreadsheet while it was embedded within a zip archive, so why try to edit a video file that has been compressed and expect realtime performance? | + | If you do find that you need to convert media, you obviously want to avoid losing quality, so ensure that you are using a //less// compressed container, and that you are retaining the exact same settings as the source video. |
- | For best results, favour less-compressed file formats whilst working. Ffmpeg can output sound files to WAV and AIFF, and video files to FFV1, HuffYUV, MPG, and MOV. | + | If ''mediainfo'' or ''video-meta'' reports a bit rate of 67M at 29.97 fps, then when you convert, use at least 67M for the bit rate and 29.97 for the frame rate. |
+ | Here are some example commands for the various native and [mostly] uncompressed formats: | ||
- | ====Lossless Codecs==== | + | <WRAP indent> |
+ | **WAV** | ||
+ | //Uncompressed PCM audio.// | ||
+ | <code> | ||
+ | ffmpeg -i foo.bar -vn -ar 48000 foo.wav | ||
+ | </code> | ||
+ | **AIFF** | ||
- | =====A Full Command===== | + | //Uncompressed PCM audio.// |
- | Ffmpeg commands can become very complex, as you can imagine. Of course, you should never confuse "complex" with "good"; sometimes, less is more. Very frequently, ffmpeg commands //evolve//, not built. In other words, if you have spent a month editing your movie in Kdenlive and output | + | <code> |
+ | ffmpeg -i foo.bar -vn -ar 48000 foo.aiff | ||
+ | </code> | ||
+ | **AU** | ||
+ | |||
+ | //Sun Microsystems uncompressed PCM data.// | ||
+ | |||
+ | <code> | ||
+ | ffmpeg -i foo.bar -vn -ar 48000 foo.au | ||
+ | </code> | ||
+ | </WRAP> | ||
+ | |||
+ | Native and [mostly] uncompressed video formats: | ||
+ | |||
+ | <WRAP indent> | ||
+ | **FFV1** | ||
+ | |||
+ | //Native ffmpeg video format.// | ||
+ | |||
+ | <code> | ||
+ | ffmpeg -i foo.bar -an -vcodec FFV1 -b:v 80M -threads 8 foo.mkv | ||
+ | </code> | ||
+ | |||
+ | **Huff YUV** | ||
+ | |||
+ | //Lossless video format.// | ||
+ | |||
+ | <code> | ||
+ | ffmpeg -i foo.bar -an -vcodec huffyuv -b:v 80M -threads 8 foo.mkv | ||
+ | </code> | ||
+ | |||
+ | **MOV** | ||
+ | |||
+ | //Quicktime movie file.// | ||
+ | |||
+ | <code> | ||
+ | ffmpeg -i foo.bar -an -vcodec libquicktime -b:v 80M -threads 8 foo.mov | ||
+ | </code> | ||
+ | </WRAP> | ||
+ | |||
+ | There are other formats, but these are well supported and tested. | ||
+ | |||
+ | |||
+ | =====Lossless Codecs===== | ||
+ | |||
+ | Ffmpeg supports a number of lossless formats ideal for Gold Masters and long term storage, including FFV1 and HuffYUV for video, FLAC and WAVPACK for sound. | ||
<WRAP tip> | <WRAP tip> | ||
**See Also** \\ | **See Also** \\ | ||
- | mencoder | + | [[http://www.mplayerhq.hu/DOCS/HTML/en/mencoder.html|Mencoder]] \\ |
+ | [[http://gstreamer.freedesktop.org/|Gstreamer]] \\ | ||
+ | [[https://xiph.org/flac/|Flac]] \\ | ||
+ | [[http://www.wavpack.com/|wavpack]] \\ | ||
+ | [[http://www.imagemagick.org|Imagemagick]] | ||
+ | </WRAP> | ||
+ | |||
+ | <WRAP centeralign> | ||
+ | <wrap fa>[[fabla|R]]</wrap> <wrap fa>[[start|S]]</wrap> <wrap fa>[[ffmpeg2theora|Q]]</wrap> | ||
</WRAP> | </WRAP> | ||
- | [[{arrown.png|border:0;background:none;width:0;display:inline-block;float:right;}ffmpeg2theora|]][[{arrowp.png|border:0;background:none;width:0;float:right;}digikam|]] |