Greetings to one and all!!! I am not a programmer but I had to use FFMPEG due to the fact that a lot of TV Episodes and Documentaries are coded with the HEVC x265 codec, and my equipment is not to read said files. I have looked at a number of examples to try and come up with a 'formula' that satisfies me. What I am trying to do is: be able to copy a number of files into a folder and have Ffmpeg convert the first, then loop to the second, etc. etc. and obviously stop at the last one in the loop. Is this possible, and how? This is the current formula I use and I would like to add the loop into it: ffmpeg -i "xxx.zzz" -c:v lib264 -framerate 25 -crf 21 -c:a libmp3lame -b:a 190k -b:v 3000k -filter:a "volume=2" "xxx.zzz" (I am hard of hearing, that is why I doubled the volume) Is this formula set out correctly? Should the variables be re-arranged from the order they are in? Is there anything else I should add to make it better? I would greatly appreciate any help and assistance you can render. Regards, *Otto van Dyke.* *If you intend to forward this message, PLEASE delete my address and/or details.*
Hi Nicolas, On Tue, Aug 23, 2016 at 10:37 AM, Nicolas Sampson <nospmas1939@gmail.com> wrote:
Greetings to one and all!!!
What I am trying to do is: be able to copy a number of files into a folder and have Ffmpeg convert the first, then loop to the second, etc. etc. and obviously stop at the last one in the loop. Is this possible, and how?
This is possible. If you don't want to get into scripting, you should be able to run this in your terminal as a one liner. Which operating system do you use and are all your h265 files in the same kind of container?
This is the current formula I use and I would like to add the loop into it:
ffmpeg -i "xxx.zzz" -c:v lib264 -framerate 25 -crf 21 -c:a libmp3lame -b:a 190k -b:v 3000k -filter:a "volume=2" "xxx.zzz"
Do you need to have -framerate 25 in there? What is the source fps? Best, Kieran.
Hello Kieran and thanks for the prompt reply. I am in Australia, and yes, our frame rate is 25 fps. Also I made a spelling error with <lib264> it should have been <libx264>. Thanks again and regards, *Nicolas "Sam" Sampson.* *If you intend to forward this message, PLEASE delete my address and/or details.* On 23 August 2016 at 19:57, Kieran O Leary <kieran.o.leary@gmail.com> wrote:
Hi Nicolas,
On Tue, Aug 23, 2016 at 10:37 AM, Nicolas Sampson <nospmas1939@gmail.com> wrote:
Greetings to one and all!!!
What I am trying to do is: be able to copy a number of files into a
folder
and have Ffmpeg convert the first, then loop to the second, etc. etc. and obviously stop at the last one in the loop. Is this possible, and how?
This is possible. If you don't want to get into scripting, you should be able to run this in your terminal as a one liner. Which operating system do you use and are all your h265 files in the same kind of container?
This is the current formula I use and I would like to add the loop into it:
ffmpeg -i "xxx.zzz" -c:v lib264 -framerate 25 -crf 21 -c:a libmp3lame -b:a 190k -b:v 3000k -filter:a "volume=2" "xxx.zzz"
Do you need to have -framerate 25 in there? What is the source fps?
Best,
Kieran. _______________________________________________ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-user
To unsubscribe, visit link above, or email ffmpeg-user-request@ffmpeg.org with subject "unsubscribe".
Hi! 2016-08-23 11:37 GMT+02:00 Nicolas Sampson <nospmas1939@gmail.com>:
This is the current formula I use and I would like to add the loop into it:
As you found out, the problem is that the "loop" only depends on your shell (and in no way on FFmpeg).
ffmpeg -i "xxx.zzz" -c:v lib264 -framerate 25 -crf 21 -c:a libmp3lame -b:a 190k -b:v 3000k -filter:a "volume=2" "xxx.zzz"
Note that the output file name absolutely has to be different from the input file name (it is not in your example) and that you should avoid using framerate unless you absolutely want frames dropped or duplicated. Please find out what top-posting means and avoid it here, Carl Eugen
On 23/08/2016 09:37, Nicolas Sampson wrote:
Greetings to one and all!!!
I am not a programmer but I had to use FFMPEG due to the fact that a lot of TV Episodes and Documentaries are coded with the HEVC x265 codec, and my equipment is not to read said files. I have looked at a number of examples to try and come up with a 'formula' that satisfies me.
What I am trying to do is: be able to copy a number of files into a folder and have Ffmpeg convert the first, then loop to the second, etc. etc. and obviously stop at the last one in the loop. Is this possible, and how?
This is the current formula I use and I would like to add the loop into it:
ffmpeg -i "xxx.zzz" -c:v lib264 -framerate 25 -crf 21 -c:a libmp3lame -b:a 190k -b:v 3000k -filter:a "volume=2" "xxx.zzz"
(I am hard of hearing, that is why I doubled the volume)
Is this formula set out correctly? Should the variables be re-arranged from the order they are in? Is there anything else I should add to make it better?
I would greatly appreciate any help and assistance you can render.
Regards,
*Otto van Dyke.* *If you intend to forward this message, PLEASE delete my address and/or details.*
This should help you get started. You haven't mentioned your input container but as your input codec is x265, the container is probably mp4 so change if necessary. There is a typo in your "lib264", it should be libx264 and I've re-positioned the video bitrate logically: for f in *.mp4; do ffmpeg -i $f -c:v libx264 -b:v 3000k -framerate 25 -crf 21 -c:a libmp3lame -b:a 190k -filter:a "volume=2" -y /new_directory/${f%.mp4}.mp4; done -- Peter van Houten
Hello Peter and thank you for the immediate reply. Yes, that spelling error was picked up after I sent the email. As I stated when I joined about 1 hour ago, I am not a programmer, so I would ask you how to run the formula you quoted......do I open a cmd window and type the formula in it or should I save it a a <.bat> and then run it? Do I copy the formula or batch file into the <ffmpeg\bin> folder? Sorry but I feel stupid asking these questions !!! Also is the formula set out in one line, and is there a 'space' after <-y> Thanks again and sorry for the trouble. Regards, *Nicolas "Sam" Sampson.* *If you intend to forward this message, PLEASE delete my address and/or details.* On 23 August 2016 at 23:39, Peter van Houten <petervdh@gmail.com> wrote:
On 23/08/2016 09:37, Nicolas Sampson wrote:
Greetings to one and all!!!
I am not a programmer but I had to use FFMPEG due to the fact that a lot of TV Episodes and Documentaries are coded with the HEVC x265 codec, and my equipment is not to read said files. I have looked at a number of examples to try and come up with a 'formula' that satisfies me.
What I am trying to do is: be able to copy a number of files into a folder and have Ffmpeg convert the first, then loop to the second, etc. etc. and obviously stop at the last one in the loop. Is this possible, and how?
This is the current formula I use and I would like to add the loop into it:
ffmpeg -i "xxx.zzz" -c:v lib264 -framerate 25 -crf 21 -c:a libmp3lame -b:a 190k -b:v 3000k -filter:a "volume=2" "xxx.zzz"
(I am hard of hearing, that is why I doubled the volume)
Is this formula set out correctly? Should the variables be re-arranged from the order they are in? Is there anything else I should add to make it better?
I would greatly appreciate any help and assistance you can render.
Regards,
*Otto van Dyke.* *If you intend to forward this message, PLEASE delete my address and/or details.*
This should help you get started. You haven't mentioned your input container but as your input codec is x265, the container is probably mp4 so change if necessary. There is a typo in your "lib264", it should be libx264 and I've re-positioned the video bitrate logically:
for f in *.mp4; do ffmpeg -i $f -c:v libx264 -b:v 3000k -framerate 25 -crf 21 -c:a libmp3lame -b:a 190k -filter:a "volume=2" -y /new_directory/${f%.mp4}.mp4; done
-- Peter van Houten _______________________________________________ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-user
To unsubscribe, visit link above, or email ffmpeg-user-request@ffmpeg.org with subject "unsubscribe".
On 23/08/2016 12:24, Nicolas Sampson wrote:
Hello Peter and thank you for the immediate reply. Yes, that spelling error was picked up after I sent the email. As I stated when I joined about 1 hour ago, I am not a programmer, so I would ask you how to run the formula you quoted......do I open a cmd window and type the formula in it or should I save it a a <.bat> and then run it? Do I copy the formula or batch file into the <ffmpeg\bin> folder? Sorry but I feel stupid asking these questions !!! Also is the formula set out in one line, and is there a 'space' after <-y>
Thanks again and sorry for the trouble.
Regards, *Nicolas "Sam" Sampson.* *If you intend to forward this message, PLEASE delete my address and/or details.*
Sorry, can't help if you're using Windows, those commands were for a Linux shell. Maybe someone else on the list knows the equivalent Windows commands? The solution I gave is all on one line and yes, there is a space after the "-y" -- Peter van Houten
On 23 August 2016 at 23:39, Peter van Houten <petervdh@gmail.com> wrote:
On 23/08/2016 09:37, Nicolas Sampson wrote:
Greetings to one and all!!!
I am not a programmer but I had to use FFMPEG due to the fact that a lot of TV Episodes and Documentaries are coded with the HEVC x265 codec, and my equipment is not to read said files. I have looked at a number of examples to try and come up with a 'formula' that satisfies me.
What I am trying to do is: be able to copy a number of files into a folder and have Ffmpeg convert the first, then loop to the second, etc. etc. and obviously stop at the last one in the loop. Is this possible, and how?
This is the current formula I use and I would like to add the loop into it:
ffmpeg -i "xxx.zzz" -c:v lib264 -framerate 25 -crf 21 -c:a libmp3lame -b:a 190k -b:v 3000k -filter:a "volume=2" "xxx.zzz"
(I am hard of hearing, that is why I doubled the volume)
Is this formula set out correctly? Should the variables be re-arranged from the order they are in? Is there anything else I should add to make it better?
I would greatly appreciate any help and assistance you can render.
Regards,
*Otto van Dyke.* *If you intend to forward this message, PLEASE delete my address and/or details.*
This should help you get started. You haven't mentioned your input container but as your input codec is x265, the container is probably mp4 so change if necessary. There is a typo in your "lib264", it should be libx264 and I've re-positioned the video bitrate logically:
for f in *.mp4; do ffmpeg -i $f -c:v libx264 -b:v 3000k -framerate 25 -crf 21 -c:a libmp3lame -b:a 190k -filter:a "volume=2" -y /new_directory/${f%.mp4}.mp4; done
-- Peter van Houten
Hi, On Tue, Aug 23, 2016 at 3:50 PM, Peter van Houten <petervdh@gmail.com> wrote:
Sorry, can't help if you're using Windows, those commands were for a Linux shell. Maybe someone else on the list knows the equivalent Windows commands? The solution I gave is all on one line and yes, there is a space after the "-y"
This doesn't create a new dir as I'm more familiar with python and bash, but this should work in windows: https://gist.github.com/kieranjol/55fdfc00be006c78eae8a30b82f03d7f for %%a in ("*.mp4") do ffmpeg -i %%a -c:v libx264 -b:v 3000k -crf 21 -c:a libmp3lame -b:a 190k -filter:a "volume=2" -y %%a_transcoded.mp4 Save that .bat to whatever folder contains your video files. Double click it and it should transcode all of them. This mailing-list isn't usually for troubleshooting batch scripts, but hopefully we can get this working for you. I removed -framerate 25 as ffmpeg will choose the same fps as your source. Best, Kieran.
Hi Nicolas, since you seem to be using a windows platform I would suggest that instead of using ffmpeg and batch commands which seem a bit remote for you given your background , you turn to more user-friendly solutions like Handbrake where you can batch encode. https://handbrake.fr/ google gave me this tutorial for isntance http://www.howtogeek.com/199993/converting-videos-by-the-batch-with-handbrak... You have presets which you can select to suit the destination you want (a smartphone ?) The h.264 encoder used is x264 as in ffmpeg. best Le 23/08/2016 à 4:50 PM, Peter van Houten a écrit :
On 23/08/2016 12:24, Nicolas Sampson wrote:
Hello Peter and thank you for the immediate reply. Yes, that spelling error was picked up after I sent the email. As I stated when I joined about 1 hour ago, I am not a programmer, so I would ask you how to run the formula you quoted......do I open a cmd window and type the formula in it or should I save it a a <.bat> and then run it? Do I copy the formula or batch file into the <ffmpeg\bin> folder? Sorry but I feel stupid asking these questions !!! Also is the formula set out in one line, and is there a 'space' after <-y>
Thanks again and sorry for the trouble.
Regards, *Nicolas "Sam" Sampson.* *If you intend to forward this message, PLEASE delete my address and/or details.*
Sorry, can't help if you're using Windows, those commands were for a Linux shell. Maybe someone else on the list knows the equivalent Windows commands? The solution I gave is all on one line and yes, there is a space after the "-y"
-- Peter van Houten
On 23 August 2016 at 23:39, Peter van Houten <petervdh@gmail.com> wrote:
On 23/08/2016 09:37, Nicolas Sampson wrote:
Greetings to one and all!!!
I am not a programmer but I had to use FFMPEG due to the fact that a lot of TV Episodes and Documentaries are coded with the HEVC x265 codec, and my equipment is not to read said files. I have looked at a number of examples to try and come up with a 'formula' that satisfies me.
What I am trying to do is: be able to copy a number of files into a folder and have Ffmpeg convert the first, then loop to the second, etc. etc. and obviously stop at the last one in the loop. Is this possible, and how?
This is the current formula I use and I would like to add the loop into it: ffmpeg -i "xxx.zzz" -c:v lib264 -framerate 25 -crf 21 -c:a libmp3lame -b:a 190k -b:v 3000k -filter:a "volume=2" "xxx.zzz"
(I am hard of hearing, that is why I doubled the volume)
Is this formula set out correctly? Should the variables be re-arranged from the order they are in? Is there anything else I should add to make it better?
I would greatly appreciate any help and assistance you can render.
Regards,
*Otto van Dyke.* *If you intend to forward this message, PLEASE delete my address and/or details.*
This should help you get started. You haven't mentioned your input container but as your input codec is x265, the container is probably mp4 so change if necessary. There is a typo in your "lib264", it should be libx264 and I've re-positioned the video bitrate logically:
for f in *.mp4; do ffmpeg -i $f -c:v libx264 -b:v 3000k -framerate 25 -crf 21 -c:a libmp3lame -b:a 190k -filter:a "volume=2" -y /new_directory/${f%.mp4}.mp4; done
-- Peter van Houten
ffmpeg-user mailing list ffmpeg-user@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-user
To unsubscribe, visit link above, or email ffmpeg-user-request@ffmpeg.org with subject "unsubscribe".
2016-08-23 15:19 GMT+02:00 pkv.stream <pkv.stream@gmail.com>:
Hi Nicolas, since you seem to be using a windows platform I would suggest that instead of using ffmpeg and batch commands which seem a bit remote for you given your background , you turn to more user-friendly solutions like Handbrake where you can batch encode.
The disadvantage (on Windows) is of course that you get a very old libavcodec with many known bugs that are not reproducible with FFmpeg. Please do not top-post here, Carl Eugen
Hi, On Tue, Aug 23, 2016 at 2:19 PM, pkv.stream <pkv.stream@gmail.com> wrote:
Hi Nicolas, since you seem to be using a windows platform I would suggest that instead of using ffmpeg and batch commands which seem a bit remote for you given your background , you turn to more user-friendly solutions like Handbrake where you can batch encode.
While I agree that handbrake is more user-friendly, engaging with the command line and batch scripting is an excellent skill to have, and opens up the vast array of options within ffmpeg . For example, Nicolas is hard of hearing and requires volume adjustment. I'm not sure if this is readily available in handbreak, but it's an option that he can add in to his batch scripts. Also please do not top post here. Best, Kieran.
Hi,
Hi Nicolas, since you seem to be using a windows platform I would suggest that instead of using ffmpeg and batch commands which seem a bit remote for you given your background , you turn to more user-friendly solutions like Handbrake where you can batch encode. While I agree that handbrake is more user-friendly, engaging with the command line and batch scripting is an excellent skill to have, and opens up the vast array of options within ffmpeg . For example, Nicolas is hard of hearing and requires volume adjustment. overlooked that requirement, good point I'm not sure if this is readily available in handbreak, but it's an option
On Tue, Aug 23, 2016 at 2:19 PM, pkv.stream <pkv.stream@gmail.com> wrote: that he can add in to his batch scripts. Also please do not top post here.
Le 23/08/2016 à 3:32 PM, Kieran O Leary a écrit : ps: I thought that top-posting was kind of hijacking a thread with your own issues. But I answered to a post in the thread. Sorry if my answser was posted in a wrong manner. If you can clarify the proper way, much thanks.
Best,
Kieran. _______________________________________________ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-user
To unsubscribe, visit link above, or email ffmpeg-user-request@ffmpeg.org with subject "unsubscribe".
got my answer https://en.wikipedia.org/wiki/Posting_style#Top-posting sorry for top-posting folks
On Tue, Aug 23, 2016 at 07:37:58PM +1000, Nicolas Sampson wrote:
ffmpeg -i "xxx.zzz" -c:v lib264 -framerate 25 -crf 21 -c:a libmp3lame -b:a 190k -b:v 3000k -filter:a "volume=2" "xxx.zzz"
well, since nobody has mentioned, but aren't -crf and -b:v mutu- ally exclusive? if you want crf then drop the -b:v switch.
On Tue, Aug 23, 2016 at 19:37:58 +1000, Nicolas Sampson wrote:
I am not a programmer but I had to use FFMPEG due to the fact that a
Using a command line tool doesn't really have to do with programming, but yeah, in a way, it may go beyond what many users have done before. Anyway: In addition to what the others have written, I would like to add:
ffmpeg -i "xxx.zzz" -c:v lib264 -framerate 25 -crf 21 -c:a libmp3lame -b:a 190k -b:v 3000k -filter:a "volume=2" "xxx.zzz"
(I am hard of hearing, that is why I doubled the volume)
Raising the volume of videos which are recorded "too silent" is certainly a good idea - I do it often, silent videos irritate me - but cannot be generalized. The tool of choice for changing the volume is usually your player. The reason I'm saying this: If the maximum volume of your audio is already above -3 dB (i.e. "1/2"), multiplying it with your "2" will cause clipping. Clipping implies heavy distortions, which will make it even worse for you to comprehend the audio. What you can do is to analyze the audio track: $ ffmpeg -i mysample.mkv -vn -filter:a volumedetect -f null - where the filter will give you something like: [Parsed_volumedetect_0 @ 0x9f3e5e0] n_samples: 9893888 [Parsed_volumedetect_0 @ 0x9f3e5e0] mean_volume: -26.5 dB [Parsed_volumedetect_0 @ 0x9f3e5e0] max_volume: -10.2 dB [Parsed_volumedetect_0 @ 0x9f3e5e0] histogram_10db: 25 [Parsed_volumedetect_0 @ 0x9f3e5e0] histogram_11db: 410 [Parsed_volumedetect_0 @ 0x9f3e5e0] histogram_12db: 2297 [Parsed_volumedetect_0 @ 0x9f3e5e0] histogram_13db: 7834 (The astats filter may or may not be better to parse for automation.) And you can then compensate that insufficient max volume (no more, no less) with the volume filter: $ ffmpeg ... -filter:a volume="+10.2 dB" ... If that's still too silent in most places, you probably need to use a dynamic filter such as dynaudnorm[1].
*Otto van Dyke.* *If you intend to forward this message, PLEASE delete my address and/or details.*
The list server will not really obey, but publicize instead: http://ffmpeg.org/pipermail/ffmpeg-user/2016-August/033282.html Just sayin'. Welcome to ffmpeg, cheers, Moritz [1] https://ffmpeg.org/ffmpeg-filters.html#dynaudnorm
participants (7)
-
Carl Eugen Hoyos -
Kieran O Leary -
Moritz Barsnick -
Nicolas Sampson -
Peter van Houten -
pkv.stream -
rslovers@yandex.com