ffmpeg-cli-wrapper
ffmpeg-cli-wrapper copied to clipboard
Specify default FFMPEG and FFPROBE constants
Please specify default constants for FFMPEG and FFPROBE to use instead of String, for example:
public class FFmpegConstants {
// File Extensions
public static final String AVI = "avi";
public static final String MP4 = "mp4";
public static final String OGG = "ogg";
public static final String MOV = "mov";
public static final String _3GP = "3gp";
// Formats
public static final String MP4_FORMAT = "mp4";
// Audio
public static final String AAC_CODEC = "aac";
// Video
public static final String H264_CODEC = "libx264";
// Presets
public static final String ULTRAFAST_PRESET = "ultrafast";
}
I had actually tried to avoid doing this, because I didn't want to give the impression that the local ffmpeg supported those formats, or codecs, etc. You can however do new FFmpeg().formats() and get a list of formats supported by this instance.
I do have some constants, such as FPS_30, or AUDIO_STEREO, but these are universally accepted across all ffmpegs. Where as H264_CODEC = "libx264" would only be available on a ffmpeg compiled with x264 support.
Thoughts?
Anyway, usage of constants is right approach even it's supported optionally. I believe - it can be under developer's choice what constants to use and it's really nice to have constants to avoid creation of own ones
Related to PR #321