Menu

Unicode + Windows + CLI output

Help
Selur
2015-01-29
2015-01-29
  • Selur

    Selur - 2015-01-29

    Unicode output?
    When creating an mkv file with:

    mkvmerge --ui-language en -o "F:\TestClips&Co\tag tests\test3.mkv" --disable-track-statistics-tags --global-tags "H:\Temp\test3.xml" -d 0 --default-track 0:yes --track-name 0:"الصفحة الرئيسية" --language 0:ar --default-duration 0:50i --aspect-ratio-factor 0:1.422 --chapter-charset UTF-8 --chapters "H:\Temp\10_21_31_5110__05.chp" --compression -1:none --forced-track 0:yes --no-audio --no-subtitles "H:\Temp\test3_10_21_31_5110_03.m2v" --track-name 0:"èéøÞǽлљΣæčaィ" --language 0:ab --default-track 0:yes --forced-track 0:no -a 0 --compression -1:none --no-video --no-subtitles --no-chapters "H:\Temp\iId_1_aid_0_lang_de_10_21_31_5110_01.ac3" --language 0:en --default-track 0:no --forced-track 0:no -a 0 --compression -1:none --no-video --no-subtitles --no-chapters "H:\Temp\iId_2_aid_1_lang_en_10_21_31_5110_02.ac3"

    and 'test3.xml' containing

    <Tags>
    <Tag>
    <Simple>
    <Name>Encoding Gui</Name>
    <String>Hybrid 2015.01.27.1</String>
    </Simple>
    <Simple>
    <Name>Description</Name>
    <String>SüßeSoßeÜmlaute</String>
    </Simple>
    <Simple>
    <Name>Genre</Name>
    <String>ドラマ] ブラッディ・マンデイ 第01話 「日本最後の日</String>
    </Simple>
    <Simple>
    <Name>Title</Name>
    <String>Администратор (title test)</String>
    </Simple>
    </Tag>
    </Tags>
    (uploaded test3.mkv to https://drive.google.com/folderview?id=0B_WxUS1XGCPASUZibG5XZkRfeTg&usp=sharing)

    and then calling:

    mediainfo --Full "F:\TestClips&Co\tag tests\test3.mkv"

    (MediaInfo Command line, MediaInfoLib - v0.7.72)
    I get:

    General
    ...
    Title : ????????????? (title test)
    Movie name : ????????????? (title test)
    Genre : ???] ?????·???? ?01? ???????
    Description : SüßeSoßeÜmlaute
    ...
    Video
    ...
    Title : ?????? ????????
    ...
    Audio #1
    ....
    Title : èéøÞ???Sæca?
    Menu
    ...
    00:00:00.000 : en:???????? é??

    see unshortened output http://pastebin.com/jfUYV91J

    Note that I grab the output with a program and this is the output my program gets while assuming the output is UTF-8.
    (if I call this in a normal Windows command prompt, the output is garbled)

    calling instead ffmpeg with:

    "ffmpeg.exe" -i "F:\TestClips&Co\tag tests\test3.mkv"

    the output is okay

    built on Jan 28 2015 21:45:23 with gcc 4.9.2 (Rev2, Built by MSYS2 project)
    configuration: --arch=x86_64 --disable-debug --disable-shared --disable-doc --disable-w32threads --enable-gpl --enable-version3 --enable-runtime-cpudetect --enable-avfilter --enable-bzlib --enable-zlib --enable-decklink --enable-librtmp --enable-gnutls --enable-avisynth --enable-frei0r --enable-filter=frei0r --enable-libbluray --enable-libcaca --enable-libopenjpeg --enable-fontconfig --enable-libfreetype --enable-libass --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libvo-amrwbenc --enable-libschroedinger --enable-libsoxr --enable-libtwolame --enable-libspeex --enable-libtheora --enable-libutvideo --enable-libvorbis --enable-libvo-aacenc --enable-libopus --enable-libvidstab --enable-libvpx --enable-libwavpack --enable-libxavs --enable-libx264 --enable-libx265 --enable-libxvid --enable-libzvbi
    libavutil 54. 18.100 / 54. 18.100
    libavcodec 56. 21.100 / 56. 21.100
    libavformat 56. 19.100 / 56. 19.100
    libavdevice 56. 4.100 / 56. 4.100
    libavfilter 5. 9.101 / 5. 9.101
    libswscale 3. 1.101 / 3. 1.101
    libswresample 1. 1.100 / 1. 1.100
    libpostproc 53. 3.100 / 53. 3.100
    [mpeg2video @ 00000000005c8680] ignoring pic cod ext after 0
    Input #0, matroska,webm, from 'F:\TestClips&Co\tag tests\test3.mkv':
    Metadata:
    encoder : libebml v1.3.1 + libmatroska v1.4.2
    creation_time : 2015-01-29 09:25:28
    Encoding Gui : Hybrid 2015.01.27.1
    Description : SüßeSoßeÜmlaute
    Genre : ドラマ] ブラッディ・マンデイ 第01話 「日本最後の日
    Title : Администратор (title test)
    Duration: 00:00:30.37, start: 0.000000, bitrate: 3774 kb/s
    Chapter #0:0: start 0.000000, end 30.368000
    Metadata:
    title : Строговы é初级
    Stream #0:0(ara): Video: mpeg2video (Main), yuv420p(tv), 720x576 [SAR 64:45 DAR 16:9], max. 8278 kb/s, 25 fps, 25 tbr, 1k tbn, 50 tbc (default) (forced)
    Metadata:
    title : الصفحة الرئيسية
    Stream #0:1(abk): Audio: ac3, 48000 Hz, 5.1(side), fltp, 448 kb/s (default)
    Metadata:
    title : èéøÞǽлљΣæčaィ
    Stream #0:2(eng): Audio: ac3, 48000 Hz, 5.1(side), fltp, 448 kb/s
    At least one output file must be specified

    Note: output is grabbed the same way I grab the mediainfo output
    (if I call this in a normal Windows command prompt, the output is garbled)

    My guess is that unlike ffmpeg MediaInfo uses the local character coding instead of utf-8.

    -> Is there a way to tell MediaInfo to output utf-8 ?

     

    Last edit: Selur 2015-01-29
  • Selur

    Selur - 2015-01-29

    Okay, sorry, my fault.
    Seems like I made a mistake compiling mediainfo

     
  • Jerome Martinez

    Jerome Martinez - 2015-01-29

    I just tested with Windows 7 command line,
    mediainfo test3.mkv >temp.txt
    and the file is in UTF-8.

    On my side, I use wcout interface (so the Unicode API of the OS) and don't touch any code page (so my output is in UTF-16LE on Windows).

    I did not test, but I remember that I was using to do "chcp 65001" on WinXP in order to select UTF-8 code page. maybe you can test on your side?

     

Log in to post a comment.