#1253 closed defect (worksforme)
FFMpeg don't handle files with some characters
Reported by: | Uno | Owned by: | |
---|---|---|---|
Priority: | normal | Component: | ffmpeg |
Version: | 0.10.2 | Keywords: | |
Cc: | Blocked By: | ||
Blocking: | Reproduced by developer: | no | |
Analyzed by developer: | no |
Description
There is no way to make FFMpeg use files with ':' character in filename; neither in the input nor in the output.
ffmpeg -i file\:name.wav file\:name.mp3
ffmpeg -i "file:name.wav" "file:name.mp3"
Reproducible always. Tried the same version of ffmpeg (0.10.2) on both x86 and AMD64.
OS: Gentoo AMD64/Gentoo x86
Called from BASH.
Change History (9)
comment:1 by , 13 years ago
Keywords: | filename characters removed |
---|---|
Resolution: | → worksforme |
Status: | new → closed |
comment:2 by , 13 years ago
Resolution: | worksforme |
---|---|
Status: | closed → reopened |
[user@pc ~/]$ touch hello\:goofy.avi [user@pc ~/]$ ls -l totale 0 -rw-r--r-- 1 user user 0 26 apr 01.15 hello:goofy.avi [user@pc ~/]$ ffmpeg -i hello\:goofy.avi ffmpeg version 0.10.2 Copyright (c) 2000-2012 the FFmpeg developers built on Apr 10 2012 13:39:02 with gcc 4.5.3 configuration: --prefix=/usr --libdir=/usr/lib64 --shlibdir=/usr/lib64 --mandir=/usr/share/man --enable-shared --cc=x86_64-pc-linux-gnu-gcc --cxx=x86_64-pc-linux-gnu-g++ --ar=x86_64-pc-linux-gnu-ar --optflags='-march=amdfam10 -msse4a -mabm -O2 -pipe -fomit-frame-pointer' --extra-cflags='-march=amdfam10 -msse4a -mabm -O2 -pipe -fomit-frame-pointer' --extra-cxxflags='-march=amdfam10 -msse4a -mabm -O2 -pipe -fomit-frame-pointer' --disable-static --enable-gpl --enable-version3 --enable-postproc --enable-avfilter --disable-stripping --disable-debug --disable-doc --disable-network --enable-libmp3lame --enable-libvo-aacenc --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libxvid --disable-indev=v4l --disable-indev=oss --enable-x11grab --disable-outdev=oss --enable-libfreetype --disable-altivec --disable-avx --disable-mmx2 --disable-ssse3 --disable-vis --disable-neon --cpu=amdfam10 --enable-hardcoded-tables libavutil 51. 35.100 / 51. 35.100 libavcodec 53. 61.100 / 53. 61.100 libavformat 53. 32.100 / 53. 32.100 libavdevice 53. 4.100 / 53. 4.100 libavfilter 2. 61.100 / 2. 61.100 libswscale 2. 1.100 / 2. 1.100 libswresample 0. 6.100 / 0. 6.100 libpostproc 52. 0.100 / 52. 0.100 hello:goofy.avi: No such file or directory [user@pc ~/]$ ffmpeg -i "hello:goofy.avi" ffmpeg version 0.10.2 Copyright (c) 2000-2012 the FFmpeg developers built on Apr 10 2012 13:39:02 with gcc 4.5.3 configuration: --prefix=/usr --libdir=/usr/lib64 --shlibdir=/usr/lib64 --mandir=/usr/share/man --enable-shared --cc=x86_64-pc-linux-gnu-gcc --cxx=x86_64-pc-linux-gnu-g++ --ar=x86_64-pc-linux-gnu-ar --optflags='-march=amdfam10 -msse4a -mabm -O2 -pipe -fomit-frame-pointer' --extra-cflags='-march=amdfam10 -msse4a -mabm -O2 -pipe -fomit-frame-pointer' --extra-cxxflags='-march=amdfam10 -msse4a -mabm -O2 -pipe -fomit-frame-pointer' --disable-static --enable-gpl --enable-version3 --enable-postproc --enable-avfilter --disable-stripping --disable-debug --disable-doc --disable-network --enable-libmp3lame --enable-libvo-aacenc --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libxvid --disable-indev=v4l --disable-indev=oss --enable-x11grab --disable-outdev=oss --enable-libfreetype --disable-altivec --disable-avx --disable-mmx2 --disable-ssse3 --disable-vis --disable-neon --cpu=amdfam10 --enable-hardcoded-tables libavutil 51. 35.100 / 51. 35.100 libavcodec 53. 61.100 / 53. 61.100 libavformat 53. 32.100 / 53. 32.100 libavdevice 53. 4.100 / 53. 4.100 libavfilter 2. 61.100 / 2. 61.100 libswscale 2. 1.100 / 2. 1.100 libswresample 0. 6.100 / 0. 6.100 libpostproc 52. 0.100 / 52. 0.100 hello:goofy.avi: No such file or directory
comment:3 by , 13 years ago
Resolution: | → worksforme |
---|---|
Status: | reopened → closed |
comment:4 by , 13 years ago
I'm using the official sources.
These are the sources: http://ffmpeg.org/releases/ffmpeg-0.10.2.tar.bz2
There are just 2 patch that are not involved in filename reading.
And it's the same on two machines.
CFLAGS="-march=amdfam10 -msse4a -mabm -O2 -pipe -fomit-frame-pointer"
and
CFLAGS="-march=pentium4 -O2 -pipe -fomit-frame-pointer -msse -msse2 -mmmx"
With the configuration arguments above.
$BASH_VERSION=4.2.20(1)-release
The patches:
Autodetect PowerPC vs. PowerPC64. This is the same code as for x86_64. This is necessary because uname returns PPC64 if the hardware is 64 bit, however the userland can still be fully 32 bit. In that case FFmpeg fails to compile because some macros in the asm code are set up incorrectly. For details see https://bugs.gentoo.org/show_bug.cgi?id=341235 https://bugs.gentoo.org/show_bug.cgi?id=387207 author: Reimar Döffinger <Reimar.Doeffinger@gmx.de> diff --git a/configure b/configure index 6aa194c..0752d73 100755 --- a/configure +++ b/configure @@ -2188,13 +2188,9 @@ case "$arch" in arch="parisc" subarch="parisc64" ;; - "Power Macintosh"|ppc|powerpc) + "Power Macintosh"|ppc|powerpc|ppc64|powerpc64) arch="ppc" ;; - ppc64|powerpc64) - arch="ppc" - subarch="ppc64" - ;; s390|s390x) arch="s390" ;; @@ -2392,6 +2388,11 @@ EOF spic=$shared fi ;; + ppc) + check_cc <<EOF && subarch="ppc64" + int test[(int)sizeof(char*) - 7]; +EOF + ;; esac enable $subarch commit cfec77aaf8186f556e1201be13ce487b99b3b831 Author: Anton Khirnov <anton@khirnov.net> Date: Sun Apr 1 18:56:26 2012 +0200 configure: add dl to frei0r extralibs. diff --git a/configure b/configure index 4606b23..e207ed8 100755 --- a/configure +++ b/configure @@ -1526,7 +1526,9 @@ cropdetect_filter_deps="gpl" delogo_filter_deps="gpl" drawtext_filter_deps="libfreetype" frei0r_filter_deps="frei0r dlopen" +frei0r_filter_extralibs='$ldl' frei0r_src_filter_deps="frei0r dlopen" +frei0r_src_filter_extralibs='$ldl' hqdn3d_filter_deps="gpl" ocv_filter_deps="libopencv" scale_filter_deps="swscale"
follow-up: 6 comment:5 by , 13 years ago
Did you already test the following?
$ ffmpeg -i file:hello\:goofy.avi
follow-up: 7 comment:6 by , 13 years ago
Replying to cehoyos:
Did you already test the following?
$ ffmpeg -i file:hello\:goofy.avi
It works! But shouldn't it work also without the "file:" prefix?
[user@pc ~/]$ ffmpeg -i file:hello\:goofy.avi ciao.mp3 ffmpeg version 0.10.2 Copyright (c) 2000-2012 the FFmpeg developers built on Apr 10 2012 13:39:02 with gcc 4.5.3 configuration: --prefix=/usr --libdir=/usr/lib64 --shlibdir=/usr/lib64 --mandir=/usr/share/man --enable-shared --cc=x86_64-pc-linux-gnu-gcc --cxx=x86_64-pc-linux-gnu-g++ --ar=x86_64-pc-linux-gnu-ar --optflags='-march=amdfam10 -msse4a -mabm -O2 -pipe -fomit-frame-pointer' --extra-cflags='-march=amdfam10 -msse4a -mabm -O2 -pipe -fomit-frame-pointer' --extra-cxxflags='-march=amdfam10 -msse4a -mabm -O2 -pipe -fomit-frame-pointer' --disable-static --enable-gpl --enable-version3 --enable-postproc --enable-avfilter --disable-stripping --disable-debug --disable-doc --disable-network --enable-libmp3lame --enable-libvo-aacenc --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libxvid --disable-indev=v4l --disable-indev=oss --enable-x11grab --disable-outdev=oss --enable-libfreetype --disable-altivec --disable-avx --disable-mmx2 --disable-ssse3 --disable-vis --disable-neon --cpu=amdfam10 --enable-hardcoded-tables libavutil 51. 35.100 / 51. 35.100 libavcodec 53. 61.100 / 53. 61.100 libavformat 53. 32.100 / 53. 32.100 libavdevice 53. 4.100 / 53. 4.100 libavfilter 2. 61.100 / 2. 61.100 libswscale 2. 1.100 / 2. 1.100 libswresample 0. 6.100 / 0. 6.100 libpostproc 52. 0.100 / 52. 0.100 Input #0, flv, from 'file:hello:goofy.avi': Metadata: starttime : 0 totalduration : 194 totaldatarate : 879 bytelength : 21374995 canseekontime : true sourcedata : BADC202A2HH1333452315075619 purl : pmsg : Duration: 00:03:14.48, start: 0.000000, bitrate: 879 kb/s Stream #0:0: Video: h264 (Main), yuv420p, 640x360 [SAR 1:1 DAR 16:9], 792 kb/s, 25 tbr, 1k tbn, 50 tbc Stream #0:1: Audio: aac, 44100 Hz, stereo, s16, 99 kb/s Output #0, mp3, to 'ciao.mp3': Metadata: starttime : 0 totalduration : 194 totaldatarate : 879 bytelength : 21374995 canseekontime : true sourcedata : BADC202A2HH1333452315075619 purl : pmsg : TSSE : Lavf53.32.100 Stream #0:0: Audio: mp3, 44100 Hz, stereo, s16, 128 kb/s Stream mapping: Stream #0:1 -> #0:0 (aac -> libmp3lame) Press [q] to stop, [?] for help size= 3040kB time=00:03:14.50 bitrate= 128.0kbits/s video:0kB audio:3039kB global headers:0kB muxing overhead 0.021786%
follow-up: 8 comment:7 by , 13 years ago
Replying to Uno:
Replying to cehoyos:
Did you already test the following?
$ ffmpeg -i file:hello\:goofy.avi
It works! But shouldn't it work also without the "file:" prefix?
No. In ffmpeg, a filename is structured like [protocol:]filename
A protocol says how to interpret the filename which follows. Examples of protocols are file:, pipe:, http:, udp: and rtp:. As a special case, single letter protocols, like c:, are interpreted as a Windows drive letter.
So, in your example, ffmpeg was looking for a protocol named "hello:", and when it couldn't find one by that name, it printed an error message.
follow-up: 9 comment:8 by , 13 years ago
Replying to mjs973:
Replying to Uno:
Replying to cehoyos:
Did you already test the following?
$ ffmpeg -i file:hello\:goofy.avi
It works! But shouldn't it work also without the "file:" prefix?
No. In ffmpeg, a filename is structured like [protocol:]filename
A protocol says how to interpret the filename which follows. Examples of protocols are file:, pipe:, http:, udp: and rtp:. As a special case, single letter protocols, like c:, are interpreted as a Windows drive letter.
So, in your example, ffmpeg was looking for a protocol named "hello:", and when it couldn't find one by that name, it printed an error message.
I thought it should be that the reason, but shouldn't it answer: "hello: wrong protocol" instead of "hello:goofy.avi: No such file or directory"?
Like this, is a quite confusing...
However I suggest to the developers to treat the unknown protocol as probably file, so just then show an error message if missing!
Thanks for the explanation.
P.s.
Still a weird think: why does it works for "cehoyos"?
comment:9 by , 13 years ago
Replying to Uno:
However I suggest to the developers to treat the unknown protocol as probably file, so just then show an error message if missing!
Good idea. This is now in Git head:
bar:foo: Protocol not found
Works fine here, please reopen if you can provide ls output and complete, uncut ffmpeg -i file:filename.extension output.
For example: