Opened 6 years ago
Last modified 6 years ago
#8964 new enhancement
Wrong character encoding for AVI container
| Reported by: | malaterre | Owned by: | |
|---|---|---|---|
| Priority: | wish | Component: | avformat |
| Version: | git-master | Keywords: | avi |
| Cc: | Blocked By: | ||
| Blocking: | Reproduced by developer: | no | |
| Analyzed by developer: | no |
Description
Summary of the bug:
How to reproduce:
% echo $LANG
en_US.UTF-8
% ffmpeg -y -i input.mp4 -c:v copy -c:a copy -metadata title="Un Monstre à Paris" -metadata comment="An exercise with unicode" output.avi
% ffprobe -v error -hide_banner -show_format -print_format json -i output.avi
[...]
"title": "Un Monstre à Paris",
The above is incorrect, it should instead prints:
% mediainfo output.avi [...] Movie name : Un Monstre à Paris
See:
Attachments (1)
Change History (10)
by , 6 years ago
comment:2 by , 6 years ago
% ffmpeg -y -i input.mp4 -c:v copy -c:a copy -metadata title="$(echo 'Un Monstre à Paris' | iconv -t cp1252)" -metadata comment="An exercise with unicode" output.avi
gives:
% mediainfo output.avi [...] Movie name : Un Monstre à Paris
comment:3 by , 6 years ago
| Version: | unspecified → 4.1.4 |
|---|
follow-up: 7 comment:4 by , 6 years ago
What makes you believe that the character encoding used by avi is defined at all?
comment:5 by , 6 years ago
This is based on the following comment:
RIFF: The internal encoding of RIFF strings (eg. in AVI and WAV files) is assumed to be Latin unless otherwise specified by the RIFF CSET chunk or the "-charset RIFF=CHARSET" option.
comment:6 by , 6 years ago
I did double check the RIFF specification from:
It states:
Specifies the code page used for file elements. If the CSET chunk is not present, or if this field has value zero, assume standard ISO 8859/1 code page (identical to code page 1004 without code points defined in hex columns 0, 1, 8, and 9).
comment:7 by , 6 years ago
Replying to mkver:
What makes you believe that the character encoding used by avi is defined at all?
Which specification were you looking at ?
comment:8 by , 6 years ago
| Component: | ffprobe → avformat |
|---|---|
| Keywords: | avi added |
| Priority: | normal → wish |
| Version: | 4.1.4 → git-master |
For future tickets: Please remember to test current FFmpeg git head and provide the command line you tested together with the complete, uncut console output to make your tickets valid.
comment:9 by , 6 years ago
| Summary: | ffprobe: Wrong character encoding for AVI container → Wrong character encoding for AVI container |
|---|



Title as printed from Windows 8.1 session