Re: [FFmpeg-user] avsynctest

2022-05-12 Thread Paul B Mahol
On Thu, May 12, 2022 at 2:37 PM Bang He  wrote:

> hi all
> it seems avsynctest filter is helpful on my job. can you demo some command
> line?
>

ffplay -f lavfi -i avsynctest[out1]


> thanks.
>
> On Tue, Apr 19, 2022 at 5:10 PM Michael Koch 
> wrote:
>
> > Hello,
> >
> > it's unclear how the new "avsynctest" source is expected to work. The
> > most simple command line
> >
> > ffmpeg -f lavfi -i avsynctest=d=5 out.mov
> >
> > gives this error message:
> >
> > [lavfi @ 02741200efc0] Output pad "video" with type video of the
> > filter instance "Parsed_avsynctest_0" of avsynctest not connected to any
> > destination
> > avsynctest=d=5: Invalid argument
> >
> > The console output is below.
> >
> > Michael
> >
> >
> >
> > C:\Users\astro\Desktop>ffmpeg -f lavfi -i avsynctest=d=5 out.mov
> > ffmpeg version 2022-04-18-git-d5687236ab-full_build-www.gyan.dev
> > Copyright (c) 2000-2022 the FFmpeg developers
> >built with gcc 11.2.0 (Rev10, Built by MSYS2 project)
> >configuration: --enable-gpl --enable-version3 --enable-static
> > --disable-w32threads --disable-autodetect --enable-fontconfig
> > --enable-iconv --enable-gnutls --enable-libxml2 --enable-gmp
> > --enable-bzlib --enable-lzma --enable-libsnappy --enable-zlib
> > --enable-librist --enable-libsrt --enable-libssh --enable-libzmq
> > --enable-avisynth --enable-libbluray --enable-libcaca --enable-sdl2
> > --enable-libdav1d --enable-libdavs2 --enable-libuavs3d --enable-libzvbi
> > --enable-librav1e --enable-libsvtav1 --enable-libwebp --enable-libx264
> > --enable-libx265 --enable-libxavs2 --enable-libxvid --enable-libaom
> > --enable-libopenjpeg --enable-libvpx --enable-mediafoundation
> > --enable-libass --enable-frei0r --enable-libfreetype --enable-libfribidi
> > --enable-liblensfun --enable-libvidstab --enable-libvmaf
> > --enable-libzimg --enable-amf --enable-cuda-llvm --enable-cuvid
> > --enable-ffnvcodec --enable-nvdec --enable-nvenc --enable-d3d11va
> > --enable-dxva2 --enable-libmfx --enable-libshaderc --enable-vulkan
> > --enable-libplacebo --enable-opencl --enable-libcdio --enable-libgme
> > --enable-libmodplug --enable-libopenmpt --enable-libopencore-amrwb
> > --enable-libmp3lame --enable-libshine --enable-libtheora
> > --enable-libtwolame --enable-libvo-amrwbenc --enable-libilbc
> > --enable-libgsm --enable-libopencore-amrnb --enable-libopus
> > --enable-libspeex --enable-libvorbis --enable-ladspa --enable-libbs2b
> > --enable-libflite --enable-libmysofa --enable-librubberband
> > --enable-libsoxr --enable-chromaprint
> >libavutil  57. 24.101 / 57. 24.101
> >libavcodec 59. 26.100 / 59. 26.100
> >libavformat59. 22.100 / 59. 22.100
> >libavdevice59.  6.100 / 59.  6.100
> >libavfilter 8. 33.100 /  8. 33.100
> >libswscale  6.  6.100 /  6.  6.100
> >libswresample   4.  6.100 /  4.  6.100
> >libpostproc56.  5.100 / 56.  5.100
> > [lavfi @ 02741200efc0] Output pad "video" with type video of the
> > filter instance "Parsed_avsynctest_0" of avsynctest not connected to any
> > destination
> > avsynctest=d=5: Invalid argument
> >
> > ___
> > ffmpeg-user mailing list
> > ffmpeg-user@ffmpeg.org
> > https://ffmpeg.org/mailman/listinfo/ffmpeg-user
> >
> > To unsubscribe, visit link above, or email
> > ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".
> >
> ___
> ffmpeg-user mailing list
> ffmpeg-user@ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
> To unsubscribe, visit link above, or email
> ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".
>
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".


