VideoHelp Forum

Our website is made possible by displaying online advertisements to our visitors. Consider supporting us by disable your adblocker or Try ConvertXtoDVD and convert all your movies to DVD. Free trial ! :)
+ Reply to Thread
Page 1 of 2
1 2 LastLast
Results 1 to 30 of 45
Thread
  1. Member
    Join Date
    Mar 2013
    Location
    India
    Search Comp PM
    Hi, i used ffmpeg to quicky convert audio formt only in a video.
    But, after conversion, i coud not find the location of converted file, as i could not find it in the source file folder.
    any one has idea about it
    could you say the formula for permanently removing the hard coded subtitles in a video in ffmpeg
    ffmpeg......example would be helpful
    Quote Quote  
  2. It should be in the same folder as ffmpeg. (The one which you CD to in Command Prompt)
    Check for the output name used in your ffmpeg command.

    AFAIK ffmpeg cannot be used to remove hard-coded subs.
    You can use it to burn a blank sub box over the existing subs obscuring them.
    You could also probably use it to crop the screen size removing the subs (with some of the picture!!)
    I'm pretty certain it can't simply remove the hardcoded subs. Although, I'd be pleased to hear otherwise.
    Quote Quote  
  3. You can always use a full path for the output file to put it exactly where you want it.

    Some people prefer to use a in-filled box with the delogo filter, instead of a black box to cover the subs, or cropping to remove them:

    Code:
    "G:\Program Files\ffmpeg\bin\ffmpeg.exe" -i %1  -vf delogo=x=251:y=650:w=800:h=50 -c:a aac -b:a 192k %1.delogo.mkv
    X and Y are the top left coordinates of the box that's infilled. W and H are the width and height of the box. The box should be big enough to cover the widest and tallest subs. Personally, I find all the results of all these sub removal techniques to be more distracting than the subs.
    Quote Quote  
  4. Member
    Join Date
    Mar 2013
    Location
    India
    Search Comp PM
    Hi, jagabo
    Your quote:in-filled box with the delogo filter
    , which software has this feature, i mean xy top left, and wh parameters. Trial does not cast much things to loose
    should i run your code or should i copy with my files But i just use ffmpeg command to get the output.
    which is the default location of the output file, this is the query
    Normally a program copies output , in a folder of its existence or ask us to check.
    there shoud be a default folder where the output files would reside.
    Hi, diag,
    i could not find the output in the same folder.
    Quote Quote  
  5. Originally Posted by jraju View Post
    Hi, jagabo
    Your quote:in-filled box with the delogo filter
    , which software has this feature, i mean xy top left, and wh parameters. Trial does not cast much things to loose
    should i run your code or should i copy with my files But i just use ffmpeg command to get the output.
    which is the default location of the output file, this is the query
    Normally a program copies output , in a folder of its existence or ask us to check.
    there shoud be a default folder where the output files would reside.
    Hi, diag,
    i could not find the output in the same folder.
    This is OS dependent behaviour and ffmpeg is OS agnostic.
    Quote Quote  
  6. Member
    Join Date
    Mar 2013
    Location
    India
    Search Comp PM
    Hi, i am having windows 7 ultimate. Could you say the output folder now
    Quote Quote  
  7. It should be in the same folder as ffmpeg.

    Are you sure you are producing an output file?
    What code are you using?
    Quote Quote  
  8. Member
    Join Date
    Mar 2013
    Location
    India
    Search Comp PM
    Hi, this is the formula i got it from net example
    ffmpeg -i input.mp4 -acodec mp3 -vcodec output.mp4
    is this correct, i think there is no error in formula
    Quote Quote  
  9. I haven't tried your code but I think it needs a copy command.

    I assume you're trying to map a new audio track into an existing mp4. Use this;
    Code:
    ffmpeg -i input.mp4 -i new.mp3 -c copy -map 0:v:0 -map 1:a:0 output.mp4
    If you're just trying to extract the audio track from the mp4, use this;
    Code:
    ffmpeg -i input.mp4 -vn -acodec copy output.aac
    Quote Quote  
  10. Originally Posted by jraju View Post
    Hi, jagabo
    Your quote:in-filled box with the delogo filter
    , which software has this feature, i mean xy top left, and wh parameters.
    The delogo filter is built into ffmpeg.

    Originally Posted by jraju View Post
    should i run your code or should i copy with my files But i just use ffmpeg command to get the output.
    The command line as written is for a batch file (for Windows). You can drag/drop a video on the batch file and a new video will be created in the same folder as the source. You need to modify the path to ffmpeg.exe to reflect where it is installed on your computer. And you need to modify the x, y, w, h parameters to match where the subs appear in your video. Export a frame of the source video and use an image editor to get the coordinates.

    Here's a short video with the logo removed with that batch file:
    Image Attached Files
    Last edited by jagabo; 5th Oct 2019 at 10:35.
    Quote Quote  
  11. Originally Posted by jraju View Post
    Hi, i am having windows 7 ultimate. Could you say the output folder now
    Then follow discussion like this: https://stackoverflow.com/questions/4419868/what-is-the-current-directory-in-a-batch-file#4420078
    This is very good site dedicated for answering questions like yours: https://ss64.com/nt/syntax-variables.html
    Also i highly recommends Rob van der Woude site:https://www.robvanderwoude.com/ - full of precious knowledge!
    Quote Quote  
  12. Member
    Join Date
    Mar 2013
    Location
    India
    Search Comp PM
    Hi, diag,
    after much search, i found the output file
    in c:\user\username\appdata\local\virdual drive\program files\ffmpeg\bin
    It has taken lot oftrials to find this path
    i already enabled path variables to this ffmpeg, but somehow it does not work.
    so i copied the file itself to the bin driectory , in the extracted folder.
    mere
    ffmpeg -i input.mp4 -acodec mp3 output.mp4 aso processed , but it takes much time and the speed is 2.5
    whereas ,
    ffmpeg -i input.mp4 -acodec mp3 -vcodec copy output.mp4
    this formula the audio change is effected within a few minutes at speed of 32.7 mear
    what is the difference
    this formula i copied from net surfing
    Now i found out the output folder, this trick may be useful for some one who has my problem in locating the output file
    One more query:
    the changed audio codec is mpeg audio 1/2(mpga) and not mp3
    Is the conversion would support a kind of mp3 format, which is supported by my tv for playing
    my tv does not support m4a audio,
    i want answers to two queries raised here
    thanks for all for helping
    Quote Quote  
  13. Member
    Join Date
    Mar 2013
    Location
    India
    Search Comp PM
    Hi, diag, it is very interesting to know your formula contains some new things, could you kindly explain
    my attempt is to just change audio codec to mp3 in a mp4 file .
    Will your code work. what is the difference from extracting mp3 and creating a new mp3
    i just want to change ithe audio format to mp3
    i am not a programmer , so i ask this query
    Hi, jaga,
    will try your batch file and report back.
    how to create a box to hide the old one with black and insert my srt files scripts
    i amnew to this forum and also to ffmpeg
    expecting replies
    Quote Quote  
  14. Member
    Join Date
    Mar 2013
    Location
    India
    Search Comp PM
    Hi, jaga, i created a batch file with the same code , but i do not know how to drop and drop the mp4 file to this batch file.
    the path is as you have written, but i am having the source file in the bin directory, and when i try to drag, it just opens with the swource file.
    should i wait till the video runs and then see the same folder for new file
    hope to get clues and replies diag and jaga
    Quote Quote  
  15. Member
    Join Date
    Mar 2013
    Location
    India
    Search Comp PM
    Hi, Jaga,
    i just saved the code as txt, and that was the mistake
    when i changed the same to bat, and drag and drop,
    a progressing glass runs and my video file size is 225 mb
    hope to get the output , after an hour or so
    this is the progrogress
    Quote Quote  
  16. my attempt is to just change audio codec to mp3 in a mp4 file .
    Yeah, I misunderstood your question. I wrongly assumed you just wanted to map a new audio stream onto an existing mp4.
    Ignore the copy command, it just copies the audio stream into a new mp4 container.
    That's why it was quick.

    Your original code should be correct. It re-encodes the audio to mp3 format.
    The re-encoding can take a long time depending on the size of the file.
    Quote Quote  
  17. Originally Posted by jraju View Post
    Hi, Jaga,
    i just saved the code as txt, and that was the mistake
    when i changed the same to bat, and drag and drop,
    a progressing glass runs and my video file size is 225 mb
    hope to get the output , after an hour or so
    this is the progrogress
    Did you change the x, y, w, and h parameters?

    Put the batch file somewhere that's easy to access -- like on your Desktop.
    Quote Quote  
  18. Originally Posted by jraju View Post
    ffmpeg -i input.mp4 -acodec mp3 output.mp4 aso processed , but it takes much time and the speed is 2.5
    whereas ,
    ffmpeg -i input.mp4 -acodec mp3 -vcodec copy output.mp4
    this formula the audio change is effected within a few minutes at speed of 32.7 mear
    what is the difference
    The first command line decompresses and recompresses the video (this takes a long time and degrades the video) as well as the audio. The second command line copies the compressed audio from the source file to the output file.
    Quote Quote  
  19. Member
    Join Date
    Mar 2013
    Location
    India
    Search Comp PM
    Hi, Jaga
    Thanks for your clarification on the slowness of command
    Please kindly say, why it is compressing to mpeg audio layer 1/2 instead of mp3.
    please say, if both are same.
    Will i get lower audio quality if it converts to mpga, and i also do not know, if my tv supports it, as there was nothing like supported format in the TV manual
    Next coming to the main issue,
    when i drag and drop , it processed , but opens amachine language file, which when closes, vanished in to
    Really i do not know the trick, to give or change the batch files.kindly say, how to go about it.
    i already informed you that i am not a programmer.
    i saw your sample video
    where is the source file in your batch script
    shere is the outpuyt is saved
    why it is shown as an opened mp4 file in notebook text form
    please reply quick\
    the path i gave , please take the correct path as virtualstore instead of virtual drive
    Quote Quote  
  20. Originally Posted by jraju View Post
    Hi, Jaga
    Thanks for your clarification on the slowness of command
    Please kindly say, why it is compressing to mpeg audio layer 1/2 instead of mp3.
    Are you sure it's not MP3? What program are you using to check the new file? When I use that exact command line I get mp3. From MediaInfo:

    Code:
    Audio
    ID                                       : 2
    Format                                   : MPEG Audio
    Format version                           : Version 1
    Format profile                           : Layer 3
    Note that MP3 stands for MPEG Layer 3. It is part of the MPEG 2 specification.

    Originally Posted by jraju View Post
    Will i get lower audio quality if it converts to mpga,
    The default bitrate with mp3 encoding in ffmpeg is 128 kbps. With mp2 encoding it's 384 kbps. mp2 is probably better quality than mp3.

    Originally Posted by jraju View Post
    and i also do not know, if my tv supports it, as there was nothing like supported format in the TV manual
    The TV probably supports it. But it's easy enough to test.

    Originally Posted by jraju View Post
    Next coming to the main issue,
    when i drag and drop , it processed , but opens amachine language file, which when closes, vanished in to
    Really i do not know the trick, to give or change the batch files.kindly say, how to go about it.
    Add a second line to the batch file with "pause":

    Code:
    "G:\Program Files\ffmpeg\bin\ffmpeg.exe" -i %1  -vf delogo=x=251:y=650:w=800:h=50 -c:a aac -b:a 192k %1.delogo.mkv
    pause
    That way the CMD window will remain open until you press a key (some errors may cause the window to close automatically). Look for any error messages while the window is still open. Did you change the path to ffmpeg,exe? Bad coordinates for the delogo filter will also cause the program to abort. The box must not extend outside the video frame.

    Image
    [Attachment 50435 - Click to enlarge]


    Originally Posted by jraju View Post
    where is the source file in your batch script
    Anywhere.

    Originally Posted by jraju View Post
    shere is the outpuyt is saved
    In the same folder as the source file.

    Originally Posted by jraju View Post
    why it is shown as an opened mp4 file in notebook text form
    I don't understand the question.

    Originally Posted by jraju View Post
    the path i gave , please take the correct path as virtualstore instead of virtual drive
    Is this what you mean?
    Code:
    "c:\user\username\appdata\local\virtualstore\program files\ffmpeg\bin\ffmpeg.exe" -i %1  -vf delogo=x=251:y=650:w=800:h=50 -c:a aac -b:a 192k %1.delogo.mkv
    pause
    Last edited by jagabo; 9th Oct 2019 at 08:27.
    Quote Quote  
  21. Member
    Join Date
    Mar 2013
    Location
    India
    Search Comp PM
    Hi, for your query on the program i use is , just ffmpeg command line
    Please say, that the audio codec will be based on the video format?
    As i copy the video file , in to the same folder where ffmpeg.exe resides. That is in the bin folder of ffmpeg in program files subfolder
    So, there is no chance of error
    please give me , how to go about giving width, height etc, if the subtitle position is , just in the middle of the botoom most of the video as usual in any video.
    I will try with pause command.
    Is it correct, that if i just drag, the cursor becomes a glass of progress, and had to wait till it closes. When it closes, i found a mahine text file,with mp4 extension stay opened and when i just closed it, it closed.
    Thanks for all learning from this forum
    expecting your reply
    Regarding the virualstore errata, i have given the path of the output file in my window 7 pc. i iyped virtualstore as virtual drive inadvertantly
    Last edited by jraju; 9th Oct 2019 at 08:24.
    Quote Quote  
  22. Member
    Join Date
    Mar 2013
    Location
    India
    Search Comp PM
    Hi, i am enclosing the notepad file , as processed by the bat file
    May be i am wronly given the height and width
    any how, i am enclosing for your analysis , hi, jaga
    Hi,the file size is 1.9 mb, so , i just cropped it to show you a kind of output
    Image Attached Images  
    Last edited by jraju; 9th Oct 2019 at 09:03.
    Quote Quote  
  23. Originally Posted by jraju View Post
    please give me , how to go about giving width, height etc, if the subtitle position is , just in the middle of the botoom most of the video as usual in any video.
    I gave you a sample image that shows how to get the coordinates. Export a frame from your video, open it in an image editor, use the editors tools to determine the x, y, w, h parameters.

    Originally Posted by jraju View Post
    Is it correct, that if i just drag, the cursor becomes a glass of progress, and had to wait till it closes. When it closes, i found a mahine text file,with mp4 extension stay opened and when i just closed it, it closed.
    When you drag a file onto the batch file a command line window should open with the encoding status. When the encoding is done the window will close. If you put "pause" at the end of the batch script the window will stay open and you will see the message "Press any key to continue..." The window will close when you press a key (the window must have keyboard focus). When the encoding is done you should find an mkv file in the same folder, with the same base name, as the source video.
    Quote Quote  
  24. Member
    Join Date
    Mar 2013
    Location
    India
    Search Comp PM
    Hi, hmm
    jaga
    when i drag the file in to the batch file, no cmd prompt opens, instead a progressive glass opens and give result as in my above example, in not readbale lanaguage .
    what i am missing jaga
    for your information, the input file is selected from the ffmpeg,bin folder where i stored the ffmpeg.exe
    Moreover, if i include a clear mp3 audio codec for conversion ,thro ffmpeg, my file is converted to mpga format
    But you say, that it converts to correct mp3.
    i think that i have got the latest version of ffmpeg
    for making the ffmpeg work, i go to the installed folder thro command prompt, using cd command to execulte the ffmpeg.exe
    why i am getting undefined output instead of cmd and processing output
    When i just execute bat file i get this result
    Image Attached Thumbnails Click image for larger version

