Export Codec Preset "Default for format"?

My goal is to export a video file to near enough the same quality for less file size, to that end I have created presets. I wish to use the “default for format” codec for both audio and video within my preset:
As you can see currently its using the audio codec “aac” and video codec “libx264” this appears to be sub-optimal.
If I can’t use “Default for format” A/V codec in my preset, can you inform me of the default codec it would use for the format mp4 and matroska. Thank you.

To use “default for format” remove the acodec and vcodec lines from the preset. To determine the default codecs, at a command line run ffmpeg -h muxer=matroska:

Muxer matroska [Matroska]:
    Common extensions: mkv.
    Mime type: video/x-matroska.
    Default video codec: h264.
    Default audio codec: vorbis.
    Default subtitle codec: ass.

Muxer mp4 [MP4 (MPEG-4 Part 14)]:
    Common extensions: mp4.
    Mime type: video/mp4.
    Default video codec: h264.
    Default audio codec: aac.


Thank you for your reply. I have tried removing the acodec and vcodec lines from the preset and it doesn’t set the A/V codec to “default for format”. Both the matroska and mp4 format will set the vcodec to “libx264” and the acodec to “aac” (after removing the A/V codec lines from the preset). Too my knowledge “libx264” uses or is the “h264” codec, so why when I use the “Default for preset” codec does it cut the encoding time by about 30%, and the file size down by about 50%. What am I missing?

  • I hope Dan doesn’t mind me chiming in here, I am only trying to help *
    I am going to take a stab in the dark here and say if you are using default for preset that it is probably not setting the CRF as high and possibly leaving the encoding speed as fast.

Check your logs to see what it is actually doing and look at the values or failing that check the encoding settings under Mediainfo if you have it for something like this.

These results were created from a little 1 min 30 second test clip I created just for the purpose of tuning these settings under Shotcut.

cabac=1 / ref=4 / deblock=1:0:0 / analyse=0x3:0x113 / me=hex / subme=7 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=1 / me_range=16 / chroma_me=1 / trellis=1 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=-2 / threads=24 / lookahead_threads=4 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=2 / b_pyramid=2 / b_adapt=1 / b_bias=0 / direct=1 / weightb=1 / open_gop=0 / weightp=2 / keyint=12 / keyint_min=1 / scenecut=40 / intra_refresh=0 / rc_lookahead=12 / rc=crf / mbtree=1 / crf=19.0 / qcomp=0.60 / qpmin=0 / qpmax=69 / qpstep=4 / ip_ratio=1.40 / aq=1:1.00

Thank you. That was the answer, I didn’t think that would be the case… I didn’t even think about checking the log :smile:

No problems glad I could help