[FFmpeg-user] Removing scratches and speckles from scanned film
I'd like to be able to digitally remove the speckles of dust, hair, lint from scanned film. This isn't lens dirt, they are black spots, lines, etc. that appear only on one frame and not on the frames before or after. They can be large, like a blob 9px wide and 18px long or a strand a couple pixels wide an 100px long on a diagonal, or small spots only a few pixels wide. It seems it could be detected by comparing each frame to the ones before and after looking for spots that appear only on one frame. So a 3D or temporal comparison might work. This doesn't seem to be the problem that filters like bm3d and hqdn3d solve. They haven't even reduced the blob. Attached are a few sample frames. Frame 12 has a blob and frame 19 has a scratch, both on the forehead. Is there a better filter for these? Or some radical parameters to one of the standard denoise filters that would work? Thanks. https://drive.google.com/file/d/14LGqNNNvu9Ui0_-gQqs0qTKv6wvhk94A/view?usp=sharing -- 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] Deinterlacing VHS
Was the the original capture compressed at all? Digitizing, especially from VHS, is a challenge. Best is to take the YC output from the deck, push it through a TBC/proc-amp into the capture device, and record that with no compression. If a TBC isn't available, at least don't compress the capture. Sure, you end up with a HUGE file, but then you can repeatedly post-process to find what looks the best. OTOH, if recapturing isn't an option, the OP may be stuck. z! ___ 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] Deinterlacing VHS
What resolution, codec, frame rate, etc did you capture to? Jay > On May 12, 2020, at 11:56 AM, Noeck wrote: > > Hi, > > I have digitized VHS video recordings on my computer. The Video is > originally recorded in a PAL system (interlaced). I would like to > improve the video quality with some filters. Cropping and color > correction is clear. > > But deinterlacing is hard, as the lines of the half-images are not > exactly one pixel apart because the resolution is not identical with the > analogue resolution on tape. The framerate should be like on tape. yadif > does improve things a bit. > > Is this just an ill-posed problem or are there special settings to > achieve a good deinterlacing in this case? > > Are there any other recommendation how to improve visually percieved > quality for typical VHS videos? > > Cheers, > Daniel > ___ > 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] Subtitle metadata
On 12/05/2020 22:18, Edward Park wrote: > Hi, >> Hi, I'm seeing a change in the way FFmpeg handles metadata options, >> particularly for subtitles. I can't say when and which version cause it to >> change. >> >> FFmpeg now appears to ignore the "-disposition:s:s:0 none" option which I >> would previously use to copy but not display subtitles by default: > > I don't know if this was changed, but does replacing none with 0 and using a > regular stream specifier after disposition work? e.g. -disposition:s:0 0 > > Regards, > Ted Park > > Tried both of those suggestions (and many more); FFmpeg now seems to be ignoring "disposition" - it still obeys language options (e.g. eng, dut, fre), title options (e.g. SDH) ___ 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] Subtitle metadata
Hi, > Hi, I'm seeing a change in the way FFmpeg handles metadata options, > particularly for subtitles. I can't say when and which version cause it to > change. > > FFmpeg now appears to ignore the "-disposition:s:s:0 none" option which I > would previously use to copy but not display subtitles by default: I don't know if this was changed, but does replacing none with 0 and using a regular stream specifier after disposition work? e.g. -disposition:s:0 0 Regards, Ted Park ___ 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] Deinterlacing VHS
Hi On Tue 12 May 2020, 18:01 Noeck, wrote: > Hi, > > I have digitized VHS video recordings on my computer. The Video is > originally recorded in a PAL system (interlaced). I would like to > improve the video quality with some filters. Cropping and color > correction is clear. > > But deinterlacing is hard, as the lines of the half-images are not > exactly one pixel apart because the resolution is not identical with the > analogue resolution on tape. The framerate should be like on tape. yadif > does improve things a bit. > I'd love to see a pic or video of what you describe. As Marton said, sounds like a digitisation issue that you've introduced. Best, Kieran O'Leary Irish Film Institute ___ 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] Deinterlacing VHS
On Tue, 12 May 2020, Noeck wrote: Hi, I have digitized VHS video recordings on my computer. The Video is originally recorded in a PAL system (interlaced). I would like to improve the video quality with some filters. Cropping and color correction is clear. But deinterlacing is hard, as the lines of the half-images are not exactly one pixel apart because the resolution is not identical with the analogue resolution on tape. The framerate should be like on tape. yadif does improve things a bit. Is this just an ill-posed problem or are there special settings to achieve a good deinterlacing in this case? If your source VHS is OK, and VHS is smooth on TV then you probably made a mistake during digitalizing your content and some unintended conversion or scaling happended there. You should re-digialize your content keeping the original PAL resolution, and encoding using lossless or interlaced encoder. Otherwise it is doubtful that you can really improve it later. Regards, Marton ___ 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] Deinterlacing VHS
Hi, I have digitized VHS video recordings on my computer. The Video is originally recorded in a PAL system (interlaced). I would like to improve the video quality with some filters. Cropping and color correction is clear. But deinterlacing is hard, as the lines of the half-images are not exactly one pixel apart because the resolution is not identical with the analogue resolution on tape. The framerate should be like on tape. yadif does improve things a bit. Is this just an ill-posed problem or are there special settings to achieve a good deinterlacing in this case? Are there any other recommendation how to improve visually percieved quality for typical VHS videos? Cheers, Daniel ___ 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] Closed Captions for zone 1 DVD
Am Di., 12. Mai 2020 um 13:16 Uhr schrieb PPRJ01 : > Actually, my initial objective was to remove the Closed Captions from all my > movies. Isn't this easiest with "-a53cc 0", since you are re-encoding somewhere in your pipeline? Carl Eugen ___ 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] Subtitle metadata
Hi, I'm seeing a change in the way FFmpeg handles metadata options, particularly for subtitles. I can't say when and which version cause it to change. FFmpeg now appears to ignore the "-disposition:s:s:0 none" option which I would previously use to copy but not display subtitles by default: ~/temp$ ffmpeg -i in.mkv -c copy -metadata:s:v:0 title="" -metadata:s:v:0 language=eng -disposition:s:v:0 default -metadata:s:a:0 title="" -metadata:s:a:0 language=eng -disposition:s:a:0 default -metadata:s:s:0 title="" -metadata:s:s:0 language=eng -disposition:s:s:0 none -y out.mkv ffmpeg version N-97747-gffae62d96c Copyright (c) 2000-2020 the FFmpeg developers built with gcc 9 (Debian 9.2.1-30) configuration: --enable-ffplay --enable-ffprobe --enable-filters --enable-gpl --enable-libfdk-aac --enable-libmp3lame --enable-libopus --enable-libv4l2 --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-nonfree libavutil 56. 45.100 / 56. 45.100 libavcodec 58. 84.100 / 58. 84.100 libavformat58. 43.100 / 58. 43.100 libavdevice58. 9.103 / 58. 9.103 libavfilter 7. 80.100 / 7. 80.100 libavresample 4. 0. 0 / 4. 0. 0 libswscale 5. 6.101 / 5. 6.101 libswresample 3. 6.100 / 3. 6.100 libpostproc55. 6.100 / 55. 6.100 Input #0, matroska,webm, from 'in.mkv': Metadata: ENCODER : Lavf58.43.100 Duration: 00:21:53.43, start: 0.00, bitrate: 964 kb/s Stream #0:0(eng): Video: h264 (High), yuv420p(tv, bt709/unknown/unknown, progressive), 720x404 [SAR 404:405 DAR 16:9], SAR 254:255 DAR 3048:1717, 23.98 fps, 23.98 tbr, 1k tbn, 47.95 tbc (default) Metadata: DURATION: 00:21:53.36200 Stream #0:1(eng): Audio: aac (LC), 44100 Hz, stereo, fltp (default) Metadata: DURATION: 00:21:53.43400 Stream #0:2(eng): Subtitle: subrip (default) Metadata: ENCODER : Lavc58.84.100 subrip DURATION: 00:21:20.00200 Output #0, matroska, to 'out.mkv': Metadata: encoder : Lavf58.43.100 Stream #0:0(eng): Video: h264 (High) (H264 / 0x34363248), yuv420p(tv, bt709/unknown/unknown, progressive), 720x404 [SAR 254:255 DAR 3048:1717], q=2-31, 23.98 fps, 23.98 tbr, 1k tbn, 1k tbc (default) Metadata: DURATION: 00:21:53.36200 Stream #0:1(eng): Audio: aac (LC) ([255][0][0][0] / 0x00FF), 44100 Hz, stereo, fltp (default) Metadata: DURATION: 00:21:53.43400 Stream #0:2(eng): Subtitle: subrip Metadata: DURATION: 00:21:20.00200 ENCODER : Lavc58.84.100 subrip Stream mapping: Stream #0:0 -> #0:0 (copy) Stream #0:1 -> #0:1 (copy) Stream #0:2 -> #0:2 (copy) Press [q] to stop, [?] for help frame=31487 fps=0.0 q=-1.0 Lsize= 154617kB time=00:21:53.41 bitrate= 964.4kbits/s speed=1.65e+03x video:133441kB audio:20523kB subtitle:15kB other streams:0kB global headers:0kB muxing overhead: 0.414239% ___ 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] yadif mode 1 duplicates first two frames and hence causes lip-sync error
Hello again Carl, First of all, apologies for top-posting. I had read about it and *thought* I'd avoided it last time but clearly I hadn't. Hopefully what I've done this time will have done the trick. I have now simplified my command and tried it with the current ffmpeg git head. More importantly, your advice has helped me to overcome my original issue which I believe stemmed from a misunderstanding of mcdeint and use of the -r filter. Simply removing the "-r 25" resolved the duplicated frame/lip-sync issue but produced 50fps output which is not what I wanted but I guess is what is expected. I had previously thought that mcdeint generates a single output frame from alternate input fields but my tests indicate that mcdeint duplicates every output frame preserving the input field rate - is that correct? In order to preserve the high quality mcdeint deinterlacing whilst outputting 25fps, I added an fps filter into my chain which seems to have had the desired effect without introducing the two duplicated frames at the start and the consequent lip-sync error. Here for the benefit of anyone else who may have experienced the same problem as me and with the hope that you will kindly point out any other errors or misunderstandings on my part, is my new command and console output: ffmpeg -ss 00:00:06.800 -t 00:01:00.000 -i ~/ffmpeg_media/input/input.mxf -filter_complex "[0:v:0]format=pix_fmts=yuv420p[v420]; [v420]yadif=1:0:0,mcdeint=0:0:10[v420deint]; [v420deint]fps=fps=25[v420deint25fps]" -map "[v420deint25fps]" -map 0:a:0 -codec:v libx264 -preset veryslow -tune psnr -profile:v main -x264opts bitrate=15000:vbv-bufsize=15000:nal-hrd=cbr:me=hex:merange=16:rc-lookahead=40:ipratio=1.0:keyint=250:min-keyint=250:scenecut=-1:bframes=3:ref=3 -channel_layout stereo -codec:a aac -b:a 256k ~/ffmpeg_media/output/output_yadifMode1_25fps.mp4 ffmpeg version git-2020-05-12-ffae62d Copyright (c) 2000-2020 the FFmpeg developers built with Apple clang version 11.0.3 (clang-1103.0.32.59) configuration: --prefix=/usr/local/Cellar/ffmpeg/HEAD-ffae62d_3 --enable-shared --enable-pthreads --enable-version3 --enable-avresample --cc=clang --host-cflags=-fno-stack-check --host-ldflags= --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libbluray --enable-libmp3lame --enable-libopus --enable-librubberband --enable-libsnappy --enable-libsrt --enable-libtesseract --enable-libtheora --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-lzma --enable-libfontconfig --enable-libfreetype --enable-frei0r --enable-libass --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librtmp --enable-libspeex --enable-libsoxr --enable-videotoolbox --disable-libjack --disable-indev=jack libavutil 56. 45.100 / 56. 45.100 libavcodec 58. 84.100 / 58. 84.100 libavformat58. 43.100 / 58. 43.100 libavdevice58. 9.103 / 58. 9.103 libavfilter 7. 80.100 / 7. 80.100 libavresample 4. 0. 0 / 4. 0. 0 libswscale 5. 6.101 / 5. 6.101 libswresample 3. 6.100 / 3. 6.100 libpostproc55. 6.100 / 55. 6.100 [mxf @ 0x7ffc72012400] invalid KAGSize 0 - guessing 1 [mxf @ 0x7ffc72012400] invalid KAGSize 0 - guessing 1 [mxf @ 0x7ffc72012400] invalid KAGSize 0 - guessing 1 [mxf @ 0x7ffc72012400] invalid KAGSize 0 - guessing 1 Guessed Channel Layout for Input Stream #0.1 : stereo Input #0, mxf, from '~/ffmpeg_media/input/input.mxf': Metadata: operational_pattern_ul: 060e2b34.04010101.0d010201.01010900 uid : 6166681f-7433-ea11-aae3-b081a1b76e83 generation_uid : 6266681f-7433-ea11-901d-b081a1b76e83 company_name: Omneon Inc. product_name: Omneon Media Subsystem modification_date: 2020-01-10T06:40:42.436000Z product_version : Omneon OmMedia.dll 6.3.0.2 06-22-2016 09:50:28,ex={0,-1},rng={0,-1,0},trimAu,exPre application_platform: Omneon Media Api (windows) product_uid : --0010-8000-050e0b010603 material_package_umid: 0x060A2B340101010501010D231300144E6C66681F7433EA1186C9B081A1B76E83 timecode: 00:00:00:00 Duration: 00:21:08.88, start: 0.00, bitrate: 51553 kb/s Stream #0:0: Video: mpeg2video (Main), yuv420p(tv, top first), 1920x1080 [SAR 1:1 DAR 16:9], 5 kb/s, 25 fps, 25 tbr, 25 tbn, 50 tbc Metadata: file_package_umid: 0x060A2B340101010501010D231300E12F6E66681F7433EA11B6CBB081A1B76E83 Side data: cpb: bitrate max/min/avg: 5000/0/0 buffer size: 9781248 vbv_delay: N/A Stream #0:1: Audio: pcm_s16le, 48000 Hz, stereo, s16, 1536 kb/s Metadata: file_package_umid: 0x060A2B340101010501010D231300E12F6E66681F7433EA11B6CBB081A1B76E83 Stream mapping: Stream #0:0 (mpeg2video) -> format (graph 0) fps (graph 0) -> Stream #0:0 (libx264) Stream #0:1 -> #0:1 (pcm_s16le (native) -> aac (native)) Press [q] to stop, [?] for help [libx264 @ 0x7ffc7284d600] VBV maxrate
Re: [FFmpeg-user] Closed Captions for zone 1 DVD
Hello Carl Eugen, Please note that this case is now closed for me. I found this workaround : ffmpeg -t 180 -i INPUT.mp4 -c copy TMP.mp4 ffmpeg -f lavfi -i "movie=TMP.mp4[out0+subcc]" -map s OUTPUT.srt -v warning When there are no Closed Captions within the first 3 minutes of the video stream, ffmpeg displays a warning : Output file is empty ... The drawback is that this is a very slow procedure. Actually, my initial objective was to remove the Closed Captions from all my movies. I finally found how to do it, in a fast and efficient way, even if the video stream does NOT contain CC : ffmpeg -i INPUT.mp4 -c copy -bsf:v filter_units=remove_types=6 OUTPUT.mp4 Thank you for your help Best Rgds Pascal Message du 08/05/20 22:54 De : "Carl Eugen Hoyos" A : "FFmpeg user questions" Copie à : Objet : Re: [FFmpeg-user] Closed Captions for zone 1 DVD > Am 08.05.2020 um 22:28 schrieb PPRJ01 : > > > Please find attached a short sample file named "2005.mp4". This is the result > of command : > > ffmpeg -ss 99 -to 103 -i 2005.VOB 2005.mp4 Never provide output files (unless specifically requested), please provide an input sample that allows to reproduce. Carl Eugen ___ 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".