Converting video to x265 with avconv

A simple command line for converting video to small x265. These options are chosen to produce acceptably low quality, low bitrate output.

avconv -i in.mkv -c:v libx265 -c:a copy -crf 29 -s 854×480 -preset fast out.mkv

  • c:v libx265 means “encode using x265”.
  • c:a copy means “copy audio, don’t re-encode”
  • crf 29 means “slightly worse than default 28 quality”
  • s 854×480 means “resize to 480p”
  • preset fast means “I don’t have a hardware encoder so please don’t take forever”

Obviously better quality is possible, this is producing about 500-600kbit/second video or about 4x the same of the audio track.

Speaking of audio track it’d be nice to convert whatever the source is to 128kbps AAC stereo. I’m not clear if a simple “-ac 2” is sufficient or if more complex downmixing is necessary.