Skip to content

#2537: Handle some short videos#2863

Open
hugohmk wants to merge 9 commits into
sepinf-inc:masterfrom
hugohmk:#2537_handle_short_videos
Open

#2537: Handle some short videos#2863
hugohmk wants to merge 9 commits into
sepinf-inc:masterfrom
hugohmk:#2537_handle_short_videos

Conversation

@hugohmk
Copy link
Copy Markdown
Contributor

@hugohmk hugohmk commented Apr 1, 2026

As discussed in issue #2537, FFmpeg could be used to handle some corner cases where MPlayer fails to read video info or generate thumbs. The proposed aproach only calls FFprobe/FFmpeg as a fallback to the current solution.

hugohmk added 3 commits April 1, 2026 06:51
FFprobe is called only if MPlayer fails to get video dimensions: "(result.getDimension() == null || result.getDimension().width == 0 || result.getDimension().height == 0)". Updates VideoProcessResult to handle FFprobe output data (new method "setVideoInfoFFprobe").
@hugohmk hugohmk changed the title #2537 handle short videos #2537 handle some short videos Apr 1, 2026
@hugohmk hugohmk changed the title #2537 handle some short videos #2537: Handle some short videos Apr 1, 2026
@lfcnassif
Copy link
Copy Markdown
Member

lfcnassif commented Apr 1, 2026

Thank you @hugohmk!

Just to be sure, the license of this new dependency is not GPL, right?

@wladimirleite, if and when you have available time, would you mind to help reviewing this?

@lfcnassif lfcnassif linked an issue Apr 1, 2026 that may be closed by this pull request
@hugohmk
Copy link
Copy Markdown
Contributor Author

hugohmk commented Apr 1, 2026

Hello @lfcnassif! I belive it is Apache 2.0 or GPL2+ with a "Classpath" exception, according to the license details found in the dependency's github page (https://github.com/bytedeco/javacpp-presets and https://github.com/bytedeco/javacpp-presets/tree/master/ffmpeg).

Its Maven repository page also states that it is under these licenses: "Apache License, Version 2.0", "GNU General Public License (GPL) version 2, or any later version" and "GPLv2 with Classpath exception".

There seems to be another version of this dependency (ffmpeg-platform-gpl, https://mvnrepository.com/artifact/org.bytedeco/ffmpeg-platform-gpl) that the author states it is contains "Optional GPL builds with (almost) everything enabled", but it doesn't make clear the licensing differences between the two.

Maybe the author (@saudet) could enlighten us about this issue.

@lfcnassif
Copy link
Copy Markdown
Member

lfcnassif commented Apr 1, 2026

Thanks @hugohmk. I also understood it is dual licensed under Apache v2 or GPL v2+, I also found ffmpeg-platform-gpl, but I found it a bit confusing and asked to be sure.

@hugohmk
Copy link
Copy Markdown
Contributor Author

hugohmk commented Apr 1, 2026

I forgot to mention that FFmpeg itself is licensed under LGPLv2.1+, or GPLv2+ if compiled with some optional features and capabilities (https://www.ffmpeg.org/legal.html).

@lfcnassif
Copy link
Copy Markdown
Member

lfcnassif commented Apr 1, 2026

Thanks! And I double checked an Apache licensed project (the new dependency) can use an LGPL dependency without licensing issues.

@saudet
Copy link
Copy Markdown

saudet commented Apr 3, 2026

Maybe the author (@saudet) could enlighten us about this issue.

About ffmpeg-platform-gpl? If your application depends on a GPL-licensed library, it becomes licensed under GPL. So, for example, if IPED depends on functionality available only in ffmpeg-platform-gpl then IPED becomes automatically licensed under GPL. That's what it means.

@hugohmk
Copy link
Copy Markdown
Contributor Author

hugohmk commented Apr 3, 2026

Maybe the author (@saudet) could enlighten us about this issue.

About ffmpeg-platform-gpl? If your application depends on a GPL-licensed library, it becomes licensed under GPL. So, for example, if IPED depends on functionality available only in ffmpeg-platform-gpl then IPED becomes automatically licensed under GPL. That's what it means.

Thank you for the fast response @saudet, and congratulations on your work on bytedeco! In IPEDs case, I think either ffmpeg-platform or ffmpeg-platform-gpl dependency would bring similar licensing obligations, since FFmpeg is actually only being called as a CLI program, run in a separate process via ProcessBuilder (but I'm not 100% sure). But since I am not familliar with these licensing differences, your comment was very helpful.

@saudet
Copy link
Copy Markdown

saudet commented Apr 3, 2026

If the application only launches executables in separate processes, then yes GPL doesn't typically apply to the application.

@lfcnassif
Copy link
Copy Markdown
Member

lfcnassif commented Apr 3, 2026

... is actually only being called as a CLI program, run in a separate process via ProcessBuilder

It usually doesn't propagate GPL, but it might, see this GPL FAQ excerpt:

By contrast, pipes, sockets and command-line arguments are communication mechanisms normally used between two separate programs. So when they are used for communication, the modules normally are separate programs. But if the semantics of the communication are intimate enough, exchanging complex internal data structures, that too could be a basis to consider the two parts as combined into a larger program.

It's not the case of IPED, we would not exchange complex internal data structures with ffmpeg.

@hugohmk
Copy link
Copy Markdown
Contributor Author

hugohmk commented Apr 3, 2026

It's not the case of IPED, we would not exchange complex internal data structures with ffmpeg.

Great! So I guess there will be no issues using ffmpeg-platform-gpl then... If I'm not mistaken, MPlayer is licensed under GPLv2 as well.

@lfcnassif
Copy link
Copy Markdown
Member

@hugohmk I'm not comfortable with linking to a library that have "gpl" in its name, unless @saudet confirms it is also Apache v2 licensed.

@saudet
Copy link
Copy Markdown

saudet commented Apr 3, 2026

If only some users need the extra gpl dependency, you can leave it up to them to add it to their builds.

@wladimirleite wladimirleite self-requested a review April 12, 2026 21:44
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.

MPlayer is not handling some short videos

3 participants