Welcome Guest ( Log In | Register )

Bump Topic Topic Closed RSS Feed

Outline · [ Standard ] · Linear+

 Chinese,Japanese,Korean,Symbol text not recognized, in .bat file

views
     
TSc2lia
post May 28 2024, 01:30 PM, updated 2y ago

Getting Started
**
Junior Member
63 posts

Joined: Mar 2012
I'm on Windows 10 and I'm using ffmpeg to scale some of my videos. The problem isn't with ffmpeg. The problem is if the filename/path has chinese / japanese / korean / symbol chracter in it. If I put command with those in .bat file and run the .bat file, those characters aren't recognized and the command will just said 'no such file found'. But if I paste the command directly in the terminal application (https://apps.microsoft.com/detail/9n0dx20hk701?hl=en-us&gl=us) and run it there, the command run fine without any errors.

Example of the filename
CODE
モンスター 괴물 怪物 ☀️.MOV


Example of my ffmpeg command
CODE
ffmpeg -i "モンスター 괴물 怪物 ☀️ 01.MOV" -vf scale=1280:720 -c:v libx265 -c:a copy "モンスター 괴물 怪物 ☀️ 01.mkv"


Now you might ask, if it works by pasting the command directly in terminal, why not just do so? Why must use .bat file? Well I have many commands like following (I only show example 3 but actually it's like 100) so no way I'm gonna do it 1 by 1, better put it in a .bat file to run.

Example of my .bat file content
CODE
ffmpeg -i "モンスター 괴물 怪物 ☀️ 01.MOV" -vf scale=1280:720 -c:v libx265 -c:a copy "モンスター 괴물 怪物 ☀️ 01.mkv"
ffmpeg -i "モンスター 괴물 怪物 ☀️ 02.MOV" -vf scale=1280:720 -c:v libx265 -c:a copy "モンスター 괴물 怪物 ☀️ 02.mkv"
ffmpeg -i "モンスター 괴물 怪物 ☀️ 03.MOV" -vf scale=1280:720 -c:v libx265 -c:a copy "モンスター 괴물 怪物 ☀️ 03.mkv"


YES, even when viewed in notepad, those characters appear fine. Screenshot as attached.Attached Image

To run the .bat file I either double-click on it and it'll run or I use the terminal and browse to it and run it. But in this case it just failed due to those characters. So my question is is there any way to make it work? Renaming those files to proper readable character is a no-no since there's like 100 files to work with. Because if it works if I paste the command, why won't it if it's in the .bat file?

If the content of .bat file is like following, 100% no issue
CODE
ffmpeg -i "input 01.MOV" -vf scale=1280:720 -c:v libx265 -c:a copy "output 01.mkv"
ffmpeg -i "input 02.MOV" -vf scale=1280:720 -c:v libx265 -c:a copy "output 02.mkv"
ffmpeg -i "input 03.MOV" -vf scale=1280:720 -c:v libx265 -c:a copy "output 03.mkv"


But no way I'm gonna rename. Ain't nobody got time for that.

Btw, I've tried powershell. Both method (copy-paste command or via .bat file) doesn't work too.

This post has been edited by c2lia: May 28 2024, 01:34 PM
SUSifourtos
post May 28 2024, 01:39 PM

Look at all my stars!!
*******
Senior Member
2,256 posts

Joined: Feb 2012



mass rename it with Google spreadsheet + auto translate.

then use the result to create a Bat file.

columnabcd
rename 怪物.mov to monster.mov

then copy paste it into a single bat, run the bat.

Translation can be done automatically.
silverhawk
post May 28 2024, 01:49 PM

Eyes on Target
Group Icon
Elite
4,956 posts

Joined: Jan 2003


This might help: https://stackoverflow.com/questions/4612987...dows-batch-file
SUSnonamer
post May 28 2024, 02:48 PM

Getting Started
**
Junior Member
224 posts

Joined: Apr 2019
any reward for best answer?

i know i have the indisputable best solution because the question is so easy

TSc2lia
post May 28 2024, 03:07 PM

Getting Started
**
Junior Member
63 posts

Joined: Mar 2012
Solved. thanks all.

Topic ClosedOptions
 

Change to:
| Lo-Fi Version
0.0175sec    2.15    6 queries    GZIP Disabled
Time is now: 23rd December 2025 - 08:28 AM