Changes between Version 60 and Version 61 of Encode/H.264
- Timestamp:
- Mar 7, 2017, 8:36:50 PM (9 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Encode/H.264
v60 v61 68 68 }}} 69 69 70 You can also forgo the bitrate calculation if you already know what final (average) bitrate you need for clip.70 You can also forgo the bitrate calculation if you already know what final (average) bitrate you need. 71 71 72 72 === Two-Pass Example === … … 96 96 == Lossless H.264 == 97 97 98 You can use `-crf 0` to encode a lossless output. Two useful presets for this are `ultrafast` or `veryslow` since either a fast encoding speed or best compression are usually the most important factors. Most non-FFmpeg based players will not be able to decode lossless (but !YouTube can), so if compatibility is an issue you should not use lossless. 99 100 Note that lossless output files will likely be huge. 98 You can use `-crf 0` to encode a lossless output. Two useful presets for this are `ultrafast` or `veryslow` since either a fast encoding speed or best compression are usually the most important factors. 101 99 102 100 === Lossless Example (fastest encoding) === … … 113 111 }}} 114 112 113 Note that lossless output files will likely be huge, and most non-FFmpeg based players will not be able to decode lossless, so if compatibility or file size issues you should not use lossless. If you're looking for an output that is roughly "visually lossless" but not technically lossless use a `-crf` value of around 17 or 18 (you'll have to experiment to see which value is acceptable for you). It will likely be indistinguishable from the source and not result in a huge, possibly incompatible file like true lossless mode. 114 115 115 ---- 116 116 … … 139 139 140 140 {{{ 141 ffmpeg -i input.mp4 -c:v libx264 -x264 opts "nal-hrd=cbr" -b:v 1M -minrate 1M -maxrate 1M -bufsize 2M output.ts141 ffmpeg -i input.mp4 -c:v libx264 -x264-params "nal-hrd=cbr" -b:v 1M -minrate 1M -maxrate 1M -bufsize 2M output.ts 142 142 }}} 143 143
