I use avisynth to demux video from audio. When I use
x = "m.mkv"
ffvideosource(x)
It work correctly but when I change my video filename to a UTF-8 one and my script as:
x = "م.mkv"
ffvideosource(x)
I Got the following error: failed to open for hashing avisynth
I found a link (UTF-8 source files are not supported) who tell UTF-8 file name not work in avisynth, and to correct the problem, it said:
specify the parameter utf8=true when calling ffvideosource, save the script as UTF-8 without BOM and then see if that works.
But, I couldn't solve the problem. As I Open the script in the notepad and save it in utf-8 format, I got the following error:
UTF-8 Source files are not supported, re-save script with ANSI encoding
How can I solve the problem, How can I run my script with a UTF-8 filename?
Very common problem when using UTF-8 in AviSynth.
Follow these steps:
Check the plugins folder. There should exist these three files: ffms2.dll
, ffmsindex.exe
, and FFMS2.avsi
. If you did not have problem with ANSI
, I guess that you don't have FFMS2.avsi
in your plugins folder; In this situation download the latest version form here.
After that make an AVS
file with Notepad++. For example I do this:
x = "C:/Users/Nemat/Desktop/StackOverFlow/نعمت.mkv"
ffmpegsource2(x,utf8=true)
Please note that here I used ffmpegsource2()
.
In the Encoding
menu from Notepadd++ select Encode in UTF-8 without BOM
.
Save your file.
Check the video file exists in the addressed directory.
Double click on your AVS
file.
Enjoy it!