Name:	batexeresult.jpg
Views:	10
Size:	232.9 KB
ID:	50470  

    Last edited by jraju; 9th Oct 2019 at 23:04.
    Quote Quote  
  25. Something is wrong with the batch file. But the first few lines aren't visible in your screen shot. Right click on the batch file, select Send To -> Compressed (Zip) Folder. Then upload the zip file attached to a post here.
    Quote Quote  
  26. Member
    Join Date
    Mar 2013
    Location
    India
    Search Comp PM
    Hi, jaga,
    i aleady told that i do not know how to change the h w etc
    I just used your bat file , except changing the drive from G to C:
    enclosing the zip file for your easy reference
    Image Attached Files
    Quote Quote  
  27. Your batch file looks ok as long as the path to ffmpeg.exe is correct. You should be able to drag/drop any video file onto the batch file to produce a new file with the logo removed. The CMD window that opens should look like:

    Image
    [Attachment 50474 - Click to enlarge]


    Originally Posted by jraju View Post
    i aleady told that i do not know how to change the h w etc
    Just change the values in the batch file. For example, if your subtitles start at x=100 change the x=251 in the batch file to x=100, etc. All this filter does is in-fill a rectangular box as defined by the x, y, w, and h parameters. x and y are the location of the top left corner of the box. w is the width of the box, h is the height of the box. Just like I showed in the image in post #20.
    Quote Quote  
  28. Member
    Join Date
    Mar 2013
    Location
    India
    Search Comp PM
    Hi, i say the same thing. i have used only that bat file. When i drag a video to that notepad opened file, i keep the file open to drag and frop the video file.
    When i drag, the pointer becomes a explorer search like processing, with non responding message. The letters in the batch file is also missing after a few seconds.
    Should i just double click your bat file and then drag and drop the video
    i am in the edit mode, when i am drag the file. is that incorrect
    or should i execute the bat and then in the command window, i should drag the file
    There is something missing please guide. If this works, then i will try changing the parameters of xywh etc
    Quote Quote  
  29. Originally Posted by jraju View Post
    When i drag a video to that notepad opened file, i keep the file open to drag and frop the video file.
    When i drag, the pointer becomes a explorer search like processing, with non responding message. The letters in the batch file is also missing after a few seconds.
    You don't drag the video onto Notepad's window. You drag it onto the batch file in Explorer.
    Quote Quote  
  30. Member
    Join Date
    Mar 2013
    Location
    India
    Search Comp PM
    Hi, jaga,
    i understand now. i thought that if i have to drag the file , i should have open window.
    Your batch file when executed procduce a mkv output , with the name inlucded as , outputone.mp4.delogoone.mkv.
    tthe execution is a flash of a second.
    but , it is having only 0 bites.
    There is no error message, whatsover
    where i am missing
    Quote Quote  



Similar Threads