caseu.blogg.se

Ffmpeg crf h264
Ffmpeg crf h264




The source video file being a 3840x2160 60fps (4K) file recorded from a GoPro Hero 8 at 567MB in size. These were downloaded directly from Instagram after posting to compare results. Here's a before and after test I created using the above requirements. OUTPUT.mp4 - The encoded output movie file.-f mp4 - Sets the MP4 container format.-ar 44100 - Sets audio sample rate to 44.1 kHz.-b:a 256k - Targets audio bitrate to 256k.-b:v 3500k - Targets video bitrate to 3500k.-crf 23 - Constant Rate Factor encoding mode that adjusts the file data rate up or down to achieve a selected quality level rather than a specific data rate.Feel free to also try slower and veryslow. -preset slow - Slower presets will result in better quality.-x264-params scenecut=0:open_gop=0:min-keyint=72:keyint=72:ref=4 - Some x264 codec options I use to improve video for streaming.This seems to be the profile Apple devices export to. -profile:v main -level:v 3.1 - Mostly for H.264 compatibility for older devices.

ffmpeg crf h264

  • -vf scale=-2:720 - Video filter to scale to 720p while keeping aspect ratio.
  • Maybe try 1080p for IGTV, per their specification.

    ffmpeg crf h264

    Try adjusting a few settings to get the optimal quality and filesize before uploading.

    ffmpeg crf h264

    1080p 16:9 max (vertical or horizontal)Īlso, if you inspect a story video using a tool like mediainfo, you'll see something like the following:Įnter fullscreen mode Exit fullscreen mode.

    ffmpeg crf h264

    However, Instagram does provide some encoding requirements for IGTV. These settings are gathered from various sources and through trial and error. Instagram does not provide an official list of encoding requirements. These settings can also be applied to other encoders, such as Handbrake. This guide describes various FFmpeg encoding presets that can be used to help improve your video quality output when uploading to Instagram. Although the video preview on Instagram looks high quality, the resulting output will be degraded drastically. You will notice this especially if uploading videos from GoPro or other devices captured in 4K or 1440p with larger file sizes. Uploading high quality video to Instagram can result in lower quality video on posts and stories due to aggressive re-encoding to save on bandwidth and storage for users.






    Ffmpeg crf h264