Hi I am Rupesh from India and I have a PC with open suse Linux installed. I have some MP4 video files of large size. I want to compress these files using ffmpeg command line tool not gui. I can’t do this work because the file names consists of non ASCII characters.
There are 150 files to be converted. In the terminal emulator when I navigate to this directory and issue the command “ls -name” I am getting output as lines containing non ASCII characters with English characters. When I run the command “ls -name > names.txt” and open the text file in text editor I am able to see correct file names.
In the names.txt file one of the line consists of xxxxx_english_charecters_xxxxx.mp4. In this line xxxxx are non ASCII characters i mean characters from other non English language.
I have issued the following command
<code>
ffmpeg -i -y xxxxx_english_charecters_xxxxx.mp4 -c:v libx265 -b:v 400k -c:a aac -b:a 64k -ar 44100 output.mp4.
<\code>
After issuing the above mentioned command I am getting error from ffmpeg command as below
File xxxxx_english_charecters_xxxxx.mp4 not found.
My complaint is that terminal emulator is unable to display or interpret non ASCII characters.
I have written a small shell script as below
<code>
for i in *.mp4;
do name=echo $i | cut -d'.' -f1
;
echo $name;
ffmpeg -i “$i” -c:v libx265 -b:v 400k -c:a aac -b:a 64k -ar 44100 “${name}_compressed.mp4”;
done
<\code>
After that I given execute permission to this script file and tried to execute
Upon running the above script in terminal emulator i am getting continuous errors from ffmpeg command as
File unknown
File unknown
If you can’t believe my words try to create an empty file with file name containing chinise characters in windows command prompt or Linux terminal emulator using command like touch. Definitely you will fail to create.
Even if you can’t believe my words try to download or copy any file from internet with file name containing chinise characters. After that try to navigate to the directory downloaded in Linux terminal emulator and issue the ls command and definitely you are not going to see file you downloaded.
Even if you navigate to the directory downloaded in Linux file browser like nautilis you can’t view the file you downloaded.
I have searched web for " unicode support in terminal emulator " but I have not found any suitable solution.
Can anyone of you suggest how to work with command line tools like ffmpeg, touch and using these commands in shell scripting. I mean how to enable unicode in terminal emulator.