[FFmpeg-user] Four Quick Questions and a tough one

2022-05-12 Thread John Van Ostrand
Hi Everybody,

Hopefully these are quick and easy questions to answer. The background: I'm
working with my own 60 year old 8 mm home movies and the digitizing lab
presumed they were 18fps, I think they are 16 fps.  So I have to change
that and also do other things like make cuts, colour correct, etc. I'd like
to preserve the quality.

1. In changing FPS what is better when going from 16 fps to 24 fps a
pattern of 2 frames+duplicate or 3 frames+2 dupes +3 frames+1 duplicate, or
something else?

2. When performing many different filters or changes to a video (fps
change, colour correction, etc) how bad is it to perform that in many steps
instead of a filter_complex? Does decode/rencode eventually create chaos?
Is there a way to do it without further loss? the "-c copy" codec has
issues when not used on a keyframe, right?

3. What Linux tool is useful for determining cuts on an exact frame
boundary. And since a frame isn't a point in time but a brief period (41.66
ms in this case) how important is it to be exactly on a time boundary.

4. Am I being too picky about all this?

5. These two source files produce a different frame pattern when I inverse
telecine, then telecine with the correct frame rate. The 8mm was done from
18 fps to 24 fps. It should have been 16 fps to 24 fps.

input.mp4
=
Pattern 1-2-3-3 (3 frames + dupe)
Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv,
bt709), 1920x1080, 11413 kb/s, 24 fps, 24 tbr, 24k tbn, 48 tbc (default)

ffmpeg -r 21.3 -i input.mp4 -vf mpdecimate=lo=500 -r 24 -t 3 output.mp4
produces:

Pattern: 1-1-2-3-3+4-5-6-6 (1 frame + dupe, 2 frames + dupe, 3 frames +
dupe)
Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv,
bt709), 1920x1080, 4535 kb/s, 24 fps, 24 tbr, 12288 tbn, 48 tbc (default)

input2.mp4
==
Pattern: 1-2-3-3 (3 frames + dupe)
Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p,
1920x1080 [SAR 1:1 DAR 16:9], 13365 kb/s, 24 fps, 24 tbr, 24k tbn, 48 tbc
(default)

ffmpeg -r 21.3 -i input2.mp4 -filter_complex mpdecimate=lo=500 -r 24 -t
3 output2.mp4

Pattern 1-2-2 (2 frames + dupe)
Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p,
1920x1080 [SAR 1:1 DAR 16:9], 4731 kb/s, 24 fps, 24 tbr, 12288 tbn, 48 tbc
(default)

I'm checking using ffmpeg -i output.mp4 -vsync vfr -q 2 frame\ %04d.jpg and
looking at the frames.
-- 
John Van Ostrand
At large on sabbatical
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".


Re: [FFmpeg-user] avsynctest

2022-05-12 Thread Bang He
hi all
it seems avsynctest filter is helpful on my job. can you demo some command
line?
thanks.

On Tue, Apr 19, 2022 at 5:10 PM Michael Koch 
wrote:

