Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update ffmpeg presets #4111

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 10 additions & 24 deletions src/BizHawk.Client.EmuHawk/AVOut/FFmpegWriterForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,32 +46,18 @@ public static FormatPreset[] GetPresets(string customCommand)
{
return new[]
{
new FormatPreset("AVI Lossless UT Video", "Lossless UT video and uncompressed audio in an AVI container. Compatible with AVISource(), if UT Video decoder is installed. Fast, but low compression.",
new FormatPreset("Social Media — MP4", "Optimized for quick and easy sharing. Produces small, highly compatible and streamable files. AVC video and Opus audio in a MP4 container.",
"-c:a libopus -c:v libx264 -pix_fmt yuv420p -movflags +faststart -f mp4", false, "mp4"),
new FormatPreset("[ Custom ]", "Write your own FFmpeg command. For advanced users only.",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd still keep this at the bottom due to its unique nature.

customCommand, true, "foobar"),
new FormatPreset("Lossless AVC — MKV", "Lossless AVC video and lossless FLAC audio in a Matroska container. High speed and compression. Compatible with AVISource() if x264vfw or FFmpeg based decoder is installed. Seeking may be unstable.",
"-c:a flac -c:v libx264rgb -qp 0 -pix_fmt rgb24 -f matroska", false, "mkv"),
new FormatPreset("Lossless Ut Video — AVI", "Lossless Ut Video and uncompressed audio in an AVI container. Fast, but low compression. Compatible with AVISource(), if Ut Video decoder is installed.",
"-c:a pcm_s16le -c:v utvideo -pred median -pix_fmt gbrp -f avi", false, "avi"),
new FormatPreset("AVI Lossless FFV1", "Lossless FFV1 video and uncompressed audio in an AVI container. Compatible with AVISource(), if ffmpeg based decoder is installed. Slow, but high compression.",
new FormatPreset("Lossless FFV1 — AVI", "Lossless FFV1 video and uncompressed audio in an AVI container. Slow, but high compression. Compatible with AVISource(), if FFmpeg based decoder is installed.",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since FFV1 decoders seem to break all other VFW codecs (until you fix the registry, which then breaks the FFV1 decoder), I wonder if it's time to drop this option in favor of Ut.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Source? Also this is ffmpeg, not vfw.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can't use ffmpeg to encode TASes with avisynth. avisynth depends on VFW decoders. VFW decoder for ffmpeg dumps breaks other VFW codecs.

"-c:a pcm_s16le -c:v ffv1 -pix_fmt bgr0 -level 1 -g 1 -coder 1 -context 1 -f avi", false, "avi"),
new FormatPreset("AVI Lossless AVC", "Lossless AVC video and uncompressed audio in an AVI container. High speed and compression, compatible with AVISource() if x264vfw or ffmpeg based decoder is installed. Seeking may be unstable.",
"-c:a pcm_s16le -c:v libx264rgb -qp 0 -preset ultrafast -g 10 -pix_fmt rgb24 -f avi", false, "avi"),
new FormatPreset("AVI Uncompressed", "Uncompressed video and audio in an AVI container. Very large, don't use!",
"-c:a pcm_s16le -c:v rawvideo -f avi", false, "avi"),
new FormatPreset("Matroska Lossless", "Lossless AVC video and uncompressed audio in a Matroska container.",
"-c:a pcm_s16le -c:v libx264rgb -qp 0 -pix_fmt rgb24 -f matroska", false, "mkv"),
new FormatPreset("Matroska", "AVC video and Vorbis audio in a Matroska container.",
"-c:a libvorbis -c:v libx264 -f matroska", false, "mkv"),
new FormatPreset("MP4", "AVC video and AAC audio in an MP4 container.",
"-c:a aac -c:v libx264 -f mp4", false, "mp4"),
new FormatPreset("WebM", "VP8 video and Vorbis audio in a WebM container.",
"-c:a libvorbis -c:v libvpx -auto-alt-ref 0 -f webm", false, "webm"),
new FormatPreset("Ogg", "Theora video and Vorbis audio in an Ogg container.",
"-c:a libvorbis -c:v libtheora -f ogg", false, "ogg"),
new FormatPreset("Xvid", "Xvid video and MP3 audio in an AVI container.",
"-c:a libmp3lame -c:v libxvid -f avi", false, "avi"),
new FormatPreset("QuickTime", "AVC video and AAC audio in a QuickTime container.",
"-c:a aac -c:v libx264 -f mov", false, "mov"),
new FormatPreset("FLV", "AVC video and AAC audio in a Flash Video container.",
"-c:a aac -c:v libx264 -f flv", false, "flv"),
new FormatPreset("[Custom]", "Write your own ffmpeg command. For advanced users only.",
customCommand, true, "foobar")
new FormatPreset("Uncompressed — AVI", "Uncompressed video and audio in an AVI container. Extremely large files, don't use!",
Copy link
Contributor

@vadosnaprimer vadosnaprimer Nov 10, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't remember this ever having value either (during my 14 years of encoding TASes).

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Keep uncompressed AVI please.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're using it?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not at the moment, but I believe it's important to have an extremely simple encoding option for troubleshooting. (I'm now realising there's a separate AVI writer, but it's not available on Linux, so my point stands.)

"-c:a pcm_s16le -c:v rawvideo -f avi", false, "avi")
};
}

Expand Down