Closed longwu9t closed 5 days ago
the ffmpeg probe output JSON, it should be Unicode or at least UTF-8 may I know what is the actual PATH ?
d:\vdo\国家地理\阿斯哈图石林\01.mp4
For file path, it could avoid using path from JSON, this should be easy fix.
For issue #230 the Windows Console redirection >
not properly parsed to UTF-8, as issue long time ago:
https://superuser.com/questions/1584842/ffprobe-output-text-wrong-encoding
https://trac.ffmpeg.org/ticket/8890#comment:2
I think, instead of use redirection pipe, output to file instead, so, JSON closing string corrected at least
UTF-8 Fix:
I think, output to file should be prevent JSON parse error
if character set detection and conversion is a problem, maybe don't need to read the title of each MKV stream, like processing mp4 files. non-ASCII characters in the mp4 file's title, no error occur.
I understand, my FFmpeg MediaInfo parse doesn't read stream title https://github.com/Anime4000/IFME/blob/master/IFME.FFmpeg/MediaInfo.cs
However the -print_format json -show_format -show_streams
will print everything...
I wonder if a way to ignore/not to print stream title
If need to change the system's regional settings, can consider executing chcp 65001 in the CMD first. i don't know if it is feasible.
I tested it again, not all non-ASCII stream titles can cause the error, the following string caused the error: Mandarin Flac 5.1 @ 1718 kbps 带国语解说 cat.zip
For File Path fix
Before:
After (not using parsed JSON):
Next fix, ignore stream title
, so far I import it has no error, this one I need take a look more
https://github.com/Anime4000/IFME/assets/9213316/4c25e65d-2759-4943-8015-accf317b9836
This title error is definitely possible on my system, but maybe it's an isolated case?
I instruct Output Redirection to use UTF-8 Encoding, this should print correct text:
Unicode Aware: https://github.com/Anime4000/IFME/blob/master/IFME.FFmpeg/ReadFile.cs#L33
Try this IFME_try8.2.4.zip
FFmpeg Media Info ♥ thanks!!!
did it work in your environment ?
new version works fine!
Nice! Thank You for reporting this ♥
The non-ASCII part of the file name is displayed as garbled characters, which does not affect the encoding work, just a small problem.