Video Playback: Difference between revisions
Jump to navigation
Jump to search
| Line 382: | Line 382: | ||
Here’s a command that encodes video and audio while maintaining high time accuracy: | Here’s a command that encodes video and audio while maintaining high time accuracy: | ||
<pre> | <pre> | ||
ffmpeg -i input.mp4 | ffmpeg -i input.mp4 -c:v libx264 -preset slow -crf 18 -vsync cfr -g 30 -c:a pcm_s16le -ar 44100 -fflags +genpts -async 1 output.mp4 | ||
-c:v libx264: Encode video using H.264. | |||
-preset slow: Optimize for quality and compression efficiency. | |||
-crf 18: Adjusts quality (lower = better; range: 0–51). | |||
-vsync cfr: Enforces constant frame rate. | |||
-c:a pcm_s16le: Encodes audio in uncompressed WAV format. | |||
-ar 48000: Sets audio sample rate to 48.0 kHz. | |||
-fflags +genpts: Ensures accurate timestamps. | |||
-async 1: Synchronizes audio and video streams. | |||
</pre> | </pre> | ||