Hi, please , i ask this query as i want to do some video edit on a video.
Now i have taken a snapshot of a video.
Now, i have to know the position of starting of a rectangle width and height to issue a ffmpeg command
For that , i need the position of start of upper part of the video
how to know the pixel position as it is very difficult to find
i have tried microsoft pic manager, it helps in resizing the picture.
i will try to know these things from an editior
But is there any easy way of knowing the pixel position.
The deduction of cropped portion in picture manager would cut the left and right most part of the video as well.
experts please
+ Reply to Thread
Results 1 to 30 of 30
-
-
You can use a free image editor, such as gimp . When you mouse over a position, it will read out the x,y coordinates in the status bar
Or do the crop in a program like vdub2 visually, then use those crop values to calculate the coordinates for ffmpeg since you know the width, height of the original video
eg. top left coordinate would be
(x = width - left crop , y = height - top crop)
Or avspmod for avisynth has mouse over x,y coordinates as well, and/or perform the crop to learn the values -
-
Hi, do not take literally . i think all who answers my query are experts . i do not mean the other experts
-
Hi, poisoned , thanks for your gist formula.
Now i know how to fix it in formula
Thanks . Will check it. -
Hi, poisoned..
if supppose , the picture size is 540x360,
and if 540-93, then shall i take x as 447
like, 360-90, hen i take the y as 270
and supply the full heifht and width of the picture
Should we take , the pixel count from top of the image or bottom of the image,
i will try , but want you to give an example , by taking in to ac**** picture size 540x360 -
The problem with most common types of video, is they are subsampled (4:2:0) , this means you often cannot use odd numbers such as 447 for some types of filters. If you took a screenshot it's different, because it has been converted to RGB (not subsampled) . But you might not be able to apply those numbers to the original video
The "formula" might be wrong , it was late and I was just typing . Now that I think about it, the top left corner should be those crop values x, y coordinates
But which ffmpeg filter are you using ? There are expressions that can auto calculate in ffmpeg based on the video characteristics, such as width etc... It helps to work through a concrete exampleLast edited by poisondeathray; 13th Oct 2019 at 09:55.
-
Hi, Poisoned , did you see my other thread. Jaga has given a formula based on the picture i sent, for which i want to delogo.
His formula works, but gives me 0 bytes output.
There are some video converters, which help in cropping, but it entirely crops the whole bootom portion making the video smaller and loosing all bottom scenes.
So, i am trying ffmpeg formula to delogo
shall i wait for x,y, w, h -
no I did not see the other thread, but I see it's jagabo and I' m sure he's got you covered
-
Hi, He is giving me cllues, but executing it in my side, the resultant video is 0 bytes.I thought of opening a separae thread, as i do not know, the position of co oridnates and also ,if it has to be found from top or bottom
when i move curesor on my image, a frame by snapshot, it shows the same points horizontally, as it is it's width. -
Below is a screenshot where some hardcoded subtitles are marked in IrfanView.
[Attachment 50526 - Click to enlarge]
In the top you'll see the coordinate of the left upper corner of the rectangle as is used in ffmpeg delogo. Also the width and heigth of the rectangle is shown as used in ffmpeg delogo. So using the command
Code:ffmpeg -i Hcclip-1.avi -vf "delogo=x=480:y=914:w=946:h=86" -an delogo.mkv
[Attachment 50527 - Click to enlarge] -
hi, videobruger,
Thanks for the reply, but the expected output is still not achieved by me
the formula with the irwan view is as below in my case
ffmpeg -i outputone.mp4 -vf "delogo=x=40:y=278:w=415:h=82" -an delogo.mp4
the output file has zero bytes.
is there any missing on my part
i had issued the command at the bin folder, where my exe resides.
the path: C: program files\ffmpeg\bin
So, i opened a command prompt, and went to bin to issue the command
please correct it, if anything is wrong on my side
as you say, irfanview, shows xyhw and i had changed my input file, which also is placed on the bin folder -
Hi, is the file path to ffmpeg correctly included in path
Then all the exe should be executed
C:\Windows>echo %path%
C:\Windows;C:\Windows\System32;C:\Windows\System32 \Wbem;C:\Windows\System32\Wind
owsPowerShell\v1.0;C:\Program Files\PATHS;d:\;C:\Program Files\PuTTY\;c:\program
files\kitty;C:\Program Files\Common Files\Adobe\AGL;Crogramfiles\videolan\vlc
;c:\program files\ffmpeg\bin\ffmpeg.exe
C:\Windows> -
No.
Change
c:\program files\ffmpeg\bin\ffmpeg.exe
to
c:\program files\ffmpeg\bin
Test it by opening a command prompt somewhere and type ffmpeg.
You should get this
[Attachment 50543 - Click to enlarge]Last edited by videobruger; 15th Oct 2019 at 00:45. Reason: Added image
-
HI, i am getting the screen, but on execution, i get some errors. . i have taken the four values as shown by irvan view and also just substituTed the four values in the same way as you have shown. but the result is still not achieving.
Selection points are shown in the same sequences in the formula, is there any missing on my part,
i have already given the formula for yur perusal
the eror message is logo area outside the frame
C:\Program Files\ffmpeg\bin>ffmpeg -i avl.mp4 -vf "delogo=x=43:y=270:w=396:h=90"
-an delogo.mp4
ffmpeg version N-95160-g9fdc2c7bc4 Copyright (c) 2000-2019 the FFmpeg developers
built with gcc 9.2.1 (GCC) 20190918
configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfi
g --enable-gnutls --enable-iconv --enable-libass --enable-libdav1d --enable-libb
luray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enab
le-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --e
nable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable
-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 -
-enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enab
le-libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --en
able-libspeex --enable-libxvid --enable-libaom --enable-libmfx --enable-ffnvcode
c --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 -
-enable-avisynth --enable-libopenmpt --enable-amf
libavutil 56. 35.100 / 56. 35.100
libavcodec 58. 59.101 / 58. 59.101
libavformat 58. 33.100 / 58. 33.100
libavdevice 58. 9.100 / 58. 9.100
libavfilter 7. 59.100 / 7. 59.100
libswscale 5. 6.100 / 5. 6.100
libswresample 3. 6.100 / 3. 6.100
libpostproc 55. 6.100 / 55. 6.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'avl.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf58.33.100
Duration: 01:24:18.47, start: 0.000000, bitrate: 423 kb/s
Stream #0:0(und): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yu
v420p, 540x360 [SAR 1:1 DAR 3:2], 289 kb/s, 29 fps, 29 tbr, 14848 tbn, 58 tbc (d
efault)
Metadata:
handler_name : VideoHandler
Stream #0:1(und): Audio: mp3 (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 12
8 kb/s (default)
Metadata:
handler_name : IsoMedia File Produced by Google, 5-11-2011
File 'delogo.mp4' already exists. Overwrite? [y/N] y
Stream mapping:
Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
Press [q] to stop, [?] for help
[delogo @ 00eaad80] Logo area is outside of the frame.
[Parsed_delogo_0 @ 00eaacc0] Failed to configure input pad on Parsed_delogo_0
Error reinitializing filters!
Failed to inject frame into filter network: Invalid argument
Error while processing the decoded data for stream #0:0
Conversion failed!
C:\Program Files\ffmpeg\bin>
are there any wrong input in the four x,y, w, hLast edited by jraju; 15th Oct 2019 at 02:38. Reason: add more logs
-
Hi, video bruger,
It seems working. The process is on and i will report ba
So the hck.
i went to the bin folder and then execute your command
So h is the problematic variable.
kindly explain, how you got the error message decoded that h is out of logo area
So, can we take , that by reducing all variables that are shown in irfanview, would correctly execute the command
one more sub query:
how to know the inbuilt player of my samsung tv.
the manual list , the container support formats,
when i play some files the sound is excellent, while playing some, the sound is low and have to slide to maximum
Thanks for giving me a solution.
now, i will try to hardencode english subtitles to the movie
can i use the same co ordinates and encode the same video with eng subtitles
what is the code i should use to insert a srt file in the same area
i have an srt file, which i have chosen , when playing with vlc media player
for viewing on tv, i have to hardcode the subtitles
kindly supply the formula in ffmpeg -
kindly explain, how you got the error message decoded that h is out of logo area
that by reducing all variables that are shown in irfanview, would correctly execute the command
when i play some files the sound is excellent, while playing some, the sound is low and have to slide to maximum
i have to hardcode the subtitles
https://trac.ffmpeg.org/wiki/HowToBurnSubtitlesIntoVideo -
Hi, jaga, and video burger thanks for your clarification.
I am new to the pixel and so i ask, how to plot those.
irfan view gives all the four variables by just marking our logo area.
the video was now without logo, and also without audio.
i checked in vlc codec, and only video codec was present,
should i add anything in the formula
Thought , that there is a meaning in this value , 00eaad80]
valuable help i got in this fourm.
why audio went out of video -
The -an removes the audio,
Use
Code:ffmpeg -i Hcclip-1.avi -vf "delogo=x=480:y=914:w=946:h=86" -c:a copy delogo.mkv
-
Hi, thanks , ass format include conversion etc.
if suppose, i just use the subtitle command, would it auto, encode the subtitles at the bottom
if that is , then i will use this formula
by just modyfying my file names
ffmpeg -i video.avi -vf subtitles=subtitle.srt out.avi
let me know -
Just add the subtitles filter after the delogo filter:
Code:-vf "delogo=x=480:y=914:w=946:h=86,subtitles=subtitle.srt"
-
Hi, Ok, jaga,
i do not know, that i should raise a separate topic or continue in this thread, if moderator permits.
When i download subtitles using vlc media player , through their vl , it downloads srt file for the movie.
But , it also add something kind of adjustment in the beginning of the srt files.
the video timing is 1:24:18 seconds whereas SRt file timings ends iwith 1:24:53, i have a github application html to adust the first audio with first line in the time frame with the srt with it. But since i do not know the language of the original film, i could not decipher if all are in place with other time lines in the srt files.
Is there anything that fixes this,
There is also a hashtag code option of downloading the movie subtitltles, how to get the code
if this has to be raised in subtitle title of the fourm, i will raise it there
i heard that srt time lines are to be in sync with the audio of the movie, how to fix this
i could match the first voice with the first line, but not others -
Is there anything that fixes this
https://forum.videohelp.com/threads/378410-Synchronize-one-part-of-a-subtitle-with-another-one -
Hi video burger, thanks for that language sync.
what i meant, is that i have a english srt file, I want that to sync with my first audio voice . Your link , shows, two languages sync in subtitles. what i want is, sync with audio of first line in different language video, say german with english srt first line.Sure , i got subtitle edit software.
When i open the vlc to download srt files, it shows only english subtitles srt from opensubtitle org -
Hi, video burger, quite interesting link. So, i have gone to the internet select fresh subtitles and tried to sync point as you mentioned in the lilnk. That is very nice of you. i do not know that it existed in subtitle edit.
I just select the first line in both the files , applied sync.
i just checked some lines and then go to the last page, where i find all are matching with lilne number . As i do not know french, i just tried my maximum best.
Do i need to , select line by page by page or could randomly select as per my knowledge. i had done it.
This part i have done as per your link instructions.
how to set my audio sync with english , that is the problem. i will see , but if you give me a clue, i will be happy to first sync subtitle with audio, and then attempt to hardcode the subtitle
Similar Threads
-
Reading 4:2:2 Pixels
By chris319 in forum ProgrammingReplies: 66Last Post: 23rd Jan 2019, 18:56 -
Subtitles out of position
By charrua1 in forum Newbie / General discussionsReplies: 9Last Post: 5th Feb 2018, 10:22 -
Position some subs in a BD
By Patapin in forum SubtitleReplies: 9Last Post: 14th Nov 2017, 09:16 -
Need help with sub-position
By mrgiannis in forum Video ConversionReplies: 4Last Post: 30th Jan 2016, 04:59 -
Block of pixels!
By alkoon in forum Capturing and VCRReplies: 3Last Post: 12th Aug 2015, 21:22