Opened 4 years ago
Last modified 10 months ago
#8890 open defect
ffprobe utf8 stdout on windows console is broken
Reported by: | Truong Quoc Khanh | Owned by: | |
---|---|---|---|
Priority: | normal | Component: | ffprobe |
Version: | git-master | Keywords: | |
Cc: | Blocked By: | ||
Blocking: | Reproduced by developer: | no | |
Analyzed by developer: | no |
Description
Summary of the bug:
How to reproduce:
ffprobe -print_format json -show_format -show_streams -sexagesimal file.mp3
Result:
{ "streams": [ { "index": 0, "codec_name": "mp3", "codec_long_name": "MP3 (MPEG audio layer 3)", "codec_type": "audio", "codec_time_base": "1/44100", "codec_tag_string": "[0][0][0][0]", "codec_tag": "0x0000", "sample_fmt": "fltp", "sample_rate": "44100", "channels": 2, "channel_layout": "stereo", "bits_per_sample": 0, "r_frame_rate": "0/0", "avg_frame_rate": "0/0", "time_base": "1/14112000", "start_pts": 353600, "start_time": "0:00:00.025057", "duration_ts": 3829063680, "duration": "0:04:31.333878", "bit_rate": "320000", "disposition": { "default": 0, "dub": 0, "original": 0, "comment": 0, "lyrics": 0, "karaoke": 0, "forced": 0, "hearing_impaired": 0, "visual_impaired": 0, "clean_effects": 0, "attached_pic": 0, "timed_thumbnails": 0 }, "tags": { "encoder": "LAME3.99r" }, "side_data_list": [ { "side_data_type": "Replay Gain" } ] }, { "index": 1, "codec_name": "mjpeg", "codec_long_name": "Motion JPEG", "profile": "Baseline", "codec_type": "video", "codec_time_base": "0/1", "codec_tag_string": "[0][0][0][0]", "codec_tag": "0x0000", "width": 500, "height": 446, "coded_width": 500, "coded_height": 446, "closed_captions": 0, "has_b_frames": 0, "sample_aspect_ratio": "1:1", "display_aspect_ratio": "250:223", "pix_fmt": "yuvj420p", "level": -99, "color_range": "pc", "color_space": "bt470bg", "chroma_location": "center", "refs": 1, "r_frame_rate": "90000/1", "avg_frame_rate": "0/0", "time_base": "1/90000", "start_pts": 2255, "start_time": "0:00:00.025056", "duration_ts": 24420049, "duration": "0:04:31.333878", "bits_per_raw_sample": "8", "disposition": { "default": 0, "dub": 0, "original": 0, "comment": 0, "lyrics": 0, "karaoke": 0, "forced": 0, "hearing_impaired": 0, "visual_impaired": 0, "clean_effects": 0, "attached_pic": 1, "timed_thumbnails": 0 }, "tags": { "comment": "Cover (front)" } } ], "format": { "filename": "E:
c.mp3", "nb_streams": 2, "nb_programs": 0, "format_name": "mp3", "format_long_name": "MP2/3 (MPEG audio layer 2/3)", "start_time": "0:00:00.025056", "duration": "0:04:31.333878", "size": "10893807", "bit_rate": "321192", "probe_score": 51, "tags": { "album": "border", "artist": "ClariS", "comment": "ExactAudioCopy v1.0b3", "TSRC": "JPU901402151", "title": "繧ォ繧、繝・, "track": "3/4", "DISCID": "32038304" } }}
File version: ffmpeg-4.3-win64-static
OS: Window10 64bit
Attachments (1)
Change History (9)
comment:1 by , 4 years ago
comment:2 by , 4 years ago
Priority: | critical → normal |
---|
Isn't this a windows console encoding issue? Can you reproduce this if you pipe the output to a file?
ffprobe -print_format json -show_format -show_streams -sexagesimal file.mp3 > utf8_encoded_text.txt
by , 4 years ago
Attachment: | utf8_encoded_text.txt added |
---|
comment:3 by , 4 years ago
oh, text file is work. May be bropblem from console stream convert to text
follow-up: 6 comment:4 by , 4 years ago
Status: | new → open |
---|
The same as cbf2a9bfac60e400980b503061922aedeedd9e28, it is a common problem. P.S. sorry))
comment:5 by , 4 years ago
Summary: | Bug title encoding → ffprobe utf8 stdout on windows console is broken |
---|
Windows console works in the local codepage by default.
FFprobe simply writes utf8 data to stdout, but the windows console won't interpret that correctly. If the standard output is a windows console, special multibyte windows console functions might be used to instead of simply writing to stdout to fix this.
comment:6 by , 4 years ago
Replying to Balling:
You did not account for Chinese/Japanese characters in cbf2a9bfac60e400980b503061922aedeedd9e28, it is a common problem. They took two places in the console...
That change only affected av_log doing logging to stderr console. Ffprobe is using simple stdout here, so that change does not affect its output.
comment:7 by , 4 years ago
I fixed it.
Goto Region
> Change system locale...
and check Beta: Use Unicode UTF-8 .....
then restart computer
https://superuser.com/a/1588628/898849
comment:8 by , 10 months ago
It works correctly everywhere now by default.
Prints title : カイト
Maybe the issue was fixed in windows 11 Moments 3?
Title show in explorer properties: カイト
File: https://drive.google.com/file/d/1lpLnwSpvipyw7pPSL2LYw8MMgQ8p1Vm0/view