Opened 6 years ago

Closed 2 years ago

Last modified 2 years ago

#5398 closed defect (fixed)

non-Latin characters in Windows console

Reported by: v0lt Owned by:
Priority: normal Component: avutil
Version: git-master Keywords: win32
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no


Can not read the names of the DirectShow audio device in Windows 7 with the Russian locale.

How to reproduce:

c:\>ffmpeg -list_devices true -f dshow -i dummy
ffmpeg version N-79209-gb3eda69 Copyright (c) 2000-2016 the FFmpeg developers
  built with gcc 5.3.0 (GCC)
  configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-av
isynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enab
le-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --
enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-lib
modplug --enable-libmfx --enable-libmp3lame --enable-libopencore-amrnb --enable-
libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --enabl
e-libschroedinger --enable-libsnappy --enable-libsoxr --enable-libspeex --enable
-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-amrwbenc --ena
ble-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx
264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzimg --enable
-lzma --enable-decklink --enable-zlib
  libavutil      55. 19.100 / 55. 19.100
  libavcodec     57. 33.100 / 57. 33.100
  libavformat    57. 29.101 / 57. 29.101
  libavdevice    57.  0.101 / 57.  0.101
  libavfilter     6. 40.102 /  6. 40.102
  libswscale      4.  1.100 /  4.  1.100
  libswresample   2.  0.101 /  2.  0.101
  libpostproc    54.  0.100 / 54.  0.100
[dshow @ 000000000053a960] DirectShow video devices (some may be both video and
audio devices)
[dshow @ 000000000053a960] Could not enumerate video devices (or none found).
[dshow @ 000000000053a960] DirectShow audio devices
[dshow @ 000000000053a960]  "╨Ь╨╕╨║╤А╨╛╤Д╨╛╨╜ (Realtek High Definiti"
[dshow @ 000000000053a960]     Alternative name "@device_cm_{33D9A762-90C8-11D0-
BD43-00A0C911CE86}\╨Ь╨╕╨║╤А╨╛╤Д╨╛╨╜ (Realtek High Definiti"
[dshow @ 000000000053a960]  "╨б╤В╨╡╤А╨╡╨╛ ╨╝╨╕╨║╤И╨╡╤А (Realtek High Def"
[dshow @ 000000000053a960]     Alternative name "@device_cm_{33D9A762-90C8-11D0-
BD43-00A0C911CE86}\╨б╤В╨╡╤А╨╡╨╛ ╨╝╨╕╨║╤И╨╡╤А (Realtek High Def"
dummy: Immediate exit requested

Change History (11)

comment:1 by Roger Pack, 6 years ago

Cc: added

comment:2 by Roger Pack, 6 years ago

Cc: removed

Do you think it is outputting in UTF-8? hmmm I will probably just add some ability to specify device by "number" to overcome this, it is a worse problem than I thought.

comment:3 by v0lt, 4 years ago

I chose the font "Lucida Console" for the default console window. Sometimes this helps, but not in the case of ffmpeg.

I think you need to specify output to the console in the UTF-16 encoding.

_setmode(_fileno(stdout), _O_U16TEXT);

more info -

comment:4 by Balling, 3 years ago

Owner: set to mkver
Status: newopen


This is enough to solve this!
You just call cmd /K chcp 65001
But there should be a way to change it in C!

After googling here you are an implementation in curl:

comment:5 by Balling, 3 years ago

Last edited 3 years ago by Balling (previous) (diff)

comment:6 by mkver, 3 years ago

Owner: mkver removed

in reply to:  4 comment:7 by v0lt, 3 years ago

Thank you.
The batch file below works correctly for me.

chcp 65001
ffmpeg -list_devices true -f dshow -i dummy

comment:8 by Balling, 3 years ago

Issue #7781 merged in here.

comment:10 by Marton Balint, 2 years ago

Resolution: fixed
Status: openclosed

comment:11 by Carl Eugen Hoyos, 2 years ago

Component: ffmpegavutil
Keywords: win32 added
Version: unspecifiedgit-master
Note: See TracTickets for help on using tickets.