I
I
Ivan Muraviev2019-05-15 20:53:15
Command line
Ivan Muraviev, 2019-05-15 20:53:15

How to transfer files via console/script to different folders?

When transcoding with ffmpeg 124, the video had to be placed in one folder, because it does not support Russian letters in specifying the location for the output file. Now you need to go through the folders where the originals are and replace them with the transcoded files. I will not refuse a good reference to bat/cmd/PowerShell yet.

for /r %%i in (SAM*.MP4) ffmpeg.exe -hide_banner -i "%%i" -c:v h264_nvenc "D:\Ffmpeg\%%~ni.mp4"

There were a lot of videos with a high bitrate in many subfolders at the following address: D:\C 500 GB\Camps\OC Team\Photos and Videos. To reduce their bitrate, I took ffmpeg and ran them through it with the help of a batch file. Instead of D:\Ffmpeg\ -> %%~dpni.mp4 (which puts the full path to the file + its name without extension) and ffmpeg cursed in Russian in the output file. Here is the error code:
spoiler
OUT_D:\╨б 500 ╨│╨▒\╨Ы╨░╨│╨╡╤А╤П\╨Ю╨ж ╨Ъ╨╛╨╝╨░╨╜╨┤╨░\╨д╨╛╤В╨╛ ╨╕ ╨▓╨╕╨┤╨╡╨╛\20\╨Ъ╨╛╨╝╨╝╤Г╨╜╨╕╨║╨░╤В╨╕╨▓╨╜╤Л╨╣ ╤В╤А╨╡╨╜╨╕╨╜╨│\SAM_3885.mp4: Invalid argument
It is clear that the characters are displayed this way due to incorrect encoding, but this is not the point.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Moskus, 2019-05-15
@rufus20145

It was necessary to do this:
Now you can do this:
As a reference, I use https://ss64.com/

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question