Opened 5 years ago

Closed 11 months ago

Last modified 11 months 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 Changed 5 years ago by rogerdpack

  • Cc added

comment:2 Changed 5 years ago by rogerdpack

  • 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 Changed 2 years ago by v0lt

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 follow-up: Changed 16 months ago by Balling

  • Owner set to mkver
  • Status changed from new to open


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 Changed 16 months ago by Balling

Version 0, edited 16 months ago by Balling (next)

comment:6 Changed 16 months ago by mkver

  • Owner mkver deleted

comment:7 in reply to: ↑ 4 Changed 16 months ago by v0lt

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

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

comment:8 Changed 15 months ago by Balling

Issue #7781 merged in here.

comment:10 Changed 11 months ago by cus

  • Resolution set to fixed
  • Status changed from open to closed

comment:11 Changed 11 months ago by cehoyos

  • Component changed from ffmpeg to avutil
  • Keywords win32 added
  • Version changed from unspecified to git-master
Note: See TracTickets for help on using tickets.