[FFmpeg-user] Weird characters in created passlogfile on Windows
Thierry Lelégard
thierry.lelegard at free.fr
Tue Oct 15 23:15:12 CEST 2013
Hello,
I found a strange problem with ffmpeg on Windows (not tested yet on Linux)
with the -passlogfile option.
Consider a file path containing non ASCII characters like è (e grave) used
in all file specifications (in a directory name for instance). There are
three different use cases: input file, output file, pass log file.
In the first two cases, the non-ASCII characters in file names are processed
correctly. But in the case of the pass log file, the file name is transformed
into some weird sequence (typical UTF-8 sequence). The strange thing is that
ffmpeg creates two files, the pass log file and the output file, but processes
the characters in the file name quite differently. The way the two files are
created must be completely different.
See the following example:
D:\Public\Videos\TEMP>ls -l h*
-rw-rw-rw- 1 user group 18800000 Oct 15 22:50 hè.ts
There is one single file. Let's transcode it that way;
D:\Public\Videos\TEMP>ffmpeg -i hè.ts -pass 1 -passlogfile hè hè.mpg
ffmpeg version N-56060-gbcd1c20 Copyright (c) 2000-2013 the FFmpeg developers
built on Sep 6 2013 00:49:05 with gcc 4.7.3 (GCC)
configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libcaca --enable-libfreetype
--enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsoxr --enable-libspeex
--enable-libtheora --enable-libtwolame --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxavs --enable-libxvid --enable-zlib
libavutil 52. 43.100 / 52. 43.100
libavcodec 55. 31.101 / 55. 31.101
libavformat 55. 16.101 / 55. 16.101
libavdevice 55. 3.100 / 55. 3.100
libavfilter 3. 83.104 / 3. 83.104
libswscale 2. 5.100 / 2. 5.100
libswresample 0. 17.103 / 0. 17.103
libpostproc 52. 3.100 / 52. 3.100
[....]
Now look at the result:
D:\Public\Videos\TEMP>ls -l h*
-rw-rw-rw- 1 user group 258179 Oct 15 22:50 hè-0.log
-rw-rw-rw- 1 user group 5261312 Oct 15 22:50 hè.mpg
-rw-rw-rw- 1 user group 18800000 Oct 15 22:50 hè.ts
The command contains "-passlogfile hè hè.mpg" but the "hè" in the two
created files resulted in two different encodings.
The problem is that the specified file name on the command line does NOT
correspond to the actual file name in the file system. One may say that
we don't care since this is a temporary log file.
But there is a real problem when the non-ASCII character is in the name
of the directory for all files. In that case, ffmpeg transforms the
directory name and the resulting path is invalid since the transformed
path uses a non-existent directory.
Error resulting from option -passlogfile D:\Public\Videos\DVD\hè\fflog
(assuming that the directory D:\Public\Videos\DVD\hè does exist and
contains all files);
Cannot write log file 'D:\Public\Videos\DVD\hè\fflog-0.log' for pass-1 encoding: No such file or directory
Interestingly, the characters in the error message are correct. So, you do
not understand why this failed. This is only after a test with an accent
in the file name but none in the directory name that I discovered the
transformation.
Is this known? Shall I open a bug report for that?
Best regards,
-Thierry
More information about the ffmpeg-user
mailing list