Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
* [FFmpeg-devel] [PATCH] libavdevice: Improve example in deprecation message for opengl and sdl
@ 2024-04-14 18:58 Alexander Strasser via ffmpeg-devel
  2024-04-14 19:10 ` Nicolas George
  0 siblings, 1 reply; 4+ messages in thread
From: Alexander Strasser via ffmpeg-devel @ 2024-04-14 18:58 UTC (permalink / raw)
  To: ffmpeg-devel; +Cc: Alexander Strasser

When piping ffmpeg into ffplay both programs write a status line in
the terminal. That causes flickering and invisibility of one or the
other status line.

As compromise set ffplay log level to warning, so it doesn't show
the status line.

The user is usually testing ffmpeg command lines and want's a
preview of the result. This way the user can see the ffmpeg output
and still see errors and warnings from ffplay, should they occur.
---
 libavdevice/opengl_enc.c | 2 +-
 libavdevice/sdl2.c       | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavdevice/opengl_enc.c b/libavdevice/opengl_enc.c
index 6f7a30ff9e..c50d02870a 100644
--- a/libavdevice/opengl_enc.c
+++ b/libavdevice/opengl_enc.c
@@ -1067,7 +1067,7 @@ static av_cold int opengl_write_header(AVFormatContext *h)
         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"
+            "Example: ffmpeg -i INPUT -f nut -c:v rawvideo - | ffplay -loglevel warning -\n"
         );
         opengl->warned = 1;
     }
diff --git a/libavdevice/sdl2.c b/libavdevice/sdl2.c
index 779c8e08b0..59e3182df8 100644
--- a/libavdevice/sdl2.c
+++ b/libavdevice/sdl2.c
@@ -167,7 +167,7 @@ static int sdl2_write_header(AVFormatContext *s)
         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"
+            "Example: ffmpeg -i INPUT -f nut -c:v rawvideo - | ffplay -loglevel warning -\n"
         );
         sdl->warned = 1;
     }
--
_______________________________________________
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] 4+ messages in thread

* Re: [FFmpeg-devel] [PATCH] libavdevice: Improve example in deprecation message for opengl and sdl
  2024-04-14 18:58 [FFmpeg-devel] [PATCH] libavdevice: Improve example in deprecation message for opengl and sdl Alexander Strasser via ffmpeg-devel
@ 2024-04-14 19:10 ` Nicolas George
  2024-04-14 19:24   ` Nicolas George
  0 siblings, 1 reply; 4+ messages in thread
From: Nicolas George @ 2024-04-14 19:10 UTC (permalink / raw)
  To: FFmpeg development discussions and patches; +Cc: Alexander Strasser

Alexander Strasser via ffmpeg-devel (12024-04-14):
> When piping ffmpeg into ffplay both programs write a status line in
> the terminal. That causes flickering and invisibility of one or the
> other status line.

The suggestion of piping to ffplay to replace opengl is inadequate: the
muxing, pipe, demuxing steps introduce a significant latency, and ffplay
tries to maintain the timing, so the latency is never reduced.

Compare:

ffplay -f x11grab -framerate 5 -video_size 284x92 -i :0+1138+0
ffmpeg -f x11grab -framerate 5 -video_size 284x92 -i :0+1138+0 \
  -f nut -c:v rawvideo - | ffplay -loglevel warning -
ffmpeg -f x11grab -framerate 5 -video_size 284x92 -i :0+1138+0 \
  -pix_fmt yuv420p -f xv :0

(since at least xv was not broken)
(replace 284x92 and +1138+0 with an area of your screen where something
is happening)

The first two ones will have a delay of about five seconds, the last one
is almost instantaneous.

Either we find options to make ffplay display frames as fast as
possible, or we must document to the user that no adequate replacement
exists.

Or we make a point of fixing the devices that were broken.

Regards,

-- 
  Nicolas George
_______________________________________________
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] 4+ messages in thread

* Re: [FFmpeg-devel] [PATCH] libavdevice: Improve example in deprecation message for opengl and sdl
  2024-04-14 19:10 ` Nicolas George
@ 2024-04-14 19:24   ` Nicolas George
  2024-04-29 22:02     ` Alexander Strasser via ffmpeg-devel
  0 siblings, 1 reply; 4+ messages in thread
From: Nicolas George @ 2024-04-14 19:24 UTC (permalink / raw)
  To: FFmpeg development discussions and patches; +Cc: Alexander Strasser

Nicolas George (12024-04-14):
> Either we find options to make ffplay display frames as fast as
> possible, or we must document to the user that no adequate replacement
> exists.

Please add “-vf setpts=0”. It still has a little more latency than a
built-in device, but at least the feature is not *completely* broken.

> Or we make a point of fixing the devices that were broken.

We still should.

Regards,

-- 
  Nicolas George
_______________________________________________
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] 4+ messages in thread

* Re: [FFmpeg-devel] [PATCH] libavdevice: Improve example in deprecation message for opengl and sdl
  2024-04-14 19:24   ` Nicolas George
@ 2024-04-29 22:02     ` Alexander Strasser via ffmpeg-devel
  0 siblings, 0 replies; 4+ messages in thread
From: Alexander Strasser via ffmpeg-devel @ 2024-04-29 22:02 UTC (permalink / raw)
  To: FFmpeg development discussions and patches; +Cc: Alexander Strasser

On 2024-04-14 21:24 +0200, Nicolas George wrote:
> Nicolas George (12024-04-14):
> > Either we find options to make ffplay display frames as fast as
> > possible, or we must document to the user that no adequate replacement
> > exists.
>
> Please add “-vf setpts=0”. It still has a little more latency than a
> built-in device, but at least the feature is not *completely* broken.

Thank for your feedback. I sent a v2 with `-vf setpts=0`.


> > Or we make a point of fixing the devices that were broken.
>
> We still should.

As long as we are not able to get it fixed, an improved suggestion in
the deprecation message seems better than what we have now.


  Alexander
_______________________________________________
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] 4+ messages in thread

end of thread, other threads:[~2024-04-29 22:02 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-14 18:58 [FFmpeg-devel] [PATCH] libavdevice: Improve example in deprecation message for opengl and sdl Alexander Strasser via ffmpeg-devel
2024-04-14 19:10 ` Nicolas George
2024-04-14 19:24   ` Nicolas George
2024-04-29 22:02     ` Alexander Strasser via ffmpeg-devel

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