VideoHelp Forum

+ Reply to Thread
Results 1 to 4 of 4
Thread
  1. I ask you for a script file to encode into a format HEVC & H264
    His task is to convert any video to the two mentioned formats, each of them separately, with a bit rate of 20 for the video without changing the audio bit, and with the creation of a folder called (new) in which the resulting files are placed, and after the conversion is completed for all files, it counts for 30 seconds and then stops Turning on the computer if you did not press any button to prevent the computer from turning off

    Quote Quote  
  2. Member
    Join Date
    Aug 2013
    Location
    Central Germany
    Search PM
    I guess you mean a batch file, using e.g. ffmpeg for automated conversion.

    "a bit rate of 20" does not make sense. Please explain with more details.
    Quote Quote  
  3. Originally Posted by LigH.de View Post
    I guess you mean a batch file, using e.g. ffmpeg for automated conversion.

    "a bit rate of 20" does not make sense. Please explain with more details.
    batch (yes)
    For example :

    for %%a in (*.mkv) do ffmpeg -i "%%a" -map 0 -c:v libx265 -preset superfast -crf 24 -c:a aac -b:a 386k -c copy "%%~na-DONE.mkv"

    and with the creation of a folder called (new) in which the resulting files are placed, and after the conversion is completed for all files, it counts for 30 seconds and then stops Turning on the computer if you did not press any button to prevent the computer from turning off
    Quote Quote  
  4. It would seem like the questions were automatically translated from whatever language to english, which makes them even more confusing than they probably were to begin with. In a case like this, lacking a better option, it would be good to put the auto-translated text followed by the original text in whatever original language, so that anyone trying to help can have a better grasp of the original poster's intentions (either by knowing the original language themselves, or by using a different auto-translate engine to get an alternate translation of confusing sentences).

    Also, when copying a command, use the “CODE” formatting (button available in “advanced” mode, or manually by adding “[ C O D E ]” before and “[ / C O D E ]” at the end -- remove extra spaces, I had to put them so that the text in between would not be displayed as code), to distinguish it from the written text and avoid that specific combinations of characters get displayed as smileys.

    To introduce a delay in a batch script :
    https://ss64.com/nt/sleep.html
    To shutdown the computer :
    https://ss64.com/nt/shutdown.html
    The shutdown command itself can be set with a delay (actually 30 seconds is the default settings). You can display the integrated help in your local language by typing “shutdown /?” in the command prompt (works with most commands, either with /? or -h or --help, you can save it to a text file for future reference with : whatevercommand /? >"X:\whatevercommand help.txt")

    By "bit rate of 20", did you mean a CRF value of 20 ? CRF is a quality based setting. For x264, -crf 20 is usually considered as a good compromise between file size and quality preservation. I don't know what setting is considered roughly equivalent for x265.
    To leave the audio unchanged, it should be “-c:a copy” instead of “-c:a aac -b:a 386k”.
    I'm not sure what “-map 0” does here. The -map option is usually meant to select only some of the streams from the source(s) and/or to set streams in a specific order (for instance to have the original language audio stream first as the default track and the dubbed audio stream as a secondary track).
    Of course a good question would be : why are you converting those files in the first place ? Are the source files very large, with a very high bitrate ? Why do you need both a x264 and a x265 conversion ?

    I'm not experienced enough to guarantee that this will work as intended, but since this thread has been stalled for about a week, I will propose :
    Code:
    for %%a in (*.mkv) do ffmpeg -i "%%a" -c:v libx265 -preset superfast -crf 24 -c:a copy -c:s copy ".\new\%%~na [x265].mkv"
    for %%a in (*.mkv) do ffmpeg -i "%%a" -c:v libx264 -preset superfast -crf 20 -c:a copy -c:s copy ".\new\%%~na [x264].mkv"
    shutdown /f /t 30
    Quote Quote  



Similar Threads