Skip to content
This repository has been archived by the owner on Jan 21, 2021. It is now read-only.

Video Clip Maker

Lee, Byoung-young edited this page Apr 24, 2015 · 7 revisions

With help of encoding functionality of mpv, bomi provides simple interface to create video clip since 0.9.7. You can find related menu in 'Video > Make Video Clip'.

File name template

You can use next placeholders in file name.

Time/data for creating file

%YEAR%, %YEAR_2%(2 digits),
%MONTH%, %MONTH_0%, %MONTH_S%(short name), %MONTH_L%(long name),
%DAY%, %DAY_0%,
%HOUR%, %MIN%, %SEC%, %MSEC%, (without leading zero)
%HOUR_0%, %MIN_0%, %SEC_0%, %MSEC_0% (with leading zero)

Playback information

%T_HOUR%, %T_MIN%, %T_SEC%, %T_MSEC%, (Start time without leading zero)
%T_HOUR_0%, %T_MIN_0%, %T_SEC_0%, %T_MSEC_0%, (Start time with leading zero)
%E_HOUR%, %E_MIN%, %E_SEC%, %E_MSEC%, (End time without leading zero)
%E_HOUR_0%, %E_MIN_0%, %E_SEC_0%, %E_MSEC_0%, (End time with leading zero)
%MEDIA_NAME%(file name or remote location),
%MEDIA_DISPLAY_NAME%(display name in player),
%COUNTER_n%(incremental counter with n digits),

Miscellaneous information

%UNIX%(UNIX timestamp in seconds)
%UNIX_MS%(UNIX timestamp in milliseconds)
%RAND_n%(random number with n digits)

Container format

Container format is determined automatically by extension name. For now, bomi provides next choices for extension: mkv, mp4, webm, gif.

For each container, next combination of codecs is recommended.

  • mkv: video codec: libx264, audio codec: libvorbis
  • mp4: video codec: libx264, audio codec: aac
  • webm: video codec: libvpx, audio codec: libvorbis
  • gif: video codec: gif (exclusively), audio codec: disabled

Note that it's known that the encoding quality by built-in aac encoder in FFmpeg is not good. However, it's the sole option which is available for GPLed application including bomi. You'd better use mkv or webm for container format unless you have to use mp4.

Codec options

There are tons of codecs for video/audio but usually, you would use a few codecs which are recommend in above. You can specify encoding options for each codec in next form:

opt1=val1,opt2=val2,opt3=val3 ...

These options correspond to mpv's --ovcopts for video codecs and --acopts for audio codecs, which are turned out to correspond FFmpeg options, too. If you don't specify any options, default option of FFmpeg will be used.

Most important options are in next list.

  • b: set constant bitrate(CBR). (ex. b=128k)
  • q: quality for variable bitrate(VBR) (ex. q=3). Same as qscale.

These values may be interpreted differently depending on codec. For full comprehensive description, you'd better read FFmpeg documentation.

Recomended option for major codecs

Note that recommended option is not for creating high quality result. It's for providing acceptable quality with compatiblity.

The default option would be create acceptable result.

Default option corresponds: crf=23,preset=medium,profile=baseline.

It's highily recommended to set b or crf option. If you remove all options, the result would be quite bad.

b=1M or crf=10 is recommended.

Never use b option for libvorbis. libvorbis is specialized for VBR. Available range for q option is 0-10, where 10 is highest quality.

Default option which corresponds q=3 would be fine.

Use b for CBR or q for VBR.

Default option corresponds q=4 would be close to perceptual transparency.