hascp.blogg.se

Ffmpeg convert mkv to mp4 720p
Ffmpeg convert mkv to mp4 720p










ffmpeg convert mkv to mp4 720p

  • -sc_threshold 0 - don't create key frames on scene change - only according to -g.
  • -g 48 -keyint_min 48 - IMPORTANT create key frame (I-frame) every 48 frames (~2 seconds) - will later affect correct slicing of segments and alignment of renditions.
  • -crf 20 - Constant Rate Factor, high level factor for overall quality.
  • -profile:v main - set H264 profile to main - this means support in modern devices read more.
  • -c:v h264 - set video codec to be H264 which is the standard codec of HLS segments.
  • -c:a aac -ar 48000 -b:a 128k - set audio codec to AAC with sampling of 48kHz and bitrate of 128k.
  • -vf "scale=w=1280:h=720:force_original_aspect_ratio=decrease" - scale video to maximum possible within 1280x720 while preserving aspect ratio.
  • -i beach.mkv - set beach.mkv as input file.
  • Run brew install ffmpeg (extra options can be seen by running brew options ffmpeg)įfmpeg -i beach.mkv -vf scale=w=1280:h=720:force_original_aspect_ratio=decrease -c:a aac -ar 48000 -b:a 128k -c:v h264 -profile:v main -crf 20 -g 48 -keyint_min 48 -sc_threshold 0 -b:v 2500k -maxrate 2675k -bufsize 3750k -hls_time 4 -hls_playlist_type vod -hls_segment_filename beach/720p_%03d.ts beach/720p.m3u8.
  • ffmpeg - you should see ffmpeg version and build information
  • Open a command prompt in the unzipped folder.
  • Installing FFMPEG ¶įfmpeg is a cross platform program that can run on Windows and OS X as well as Linux.

    ffmpeg convert mkv to mp4 720p

    In this guide will show a real world use of ffmpeg to create MBR HLS VOD stream from a static input file. The video with different resolutions and bitrates that can be switched seamlessly, this concept is called MBR (Multi Bit Rate).Ī powerful tool that supports conversion of various video formats from one to another, including HLS both as input and output. Since end users have different screen sizes and different network performance, we want to create multiple renditions of HLS is one of the most prominent video streaming formats on desktop and mobile browsers. Setting up HLS live streaming server using NGINXĬreating A Production Ready Multi Bitrate HLS VOD stream ¶

    ffmpeg convert mkv to mp4 720p

    How to enable and disable P2P connections programmatically How to add a Custom Label to the analytics Creating A Production Ready Multi Bitrate HLS VOD stream












    Ffmpeg convert mkv to mp4 720p