* [FFmpeg-devel] [PATCH v2 1/2] avdevice: deprecate opengl outdev
@ 2024-02-21 11:33 J. Dekker
2024-02-21 11:33 ` [FFmpeg-devel] [PATCH v2 2/2] avdevice: deprecate sdl outdev J. Dekker
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: J. Dekker @ 2024-02-21 11:33 UTC (permalink / raw)
To: ffmpeg-devel
Signed-off-by: J. Dekker <jdek@itanimul.li>
---
doc/outdevs.texi | 2 +-
libavdevice/opengl_enc.c | 11 +++++++++++
libavdevice/version_major.h | 2 ++
3 files changed, 14 insertions(+), 1 deletion(-)
diff --git a/doc/outdevs.texi b/doc/outdevs.texi
index f0484bbf8f..941429a8c8 100644
--- a/doc/outdevs.texi
+++ b/doc/outdevs.texi
@@ -302,7 +302,7 @@ ffmpeg -re -i INPUT -c:v rawvideo -pix_fmt bgra -f fbdev /dev/fb0
See also @url{http://linux-fbdev.sourceforge.net/}, and fbset(1).
@section opengl
-OpenGL output device.
+OpenGL output device. Deprecated and will be removed.
To enable this output device you need to configure FFmpeg with @code{--enable-opengl}.
diff --git a/libavdevice/opengl_enc.c b/libavdevice/opengl_enc.c
index b2ac6eb16a..69de6fad03 100644
--- a/libavdevice/opengl_enc.c
+++ b/libavdevice/opengl_enc.c
@@ -224,6 +224,8 @@ typedef struct OpenGLContext {
int picture_height; ///< Rendered height
int window_width;
int window_height;
+
+ int warned;
} OpenGLContext;
static const struct OpenGLFormatDesc {
@@ -1060,6 +1062,15 @@ static av_cold int opengl_write_header(AVFormatContext *h)
AVStream *st;
int ret;
+ if (!opengl->warned) {
+ av_log(opengl, AV_LOG_WARNING,
+ "The opengl output device is deprecated due to being fundamentally incompatible with libavformat API. "
+ "For monitoring purposes in ffmpeg you can output to a file or use pipes and a video player.\n"
+ "Example: ffmpeg -i INPUT -f nut -c:v rawvideo - | ffplay -\n"
+ );
+ opengl->warned = 1;
+ }
+
if (h->nb_streams != 1 ||
par->codec_type != AVMEDIA_TYPE_VIDEO ||
(par->codec_id != AV_CODEC_ID_WRAPPED_AVFRAME && par->codec_id != AV_CODEC_ID_RAWVIDEO)) {
diff --git a/libavdevice/version_major.h b/libavdevice/version_major.h
index 9f7b79b2ee..da5854ed4c 100644
--- a/libavdevice/version_major.h
+++ b/libavdevice/version_major.h
@@ -35,5 +35,7 @@
// reminder to remove the bktr device on next major bump
#define FF_API_BKTR_DEVICE (LIBAVDEVICE_VERSION_MAJOR < 62)
+// reminder to remove the opengl device on next major bump
+#define FF_API_OPENGL_DEVICE (LIBAVDEVICE_VERSION_MAJOR < 62)
#endif /* AVDEVICE_VERSION_MAJOR_H */
--
2.43.2
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
^ permalink raw reply [flat|nested] 7+ messages in thread
* [FFmpeg-devel] [PATCH v2 2/2] avdevice: deprecate sdl outdev
2024-02-21 11:33 [FFmpeg-devel] [PATCH v2 1/2] avdevice: deprecate opengl outdev J. Dekker
@ 2024-02-21 11:33 ` J. Dekker
2024-02-21 12:32 ` [FFmpeg-devel] [PATCH v2 1/2] avdevice: deprecate opengl outdev Lynne
2024-02-26 16:47 ` Jan Ekström
2 siblings, 0 replies; 7+ messages in thread
From: J. Dekker @ 2024-02-21 11:33 UTC (permalink / raw)
To: ffmpeg-devel
Signed-off-by: J. Dekker <jdek@itanimul.li>
---
doc/outdevs.texi | 8 +++++++-
libavdevice/sdl2.c | 10 ++++++++++
libavdevice/version_major.h | 2 ++
3 files changed, 19 insertions(+), 1 deletion(-)
diff --git a/doc/outdevs.texi b/doc/outdevs.texi
index 941429a8c8..9ee857528e 100644
--- a/doc/outdevs.texi
+++ b/doc/outdevs.texi
@@ -408,7 +408,13 @@ ffmpeg -i INPUT -f pulse "stream name"
@section sdl
-SDL (Simple DirectMedia Layer) output device.
+SDL (Simple DirectMedia Layer) output device. Deprecated and will be removed.
+
+For monitoring purposes in FFmpeg, pipes and a video player such as ffplay can be used:
+
+@example
+ffmpeg -i INPUT -f nut -c:v rawvideo - | ffplay -
+@end example
"sdl2" can be used as alias for "sdl".
diff --git a/libavdevice/sdl2.c b/libavdevice/sdl2.c
index 342a253dc0..ec3c3d19b5 100644
--- a/libavdevice/sdl2.c
+++ b/libavdevice/sdl2.c
@@ -51,6 +51,7 @@ typedef struct {
SDL_Rect texture_rect;
int inited;
+ int warned;
} SDLContext;
static const struct sdl_texture_format_entry {
@@ -165,6 +166,15 @@ static int sdl2_write_header(AVFormatContext *s)
int i, ret = 0;
int flags = 0;
+ if (!sdl->warned) {
+ av_log(sdl, AV_LOG_WARNING,
+ "The sdl output device is deprecated due to being fundamentally incompatible with libavformat API. "
+ "For monitoring purposes in ffmpeg you can output to a file or use pipes and a video player.\n"
+ "Example: ffmpeg -i INPUT -f nut -c:v rawvideo - | ffplay -\n"
+ );
+ sdl->warned = 1;
+ }
+
if (!sdl->window_title)
sdl->window_title = av_strdup(s->url);
diff --git a/libavdevice/version_major.h b/libavdevice/version_major.h
index da5854ed4c..6e04e0939d 100644
--- a/libavdevice/version_major.h
+++ b/libavdevice/version_major.h
@@ -37,5 +37,7 @@
#define FF_API_BKTR_DEVICE (LIBAVDEVICE_VERSION_MAJOR < 62)
// reminder to remove the opengl device on next major bump
#define FF_API_OPENGL_DEVICE (LIBAVDEVICE_VERSION_MAJOR < 62)
+// reminder to remove the sdl2 device on next major bump
+#define FF_API_SDL2_DEVICE (LIBAVDEVICE_VERSION_MAJOR < 62)
#endif /* AVDEVICE_VERSION_MAJOR_H */
--
2.43.2
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [FFmpeg-devel] [PATCH v2 1/2] avdevice: deprecate opengl outdev
2024-02-21 11:33 [FFmpeg-devel] [PATCH v2 1/2] avdevice: deprecate opengl outdev J. Dekker
2024-02-21 11:33 ` [FFmpeg-devel] [PATCH v2 2/2] avdevice: deprecate sdl outdev J. Dekker
@ 2024-02-21 12:32 ` Lynne
2024-02-26 15:43 ` Anton Khirnov
2024-02-26 16:47 ` Jan Ekström
2 siblings, 1 reply; 7+ messages in thread
From: Lynne @ 2024-02-21 12:32 UTC (permalink / raw)
To: FFmpeg development discussions and patches
Feb 21, 2024, 12:34 by jdek@itanimul.li:
> Signed-off-by: J. Dekker <jdek@itanimul.li>
> ---
> doc/outdevs.texi | 2 +-
> libavdevice/opengl_enc.c | 11 +++++++++++
> libavdevice/version_major.h | 2 ++
> 3 files changed, 14 insertions(+), 1 deletion(-)
>
> diff --git a/doc/outdevs.texi b/doc/outdevs.texi
> index f0484bbf8f..941429a8c8 100644
> --- a/doc/outdevs.texi
> +++ b/doc/outdevs.texi
> @@ -302,7 +302,7 @@ ffmpeg -re -i INPUT -c:v rawvideo -pix_fmt bgra -f fbdev /dev/fb0
> See also @url{http://linux-fbdev.sourceforge.net/}, and fbset(1).
>
We have removed demuxers and decoders before without a deprecation period.
I think we should do the same here, as it is just a muxer.
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [FFmpeg-devel] [PATCH v2 1/2] avdevice: deprecate opengl outdev
2024-02-21 12:32 ` [FFmpeg-devel] [PATCH v2 1/2] avdevice: deprecate opengl outdev Lynne
@ 2024-02-26 15:43 ` Anton Khirnov
2024-02-28 9:31 ` J. Dekker
0 siblings, 1 reply; 7+ messages in thread
From: Anton Khirnov @ 2024-02-26 15:43 UTC (permalink / raw)
To: FFmpeg development discussions and patches
Quoting Lynne (2024-02-21 13:32:19)
> Feb 21, 2024, 12:34 by jdek@itanimul.li:
>
> > Signed-off-by: J. Dekker <jdek@itanimul.li>
> > ---
> > doc/outdevs.texi | 2 +-
> > libavdevice/opengl_enc.c | 11 +++++++++++
> > libavdevice/version_major.h | 2 ++
> > 3 files changed, 14 insertions(+), 1 deletion(-)
> >
> > diff --git a/doc/outdevs.texi b/doc/outdevs.texi
> > index f0484bbf8f..941429a8c8 100644
> > --- a/doc/outdevs.texi
> > +++ b/doc/outdevs.texi
> > @@ -302,7 +302,7 @@ ffmpeg -re -i INPUT -c:v rawvideo -pix_fmt bgra -f fbdev /dev/fb0
> > See also @url{http://linux-fbdev.sourceforge.net/}, and fbset(1).
> >
>
> We have removed demuxers and decoders before without a deprecation period.
> I think we should do the same here, as it is just a muxer.
In the last thread some people really wanted to have it deprecated
first.
While I'd also prefer to remove it outright, I'd prefer even more to not
have this bikeshud to death.
--
Anton Khirnov
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [FFmpeg-devel] [PATCH v2 1/2] avdevice: deprecate opengl outdev
2024-02-26 15:43 ` Anton Khirnov
@ 2024-02-28 9:31 ` J. Dekker
0 siblings, 0 replies; 7+ messages in thread
From: J. Dekker @ 2024-02-28 9:31 UTC (permalink / raw)
To: ffmpeg-devel
Anton Khirnov <anton@khirnov.net> writes:
> Quoting Lynne (2024-02-21 13:32:19)
>> Feb 21, 2024, 12:34 by jdek@itanimul.li:
>>
>> > Signed-off-by: J. Dekker <jdek@itanimul.li>
>> > ---
>> > doc/outdevs.texi | 2 +-
>> > libavdevice/opengl_enc.c | 11 +++++++++++
>> > libavdevice/version_major.h | 2 ++
>> > 3 files changed, 14 insertions(+), 1 deletion(-)
>> >
>> > diff --git a/doc/outdevs.texi b/doc/outdevs.texi
>> > index f0484bbf8f..941429a8c8 100644
>> > --- a/doc/outdevs.texi
>> > +++ b/doc/outdevs.texi
>> > @@ -302,7 +302,7 @@ ffmpeg -re -i INPUT -c:v rawvideo -pix_fmt bgra -f
>> > fbdev /dev/fb0
>> > See also @url{http://linux-fbdev.sourceforge.net/}, and fbset(1).
>> >
>>
>> We have removed demuxers and decoders before without a deprecation period.
>> I think we should do the same here, as it is just a muxer.
>
> In the last thread some people really wanted to have it deprecated
> first.
>
> While I'd also prefer to remove it outright, I'd prefer even more to not
> have this bikeshud to death.
No reason to delay this further. Pushed.
--
jd
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [FFmpeg-devel] [PATCH v2 1/2] avdevice: deprecate opengl outdev
2024-02-21 11:33 [FFmpeg-devel] [PATCH v2 1/2] avdevice: deprecate opengl outdev J. Dekker
2024-02-21 11:33 ` [FFmpeg-devel] [PATCH v2 2/2] avdevice: deprecate sdl outdev J. Dekker
2024-02-21 12:32 ` [FFmpeg-devel] [PATCH v2 1/2] avdevice: deprecate opengl outdev Lynne
@ 2024-02-26 16:47 ` Jan Ekström
2024-02-27 1:42 ` Zhao Zhili
2 siblings, 1 reply; 7+ messages in thread
From: Jan Ekström @ 2024-02-26 16:47 UTC (permalink / raw)
To: FFmpeg development discussions and patches
On Wed, Feb 21, 2024 at 1:34 PM J. Dekker <jdek@itanimul.li> wrote:
>
> Signed-off-by: J. Dekker <jdek@itanimul.li>
> ---
> doc/outdevs.texi | 2 +-
> libavdevice/opengl_enc.c | 11 +++++++++++
> libavdevice/version_major.h | 2 ++
> 3 files changed, 14 insertions(+), 1 deletion(-)
As during FOSDEM there seemed to be a consensus that we should move to
removing this, I agree with the idea behind this patch.
Additionally, both during FOSDEM as well as right now I successfully
built this module on Fedora 39 and tried `ffmpeg -v verbose -re -i
"https://megumin.fushizen.eu/videos/HidamariHoneycombED.mp4" -vf
scale=w=640:h=360,format=yuv420p -map 0:v -f sdl "SDL output"` and it
seems like while a 0x0 (?) window is created (without any decorations
- so you only notice it when you alt-tab), it does not seem to show up
on the desktop. So while it seemingly works with RGB input on Windows,
at least rgb24 didn't work on Fedora, either. yuyv422 and uyvy422
failed completely and the out device didn't take them in (which is
probably an SDL2 limitation?).
Regards,
Jan
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [FFmpeg-devel] [PATCH v2 1/2] avdevice: deprecate opengl outdev
2024-02-26 16:47 ` Jan Ekström
@ 2024-02-27 1:42 ` Zhao Zhili
0 siblings, 0 replies; 7+ messages in thread
From: Zhao Zhili @ 2024-02-27 1:42 UTC (permalink / raw)
To: FFmpeg development discussions and patches
> 在 2024年2月27日,上午12:47,Jan Ekström <jeebjp@gmail.com> 写道:
>
> On Wed, Feb 21, 2024 at 1:34 PM J. Dekker <jdek@itanimul.li> wrote:
>>
>> Signed-off-by: J. Dekker <jdek@itanimul.li>
>> ---
>> doc/outdevs.texi | 2 +-
>> libavdevice/opengl_enc.c | 11 +++++++++++
>> libavdevice/version_major.h | 2 ++
>> 3 files changed, 14 insertions(+), 1 deletion(-)
>
> As during FOSDEM there seemed to be a consensus that we should move to
> removing this, I agree with the idea behind this patch.
>
> Additionally, both during FOSDEM as well as right now I successfully
> built this module on Fedora 39 and tried `ffmpeg -v verbose -re -i
> "https://megumin.fushizen.eu/videos/HidamariHoneycombED.mp4" -vf
> scale=w=640:h=360,format=yuv420p -map 0:v -f sdl "SDL output"` and it
> seems like while a 0x0 (?) window is created (without any decorations
> - so you only notice it when you alt-tab), it does not seem to show up
> on the desktop. So while it seemingly works with RGB input on Windows,
> at least rgb24 didn't work on Fedora, either. yuyv422 and uyvy422
> failed completely and the out device didn't take them in (which is
> probably an SDL2 limitation?).
There are at least two version of patches trying to fix the issue, two version of patches to depreciate/remove the module, and a dedicated thread try to resolve this issue. Please refer to those thread to figure out what’s working and what’s not.
>
> Regards,
> Jan
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request@ffmpeg.
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2024-02-28 9:32 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-21 11:33 [FFmpeg-devel] [PATCH v2 1/2] avdevice: deprecate opengl outdev J. Dekker
2024-02-21 11:33 ` [FFmpeg-devel] [PATCH v2 2/2] avdevice: deprecate sdl outdev J. Dekker
2024-02-21 12:32 ` [FFmpeg-devel] [PATCH v2 1/2] avdevice: deprecate opengl outdev Lynne
2024-02-26 15:43 ` Anton Khirnov
2024-02-28 9:31 ` J. Dekker
2024-02-26 16:47 ` Jan Ekström
2024-02-27 1:42 ` Zhao Zhili
Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
This inbox may be cloned and mirrored by anyone:
git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
ffmpegdev@gitmailbox.com
public-inbox-index ffmpegdev
Example config snippet for mirrors.
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git