[FFmpeg-user] HELP !

Peter van Houten petervdh at gmail.com
Tue Aug 23 16:39:21 EEST 2016


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


More information about the ffmpeg-user mailing list