[FFmpeg-user] Is there an image viewer with FileSystemWatcher?
Michael Koch
astroelectronic at t-online.de
Wed Sep 1 12:23:57 EEST 2021
Am 01.09.2021 um 09:30 schrieb Paul B Mahol:
> On Wed, Sep 1, 2021 at 9:26 AM Michael Koch <astroelectronic at t-online.de>
> wrote:
>
>> Hello,
>>
>> sometimes it's an iterative process to find the best parameters for a
>> filter, especially when the filter changes brightness, contrast or colors:
>> 1) Edit the filter parameters in the FFmpeg command line
>> 2) Run FFmpeg
>> 3) Open the output image in a viewer (normally I'm using IrfanView)
>> 4) Realize that the output can be improved, close the image viewer and
>> go back to step 1)
>>
>> Is there any image viewer that automatically detects when the image is
>> overwritten and then shows the new image? I mean without closing and
>> re-starting the viewer.
>>
> Use mpv, it supports all ffmpeg filters, and thus you need not to use
> closed source viewers at all.
Thank you, I got mpv working with a complex filterchain. If anyone wants
to try it, here is an example:
rem FFmpeg:
ffmpeg -i 7Z7A2027.jpg -filter_complex
"split[1][2];[1]hue=h=0:s=1:b=-2[3];[2][3]hstack" -y out.jpg
rem This is the same thing with MPV:
mpv 7Z7A2027.jpg --keep-open=yes
--lavfi-complex="[vid1]split[1][2];[1]hue=h=0:s=1:b=-2[3];[2][3]hstack,scale=iw/2:ih/2[vo]"
Notes:
1) Don't use "-i" before the input file.
2) "--keep-open=yes" means that mpv doesn't close shortly after showing
the output image.
3) "-filter_complex" must be replaced by "--lavfi-complex="
2) The input pad in the filter chain must be called [vid1]. You can't
omit it as in FFmpeg.
3) The output pad in the filter chain must be called [vo]. You can't
omit it as in FFmpeg.
Michael
More information about the ffmpeg-user
mailing list