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

Conversation

shenef
Copy link

@shenef shenef commented Nov 10, 2024

image

  • Removes presets that are likely completely unused and/or very outdated.
  • Moves presets that are more likely to be used to the top
  • MP4 becomes a "Social Media" preset with better compatibility and streaming support. Previously playback across social media platforms and clients was very unreliable. This is at the top because it's the most likely to be used. The audio codec has also been changed to Opus. At the default settings it offers comparable quality at a lower bitrate.
    Notable: It defaults to a sample rate of 48kHz. I know that deviates from the 44.1kHz that BizHawk uses but i don't think that is really a concern for this use case.
  • AVC MKV now uses FLAC instead of uncompressed audio. This is the lossless preset that is most likely to be used and going for lossless compression reduces file sizes a bit.
  • Ut Video and FFmpeg capitalization now match what is used in their repositories

All presets decode without issue in VLC, MPV, Handbrake and when uploaded to YouTube.

Sidenote: Custom is the only preset that accepts changes but you can still edit the command of the other presets. That is kind of misleading because those changes are not applied when starting the encode.

- Adjusts sorting and naming
- Removes presets that likely nobody uses
- MP4 becomes a "Social Media" preset with better compatibility and streaming support
- AVC MKV now uses FLAC instead of uncompressed audio
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.

"-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 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.)

@shenef
Copy link
Author

shenef commented Nov 10, 2024

I'm not really familiar enough with the specific process of encoding TASes but if FFV1 and Uncompressed are also dropped, that window is down to a total of 4 presets: MP4, Lossless MKV, Ut Video and Custom.
At that point it could also be merged into this window (which also looks like it could benefit from a resizing and some tidying up).
image

@CasualPokePlayer
Copy link
Member

CasualPokePlayer commented Nov 14, 2024

Removes presets that are likely completely unused and/or very outdated.

I would very much prefer if this is not done. Your "likely completely unused" covers some presets I've used before, and I would guess these might be used by a few other users.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants