Skip to content

[Feature] Add manual post processing arguments #1149

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

Open
Hash6232 opened this issue May 13, 2025 · 3 comments
Open

[Feature] Add manual post processing arguments #1149

Hash6232 opened this issue May 13, 2025 · 3 comments
Labels
feature New feature or request
Milestone

Comments

@Hash6232
Copy link

Hash6232 commented May 13, 2025

Just a simple toggle/input combo pair in Advanced options or in a dedicated menu so I can make yt-dlp re-encode/remux downloaded videos on the fly.

[ ] Enable remux  
[x] Enable re-encode  

Format: [ mp4 ▼ ]
        ├─ avi
        ├─ flv
        ├─ gif
        ├─ mkv
        ├─ mov
        ├─ mp4
        ├─ webm
        ├─ aac
        ├─ aiff
        ├─ alac
        ├─ flac
        ├─ m4a
        ├─ mka
        ├─ mp3
        ├─ ogg
        ├─ opus
        ├─ vorbis
        └─ wav

Post processing arguments: [_______________________________________]
                           (e.g. VideoConvertor:-vf scale=-1:360)

I was thinking of a pair of two mutually exclusive toggles which enable remux or re-encoding, then a select picker that lets you choose a format from a list (both remux and re-encode support the same values) and finally an input field (enabled only when choosing re-encode) where you can paste the necessary ppa arguments.

Bonus points for a way to save these as presets so I can choose the right ppa arguments on the fly when selecting re-encode:

--audio-format FORMAT           Format to convert the audio to when -x is
                                used. (currently supported: best (default),
                                aac, alac, flac, m4a, mp3, opus, vorbis,
                                wav). You can specify multiple rules using
                                similar syntax as --remux-video
--audio-quality QUALITY         Specify ffmpeg audio quality to use when
                                converting the audio with -x. Insert a value
                                between 0 (best) and 10 (worst) for VBR or a
                                specific bitrate like 128K (default 5)
--remux-video FORMAT            Remux the video into another container if
                                necessary (currently supported: avi, flv,
                                gif, mkv, mov, mp4, webm, aac, aiff, alac,
                                flac, m4a, mka, mp3, ogg, opus, vorbis,
                                wav). If the target container does not
                                support the video/audio codec, remuxing will
                                fail. You can specify multiple rules; e.g.
                                "aac>m4a/mov>mp4/mkv" will remux aac to m4a,
                                mov to mp4 and anything else to mkv
--recode-video FORMAT           Re-encode the video into another format if
                                necessary. The syntax and supported formats
                                are the same as --remux-video
--postprocessor-args NAME:ARGS  Give these arguments to the postprocessors.
                                Specify the postprocessor/executable name
                                and the arguments separated by a colon ":"
                                to give the argument to the specified
                                postprocessor/executable. Supported PP are:
                                Merger, ModifyChapters, SplitChapters,
                                ExtractAudio, VideoRemuxer, VideoConvertor,
                                Metadata, EmbedSubtitle, EmbedThumbnail,
                                SubtitlesConvertor, ThumbnailsConvertor,
                                FixupStretched, FixupM4a, FixupM3u8,
                                FixupTimestamp and FixupDuration. The
                                supported executables are: AtomicParsley,
                                FFmpeg and FFprobe. You can also specify
                                "PP+EXE:ARGS" to give the arguments to the
                                specified executable only when being used by
                                the specified postprocessor. Additionally,
                                for ffmpeg/ffprobe, "_i"/"_o" can be
                                appended to the prefix optionally followed
                                by a number to pass the argument before the
                                specified input/output file, e.g. --ppa
                                "Merger+ffmpeg_i1:-v quiet". You can use
                                this option multiple times to give different
                                arguments to different postprocessors.
                                (Alias: --ppa)
@nlogozzo
Copy link
Member

Just a simple toggle/input combo pair in Advanced options or in a dedicated menu so I can make yt-dlp re-encode/remux downloaded videos on the fly.

What is the need for this? Parabolic chooses already to remux/recode a video depending on the file format you choose from the list.
Most of the times it remuxes unless it's an webm with requires a recode:

arguments.push_back("--remux-video");
arguments.push_back(StringHelpers::lower(m_fileType.str()));
if(m_fileType == MediaFileType::WEBM)
{
    arguments.push_back("--recode-video");
    arguments.push_back(StringHelpers::lower(m_fileType.str()));
}

finally an input field (enabled only when choosing re-encode) where you can paste the necessary ppa arguments.

As far as adding a post-processing arguments field to advanced options of a download, I could do that.

@nlogozzo nlogozzo added the feature New feature or request label May 14, 2025
@Hash6232
Copy link
Author

What is the need for this? Parabolic chooses already to remux/recode a video depending on the file format you choose from the list.

My bad, I somehow missed the very first entry in the "Add Download" modal. Regarding post processing, an area in "Preferences" where I can add key+value pairs can definitely be handy. Although a simple input field to inject the ppa will do the trick, most of the times this might become a routine depending on the source of the files and where one plans to upload them. Having a list of presets (saved beforehand in "Preferences") to chose from and a input field as fallback is how I've seen other frontends tackle this feature

@nlogozzo
Copy link
Member

Having a list of presets (saved beforehand in "Preferences") to chose from and a input field as fallback is how I've seen other frontends tackle this feature

This sounds like a good idea - will implement it !

@nlogozzo nlogozzo added this to the V2025.5.4 milestone May 14, 2025
@nlogozzo nlogozzo changed the title [Feature Request] Post processing [Feature] Add manual post processing arguments May 16, 2025
@nlogozzo nlogozzo modified the milestones: V2025.5.4, V2025.6.0 May 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants