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

Inverse of "disableStream" should also exist #423

Open
Speiger opened this issue Nov 22, 2024 · 9 comments
Open

Inverse of "disableStream" should also exist #423

Speiger opened this issue Nov 22, 2024 · 9 comments

Comments

@Speiger
Copy link

Speiger commented Nov 22, 2024

Describe the issue
If you want to filter out only 1 stream source and ignore everything else then you have to forloop over everything else.
Or make a helper function for that specifically. But once a stream is blacklisted you can't get rid of it either.
It would be nice if you had a option to say: "Only these should be allowed" or a "ignore all" and a "remove from Ignore list".

QoL stuff after all.

@kokorin
Copy link
Owner

kokorin commented Nov 22, 2024

Could you clarify, if it's possible to disable all streams but 1 using ffmpeg CLI?

@Speiger
Copy link
Author

Speiger commented Nov 22, 2024

@kokorin lets say: My Stream has: Video, Audio, Subtitles, and maybe at random attachments/Data.
I only want: Audio or subtitles for example.
So i have to iterate over everything and explicitly filter out these two. Because 1 there is no array option, 2 there are no disable all and removing of disabling either...

In other words the nice design philosophy you try to provide falls apart because you have to explicit.

or to simplify the request:

public Input disableAllStreams(); //Disables all streams
public Input enableStream(StreamType type); //Enables the requested stream
public Input onlyEnableStream(StreamType type); //Disables all BUT the requested stream.

@kokorin
Copy link
Owner

kokorin commented Nov 22, 2024

Could you answer my question?

@Speiger
Copy link
Author

Speiger commented Nov 23, 2024

@kokorin yes, how else would you extract audio files from video+audio files or extract subtitles from the three combo.
It is an essential feature.

This is the video specific documentation, it also exists for Subtitles and Audio, Data, Attachment option.

-vn (input/output)
As an input option, blocks all video streams of a file from being filtered or being automatically selected or mapped for any output. See -discard option to disable streams individually.

As an output option, disables video recording i.e. automatic selection or mapping of any video stream. For full manual control see the -map option.

Here is the stream selection doc:

[4 Stream selection](https://ffmpeg.org/ffmpeg.html#toc-Stream-selection-1)
ffmpeg provides the -map option for manual control of stream selection in each output file. Users can skip -map and let ffmpeg perform automatic stream selection as described below. The -vn / -an / -sn / -dn options can be used to skip inclusion of video, audio, subtitle and data streams respectively, whether manually mapped or automatically selected, except for those streams which are outputs of complex filtergraphs.

@kokorin
Copy link
Owner

kokorin commented Nov 23, 2024

With ffmpeg CLI it possible to disable stream types on by one, Jaffree allows the same.

It possible to add a method to disable several stream types (not just 1).

Pay attention that ffmpeg has 2 types of video streams: v Matches all video streams and V Only matches video streams which are not attached pictures. So with naive implementation the method will disable either v or V, or even both.

Unfortunately ATM I have not much free time to work on this feature request, please feel free to suggest a PR.

@Speiger
Copy link
Author

Speiger commented Nov 23, 2024

@kokorin I know you don't have much time.

Unfortunately it would require me to switch IDEs to fulfill your PR requirements, which i am not willing to do.
Since EditorConfigs are not supported in Eclipse and the plugin that could support it is simply too outdated.

And since the other two PRs are in effective limbo, (since i won't fulfill them by blindly guessing what the logs could mean, or you wouldn't allow the closing of them) i am going to refrain from issuing PRs.

Otherwise these would have been PRs in the first place and not Issues.

@kokorin
Copy link
Owner

kokorin commented Nov 24, 2024

@Speiger according to this SO answer it should be possible to use Checkstyle plugin for Eclipse.
Editorconfig file is there only to help with autoformatting in IDEa, but GH actions don't use it.

@Speiger
Copy link
Author

Speiger commented Nov 24, 2024

@kokorin even so the plugin is already 2 years outdated it didn't crash the IDE yet... (Foreshadowing)

I applied your style on to it and tested it with the "Process Listener" which resulted in my class having 0 mistakes. (made a screenshot but can't upload it by the time of writing will be explained later)
At most your own code had a few missing pieces in there due to checkstyle.

Then i tried switching to the other project and applied checkstyle. 3 seconds later my mouse froze. (That's why i can't right now upload the image because that is mouse only, technically you can open the window for image upload but traverse this using just the keyboard is to much pain)

Anyways uninstalling this plugin because it causes issues with windows itself...
So yeah I am sorry but I simply can't apply the check style.

As i said i am willing to do 90% of the work required to fulfil your checkstyle but odly specific things on how you want things to do is something I ask you to quick fix yourself since I can't.

Oh yeah also sorry for the typos. Spell checking is kinda mouse bound too...

@Speiger
Copy link
Author

Speiger commented Nov 24, 2024

eclipse_qJMgfzKIK9
This was after I applied checkstyle.
Just showing if there are actually changes i missed. Git would have seen it instantly.

Oh yeah also the plugin is deinstalled now too. Don't want to restart my pc randomly.

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

No branches or pull requests

2 participants