Your height h of 104 is wrong.
It should be from the bottom of the subtitles not the bottom of the frame
Also the sum of your y (437) and h (104) is 541.
However the height of your frame is only 536.
Stream #0:0: Video: h264 (Main), yuv420p(tv, bt709, progressive), 1280x536
Closed Thread
Results 61 to 82 of 82
-
it is from bottom of subtitles the height I'm a bit lost when you say frame
you mean exact bottom of screen
so how do I make correct measurements
where you finding height of frame is 536
I just changed height to 88 so 437 + 88 = 525 which is under 541 so why do I still get this error
D:\>"c:\Program Files\ffmpeg-3.3.3-win64-static\bin\ffmpeg" -y -i D:\Annabelle.mkv -vf "delogo=enable='between(n,24,71)'=465:y=437:w=360:h=88, delogo=enable='between(n,96,143)'
=465:y=437:w=360:h=88, delogo=enable='between(n,168,215)'
=465:y=437:w=360:h=88, " -c:a copy "D:\Annabelle.delogo.mkv"
ffmpeg version 3.3.3 Copyright (c) 2000-2017 the FFmpeg developers
built with gcc 7.1.0 (GCC)
configuration: --enable-gpl --enable-version3 --enable-cuda --enable-cuvid --enable-d3d11va --enable-dxva2 --enable-libmfx --enable-nvenc --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzimg --enable-lzma --enable-zlib
libavutil 55. 58.100 / 55. 58.100
libavcodec 57. 89.100 / 57. 89.100
libavformat 57. 71.100 / 57. 71.100
libavdevice 57. 6.100 / 57. 6.100
libavfilter 6. 82.100 / 6. 82.100
libswscale 4. 6.100 / 4. 6.100
libswresample 2. 7.100 / 2. 7.100
libpostproc 54. 5.100 / 54. 5.100
Input #0, matroska,webm, from 'D:\Annabelle.mkv':
Metadata:
title : Annabelle Creation 2017 720p HC HDRip-x264-AC3 5.1-Zi$t-WWRG
encoder : libebml v1.3.4 + libmatroska v1.4.5
creation_time : 2017-09-14T12:17:08.000000Z
Duration: 01:49:28.10, start: 0.000000, bitrate: 802 kb/s
Stream #0:0: Video: h264 (Main), yuv420p(tv, bt709, progressive), 1280x536 [SAR 402:403 DAR 960:403], SAR 254:255 DAR 8128:3417, 23.98 fps, 23.98 tbr, 1k tbn, 180k tbc (default)
Metadata:
BPS : 417026
BPS-eng : 417026
DURATION : 01:49:28.102000000
DURATION-eng : 01:49:28.102000000
NUMBER_OF_FRAMES: 157469
NUMBER_OF_FRAMES-eng: 157469
NUMBER_OF_BYTES : 342384348
NUMBER_OF_BYTES-eng: 342384348
_STATISTICS_WRITING_APP: mkvmerge v13.0.0 ('The Juggler') 64bit
_STATISTICS_WRITING_APP-eng: mkvmerge v13.0.0 ('The Juggler') 64bit
_STATISTICS_WRITING_DATE_UTC: 2017-09-14 12:17:08
_STATISTICS_WRITING_DATE_UTC-eng: 2017-09-14 12:17:08
_STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
_STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
Stream #0:1(eng): Audio: ac3, 48000 Hz, 5.1(side), fltp, 384 kb/s (default)
Metadata:
BPS : 384000
BPS-eng : 384000
DURATION : 01:49:28.032000000
DURATION-eng : 01:49:28.032000000
NUMBER_OF_FRAMES: 205251
NUMBER_OF_FRAMES-eng: 205251
NUMBER_OF_BYTES : 315265536
NUMBER_OF_BYTES-eng: 315265536
_STATISTICS_WRITING_APP: mkvmerge v13.0.0 ('The Juggler') 64bit
_STATISTICS_WRITING_APP-eng: mkvmerge v13.0.0 ('The Juggler') 64bit
_STATISTICS_WRITING_DATE_UTC: 2017-09-14 12:17:08
_STATISTICS_WRITING_DATE_UTC-eng: 2017-09-14 12:17:08
_STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
_STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
Stream mapping:
Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
Stream #0:1 -> #0:1 (copy)
Press [q] to stop, [?] for help
[Parsed_delogo_0 @ 0000000002777c00] Note: default band value was changed from 4 to 1.
[Parsed_delogo_1 @ 00000000007269a0] Note: default band value was changed from 4 to 1.
[Parsed_delogo_2 @ 00000000006fed80] Note: default band value was changed from 4 to 1.
[AVFilterGraph @ 0000000000669a00] No such filter: ''
Error reinitializing filters!
Failed to inject frame into filter network: Invalid argument
Error while processing the decoded data for stream #0:0
Conversion failed!
D:\>pause
Press any key to continue . . .Last edited by natty; 16th Oct 2017 at 10:18.
-
Why don't you just read the documentation for the delogo filter? It clearly spells out the parameters:
http://ffmpeg.org/ffmpeg-filters.html#delogo
The coordinates of the of the delogo box are the top left corner of the box, followed by the width and height of the box. No part of the box may extend outside the frame.
-
@natty...
Hi thank you so much for your help. in that 1st picture I see you have 4 rulers on picture, so basicly I would have to measure 1: left side of screen to left side of subtitle
2: top of subtitle to top of screen. 3: width of ST , and 4: height
so is that x y w h so batch file would say in accordance to your picture
You can measure with just one ruler and do the math as shown below. 200 is the X point where you wish to start the blur upper left and it extend for 380 pixels to 580. Then just rotate the ruler and do the same for Y measurement. so X would = 200, W would = 380 and then Y and H would be from vertical measurement.
ATTN Number 280 should be 580, duh!
I dont quite understand about that ffplay, would i have to make another bat file for that
this is a bit confusing for me as like i said earlier I am useless at all this but willing to learn
btw I did notice when I played my converted movie back where i blurred subtitles. it was just a single line blurred, as it showed a ST above where i blurred so it seems you have to look for the biggest ST like maybe 3 lines
I download ffmpeg from https://ffmpeg.zeranoe.com/builds/ and in the bin folder there are ffmpeg, ffplay and ffprobe. FFplay allows testing your ffmpeg script without using output filters or filename. That is whyCode:"c:\Program Files\ffmpeg-3.3.3-win64-static\bin\ffmpeg" -i "%1" -vf delogo=x=425:y=415:w=449:h=120 -c:a aac -b:a 192k "%~dpn1.delogo.mkv"
Code:"ffplay" -i %1 -vf delogo=x=340:y=400:w=230:h=30:show=1
would i have to make another bat file
Regarding the ST... you will have to make your blur box big enough to cover all of the subtitle, including possible multiple lines, or make separate areas in your ffmpeg script:
-
I export a frame of the video to an image editor (an old version of PhotoImpact) that has the ability to mark a rectangle show show the coordinates:
Note the status bar at the bottom of the image shows the x and y coordinates of the top left and bottom right of the box, and the width/height of the box.
-
Upload a sample video, a sample frame that you exported, the coordinates you got, and the ffmpeg command line. We'll tell you where you went wrong.
-
In case it helps, this is how an image or video coordinates are laid out. I just took an image of your original post and have shown how you get the coordinates of that image. Your video may be another size but the layout and measurements are done the same. Using an image editor is an excellent way to get the coordinates but if you play a video, pause and use the ruler, this is how the X/Y/W/H are derived from upper left to lower right.
-
Hi thanks for this but I still get errors. its doing my head in now. I have made a short clip, which is still uploading to drop box, but taking ages to upload, mind you it is 371MB so probably thats why, so once its uploaded I will place link here. I paused the video using VLC player at 00:10 I used the rulers 4 in all. also used Irfanview to draw a oblong box around subtitle. but as you can see the measurements are completely different to the Rulers, so am baffled by all that. in this snapshot below in the yellow oblong box which is x and y numbers, as i assume its 1st number is x 2nd number is y then w and h
this is what i did with rulers and also as you can see I made a box around subtitles with Irfanview, but both methods different
this is box i made around subtitle with Irfanview
VLC player measurements
this is the bat file I used
"c:\Program Files\ffmpeg-3.3.3-win64-static\bin\ffmpeg" -y -i %1 -vf ^
"delogo=enable='between(n,24,71)'=460:y=434:w=382:h=87, ^
delogo=enable='between(n,96,143)'=460:y=434:w=382:h=87, ^
delogo=enable='between(n,168,215)'=460:y=434:w=382:h=87, ^
" -c:a copy "%~dpn1.delogo.mkv"how1
pause
at last here is movie clip I used
https://www.dropbox.com/s/jt7exh0o27l3164/Annabelletestclip.avi?dl=0Last edited by natty; 17th Oct 2017 at 05:54.
-
What's the error message you get with that command line? The forum has messed up the command line (use code boxes, not quote boxes, or turn on the "Disable smilies in text" option) but I think your problem is the comma at the end of the third delogo=... line. That makes ffmpeg think there is another filter coming. And, of course, the frame numbers are totally inappropriate for this video.
-
here is code for error
Code:E:\>"c:\Program Files\ffmpeg-3.3.3-win64-static\bin\ffmpeg" -y -i E:\Annabelletestclip.avi -vf "delogo=enable='between(n,24,71)':x=449:y=428:w=392:h=98, delogo=enable='between(n,96,143)':x=449:y=428:w=392:h=98, delogo=enable='between(n,168,215)':x=449:y=428:w=392:h=98, " -c:a copy "E:\Annabelletestclip.delogo.mkv":show1 ffmpeg version 3.3.3 Copyright (c) 2000-2017 the FFmpeg developers built with gcc 7.1.0 (GCC) configuration: --enable-gpl --enable-version3 --enable-cuda --enable-cuvid --enable-d3d11va --enable-dxva2 --enable-libmfx --enable-nvenc --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzimg --enable-lzma --enable-zlib libavutil 55. 58.100 / 55. 58.100 libavcodec 57. 89.100 / 57. 89.100 libavformat 57. 71.100 / 57. 71.100 libavdevice 57. 6.100 / 57. 6.100 libavfilter 6. 82.100 / 6. 82.100 libswscale 4. 6.100 / 4. 6.100 libswresample 2. 7.100 / 2. 7.100 libpostproc 54. 5.100 / 54. 5.100 Guessed Channel Layout for Input Stream #0.1 : stereo Input #0, avi, from 'E:\Annabelletestclip.avi': Duration: 00:08:06.53, start: 0.000000, bitrate: 6405 kb/s Stream #0:0: Video: mpeg4 (Advanced Simple Profile) (XVID / 0x44495658), yuv420p, 1280x536 [SAR 1:1 DAR 160:67], 4860 kb/s, 23.98 fps, 23.98 tbr, 23.98 tbn, 23.98 tbc Stream #0:1: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 48000 Hz, stereo, s16, 1536 kb/s [NULL @ 0000000000e69c20] Unable to find a suitable output format for 'E:\Annabelletestclip.delogo.mkv:show1' E:\Annabelletestclip.delogo.mkv:show1: Invalid argument E:\>pause Press any key to continue . . .
this is bat file
Code:"c:\Program Files\ffmpeg-3.3.3-win64-static\bin\ffmpeg" -y -i %1 -vf ^ "delogo=enable='between(n,24,71)':x=449:y=428:w=392:h=98, ^ delogo=enable='between(n,96,143)':x=449:y=428:w=392:h=98, ^ delogo=enable='between(n,168,215)':x=449:y=428:w=392:h=98, ^ " -c:a copy "%~dpn1.delogo.mkv":show1 pause
just wish there was a easy way
now I get Unable to find a suitable output format. this is doing my head in nowLast edited by natty; 17th Oct 2017 at 09:56.
-
I already told you there should not be a comma near the end of the last delogo line. And there should not be that extra :show1 after the output filename?
If you stop adding extra junk to the batch files you wouldn't be having these problems. I put things in code boxes so you can copy/paste exactly.
-
I think you are wrong saying stop adding junk to the batch files. I never made those batch files at all. someone here did, cant remember who.
I never made any of these bat files.
so you saying it should be like this
Code:" c:\Program Files\ffmpeg-3.3.3-win64-static\bin\ffmpeg" -y -i %1 -vf ^ "delogo=enable='between(n,24,71)':x=449:y=428:w=392:h=98, ^ delogo=enable='between(n,96,143)':x=449:y=428:w=392:h=98, ^ delogo=enable='between(n,168,215)':x=449:y=428:w=392:h=98 ^ " -c:a copy "%~dpn1.delogo.mkv" pause
-
My post #55 does not have any of that extra crap.
https://forum.videohelp.com/threads/385336-subtitle-blurring/page2#post2498965
It's not until later in your posts 74 and 76 that the extra junk shows up:
https://forum.videohelp.com/threads/385336-subtitle-blurring/page3#post2499181
https://forum.videohelp.com/threads/385336-subtitle-blurring/page3#post2499200
Yes you did. I didn't post a batch file, I posted text in a code box. So you must have made the batch file from that text. And somewhere along the line added the crap.Last edited by jagabo; 17th Oct 2017 at 11:10.
-
Ok yes you are correct, I did add code to bat file wrong please accept my apologies, its just that i get so confused, with all this. and it seems by that I have added wrong things
anyway I just removed :show 1 at end also removed the extra commaCode:,
this is new bat file i used
Code:"c:\Program Files\ffmpeg-3.3.3-win64-static\bin\ffmpeg" -y -i %1 -vf ^ "delogo=enable='between(n,24,71)':x=449:y=428:w=392:h=98, ^ delogo=enable='between(n,96,143)':x=449:y=428:w=392:h=98, ^ delogo=enable='between(n,168,215)':x=449:y=428:w=392:h=98 ^ " -c:a copy "%~dpn1.delogo.mkv" pause
I think its best if I pack all this in as its been going on for quite a while now. what ever I do it comes back with errors. I have used both methods, to make a oblong box around subtitles, used the coordinates from Irfanview. also used rulers but measurements are not same as Irfanview so I give up now
I just like to thank all here who have helped me, believe me its most appreciated. its just a pity its not working right for me but i cant see where I go wrong most times. I do as asked yes I have made mistakes etc. but all i wanted was a script to blur subtitles, never knew it would be so hardLast edited by natty; 17th Oct 2017 at 11:49.
-
Of course it didn't remove all the subtitles. The whole point of post #55 was to show an example of how you could remove individual substitles. The 'between(n,24,71)' text means apply the particular filter only to frames 24 through 71. And it wasn't made for your latest video but for videobruger's "before.mkv" sample video in post #10. The three frame ranges correspond to the first three subs in that video.
Similar Threads
-
Recording video without blurring using Canon 550d
By Norma17 in forum Newbie / General discussionsReplies: 3Last Post: 10th Mar 2017, 12:55 -
Showing subtitle in Reverse Order | Arabic Subtitle - Samsung LED 49K6965
By ashkan_vpm2 in forum SubtitleReplies: 2Last Post: 10th Feb 2017, 01:51 -
Convert pac subtitle to something that I can open in Subtitle workshop
By Tiger_1982 in forum SubtitleReplies: 11Last Post: 15th Aug 2015, 20:49 -
Turning on subtitles is blurring the picture
By killerteengohan in forum Software PlayingReplies: 1Last Post: 25th Jul 2015, 20:26 -
Blurring Effect
By rmccam in forum EditingReplies: 8Last Post: 29th Jan 2015, 14:35