ffmpeg-cli-wrapper icon indicating copy to clipboard operation
ffmpeg-cli-wrapper copied to clipboard

Specify default FFMPEG and FFPROBE constants

Open mayras opened this issue 8 years ago • 3 comments
trafficstars

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";

}

mayras avatar Dec 15 '16 03:12 mayras

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?

bramp avatar Dec 23 '16 04:12 bramp

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

mayras avatar Dec 23 '16 07:12 mayras

Related to PR #321

Euklios avatar Mar 20 '24 16:03 Euklios