> Hello,
>
> it's unclear how the new "avsynctest" source is expected to work. The
> most simple command line
>
> ffmpeg -f lavfi -i avsynctest=d=5 out.mov
>
> gives this error message:
>
> [lavfi @ 02741200efc0] Output pad "video" with type video of the
> filter instance "Parsed_avsynctest_0" of avsynctest not connected to any
> destination
> avsynctest=d=5: Invalid argument
>
> The console output is below.
>
> Michael
>
>
>
> C:\Users\astro\Desktop>ffmpeg -f lavfi -i avsynctest=d=5 out.mov
> ffmpeg version 2022-04-18-git-d5687236ab-full_build-www.gyan.dev
> Copyright (c) 2000-2022 the FFmpeg developers
>built with gcc 11.2.0 (Rev10, Built by MSYS2 project)
>configuration: --enable-gpl --enable-version3 --enable-static
> --disable-w32threads --disable-autodetect --enable-fontconfig
> --enable-iconv --enable-gnutls --enable-libxml2 --enable-gmp
> --enable-bzlib --enable-lzma --enable-libsnappy --enable-zlib
> --enable-librist --enable-libsrt --enable-libssh --enable-libzmq
> --enable-avisynth --enable-libbluray --enable-libcaca --enable-sdl2
> --enable-libdav1d --enable-libdavs2 --enable-libuavs3d --enable-libzvbi
> --enable-librav1e --enable-libsvtav1 --enable-libwebp --enable-libx264
> --enable-libx265 --enable-libxavs2 --enable-libxvid --enable-libaom
> --enable-libopenjpeg --enable-libvpx --enable-mediafoundation
> --enable-libass --enable-frei0r --enable-libfreetype --enable-libfribidi
> --enable-liblensfun --enable-libvidstab --enable-libvmaf
> --enable-libzimg --enable-amf --enable-cuda-llvm --enable-cuvid
> --enable-ffnvcodec --enable-nvdec --enable-nvenc --enable-d3d11va
> --enable-dxva2 --enable-libmfx --enable-libshaderc --enable-vulkan
> --enable-libplacebo --enable-opencl --enable-libcdio --enable-libgme
> --enable-libmodplug --enable-libopenmpt --enable-libopencore-amrwb
> --enable-libmp3lame --enable-libshine --enable-libtheora
> --enable-libtwolame --enable-libvo-amrwbenc --enable-libilbc
> --enable-libgsm --enable-libopencore-amrnb --enable-libopus
> --enable-libspeex --enable-libvorbis --enable-ladspa --enable-libbs2b
> --enable-libflite --enable-libmysofa --enable-librubberband
> --enable-libsoxr --enable-chromaprint
>libavutil  57. 24.101 / 57. 24.101
>libavcodec 59. 26.100 / 59. 26.100
>libavformat59. 22.100 / 59. 22.100
>libavdevice59.  6.100 / 59.  6.100
>libavfilter 8. 33.100 /  8. 33.100
>libswscale  6.  6.100 /  6.  6.100
>libswresample   4.  6.100 /  4.  6.100
>libpostproc56.  5.100 / 56.  5.100
> [lavfi @ 02741200efc0] Output pad "video" with type video of the
> filter instance "Parsed_avsynctest_0" of avsynctest not connected to any
> destination
> avsynctest=d=5: Invalid argument
>
> ___
> ffmpeg-user mailing list
> ffmpeg-user@ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
> To unsubscribe, visit link above, or email
> ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".
>
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".


Re: [FFmpeg-user] Set MPEG-2 interlace flag without re-encoding

2022-05-12 Thread Nicolas Gaullier
>On 5/9/22 2:44 AM, Nicolas Gaullier wrote:
>> Note that if you reencode, you might consider processing the chroma in 
>> between (convert to 4:2:2 back and forth) since the vertical sampling 
>> filtering is affected.
>
>What does this mean? I only have basic knowledge of how video compression 
>works so I don't understand what you're talking about.
>
>Thanks,
>Alex

I suppose your file is a common distribution format, so 4:2:0. This implies a 
vertical filtering of the chroma and vertical processing with interlaced scan 
is always very picky.
I have not experienced this myself, maybe someone could comment how to handle 
this with care in a qualified filter graph; I think converting to 4:2:2 back 
and forth (weaving in 4:2:2) without precautions may be sufficient though.
But well, now, sincerely, compared to the interlacing artefacts you noticed, 
the difference here should be very subtle, especially if the original content 
does not show high vertical frequencies in the chroma. This is why I said you 
"might" consider processing the chroma, I don't think of it as a requirement. 
Comparing visually the results of the two workflows and checking the 
differences would be very interesting.

For more information on this subject, you can look at : 
https://www.cockam.com/vidbug2.htm
The artefacts reported there concern progressive-encoded content decoded as 
interlaced, this is more dramatic but clearly it is NOT your case.

Nicolas
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".