#935 closed defect (fixed)
mov: error opening alias, while file exists
Reported by: | Alex Zhukov | Owned by: | |
---|---|---|---|
Priority: | normal | Component: | avformat |
Version: | git-master | Keywords: | mov |
Cc: | Blocked By: | ||
Blocking: | Reproduced by developer: | no | |
Analyzed by developer: | no |
Description
http://dl.dropbox.com/u/1109725/anonymous_theatrical_ref_1080p_2398_235.qt.gz
running ffmpeg -i on the file above wont find data file while the file actually exists and is readable
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7f959303ea00] stream 0, error opening alias: path='/ds1_z800/444_EXTRA_1/{AD0E35C8-8D66-4DF5-8764-9E1F7FFE6CF6}/ds$theatrical_235@1920x1080c1 - 5522aac8#0000cmp.gen', dir='{AD0E35C8-8D66-4DF5-8764-9E1F7FFE6CF6}', filename='ds$theatrical_235@1920x1080c1 - 5522aac8#0000cmp.gen', volume='*', nlvl_from=-1, nlvl_to=-1
ls -la '/ds1_z800/444_EXTRA_1/{AD0E35C8-8D66-4DF5-8764-9E1F7FFE6CF6}/ds$theatrical_235@1920x1080c1 - 5522aac8#0000cmp.gen'
-rwxr-xr-x 2 tl_audio_node staff 1551893467152 Dec 21 16:27 ds$theatrical_235@1920x1080c1 - 5522aac8#0000cmp.gen
tl-audio-node:~ tl_audio_node$ stat -x '/ds1_z800/444_EXTRA_1/{AD0E35C8-8D66-4DF5-8764-9E1F7FFE6CF6}/ds$theatrical_235@1920x1080c1 - 5522aac8#0000cmp.gen' File: "/ds1_z800/444_EXTRA_1/{AD0E35C8-8D66-4DF5-8764-9E1F7FFE6CF6}/ds$theatrical_235@1920x1080c1 - 5522aac8#0000cmp.gen" Size: 1551893467152 FileType: Regular File Mode: (0755/-rwxr-xr-x) Uid: ( 501/tl_audio_node) Gid: ( 20/ staff) Device: 14,26 Inode: 50 Links: 2 Access: Mon Dec 12 18:53:20 2011 Modify: Wed Dec 21 16:27:32 2011 Change: Tue Jan 3 09:20:15 2012
Attachments (1)
Change History (11)
comment:1 by , 13 years ago
comment:2 by , 13 years ago
ffmpeg -i anonymous_theatrical_ref_1080p_2398_235.qt ffmpeg version N-36981-g9e53f62 Copyright (c) 2000-2012 the FFmpeg developers built on Jan 21 2012 09:24:49 with llvm_gcc 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.1.00) configuration: --enable-libopenjpeg libavutil 51. 34.101 / 51. 34.101 libavcodec 53. 57.105 / 53. 57.105 libavformat 53. 30.100 / 53. 30.100 libavdevice 53. 4.100 / 53. 4.100 libavfilter 2. 59.101 / 2. 59.101 libswscale 2. 1.100 / 2. 1.100 libswresample 0. 6.100 / 0. 6.100 [mov,mp4,m4a,3gp,3g2,mj2 @ 0x7fe18983d800] stream 0, error opening alias: path='/ds1_z800/444_EXTRA_1/{AD0E35C8-8D66-4DF5-8764-9E1F7FFE6CF6}/ds$theatrical_235@1920x1080c1 - 5522aac8#0000cmp.gen', dir='{AD0E35C8-8D66-4DF5-8764-9E1F7FFE6CF6}', filename='ds$theatrical_235@1920x1080c1 - 5522aac8#0000cmp.gen', volume='*', nlvl_from=-1, nlvl_to=-1 [mov,mp4,m4a,3gp,3g2,mj2 @ 0x7fe18983d800] stream 1, error opening alias: path='/ds1_z800/dS1_LOCALSTORAGE1/{AD0E35C8-8D66-4DF5-8764-9E1F7FFE6CF6}/audcachebbaa9a7b.wav', dir='{AD0E35C8-8D66-4DF5-8764-9E1F7FFE6CF6}', filename='audcachebbaa9a7b.wav', volume='*', nlvl_from=-1, nlvl_to=-1 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'anonymous_theatrical_ref_1080p_2398_235.qt': Metadata: major_brand : qt minor_version : 537199360 compatible_brands: qt creation_time : 2012-01-12 18:33:16 Duration: 02:09:57.79, bitrate: 1 kb/s Stream #0:0(eng): Video: avrp (SUDS / 0x53445553), rgb48le, 1920x1080, 1590933 kb/s, 23.98 fps, 23.98 tbr, 24k tbn, 24k tbc Metadata: creation_time : 2012-01-12 18:33:16 handler_name : ?Apple Alias Data Handler Stream #0:1(eng): Audio: pcm_s24le (in24 / 0x34326E69), 48000 Hz, stereo, s32, 2304 kb/s Metadata: creation_time : 2012-01-12 18:34:27 handler_name : ?Apple Alias Data Handler At least one output file must be specified
comment:3 by , 13 years ago
Does it work if the referenced files are not in an absolute, but a relative path?
comment:4 by , 13 years ago
cd '/ds1_z800/444_EXTRA_1/{AD0E35C8-8D66-4DF5-8764-9E1F7FFE6CF6}/'
ffmpeg -i ~/ffmpeg/anonymous_theatrical_ref_1080p_2398_235.qt
same output
is this what you asked for?
comment:5 by , 13 years ago
The reference in the file you posted does not point to a relative location like
"go/from/this/directory/to/the/next"
but an absolute one
"/it/starts/from/root"
The mov demuxer does not support absolute paths because the developers think that would be a possible security issue, but this could be circumvented with a command line switch.
But I wonder if it works with relative paths, perhaps you could also provide the referenced files, that would make testing easier.
comment:6 by , 13 years ago
how can it be circumvented?
the following patch helped me
diff --git a/libavformat/mov.c b/libavformat/mov.c index 3bb42fe..a58aa6f 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -1933,6 +1933,8 @@ static void mov_build_index(MOVContext *mov, AVStream *st) static int mov_open_dref(AVIOContext **pb, const char *src, MOVDref *ref, AVIOInterruptCB *int_cb) { + int i_know_what_i_am_doing_flag = 1; //TODO: get it from command-line or somewhere else + /* try relative path, we do not try the absolute because it can leak information about our system to an attacker */ if (ref->nlvl_to > 0 && ref->nlvl_from > 0) { @@ -1969,6 +1971,10 @@ static int mov_open_dref(AVIOContext **pb, const char *src, MOVDref *ref, if (!avio_open2(pb, filename, AVIO_FLAG_READ, int_cb, NULL)) return 0; } + } else if (i_know_what_i_am_doing_flag) { + //if user explicitly asks for absolute paths - try opening + if (!avio_open2(pb, ref->path, AVIO_FLAG_READ, int_cb, NULL)) + return 0; } return AVERROR(ENOENT);
by , 13 years ago
Attachment: | patchmovabsolute.diff added |
---|
comment:7 by , 13 years ago
Component: | undetermined → avformat |
---|---|
Keywords: | mov added |
Status: | new → open |
Version: | unspecified → git-master |
Please test attached patch with ffmpeg -use_absolute_path 1 -i anonymous_theatrical_ref_1080p_2398_235.qt
comment:9 by , 13 years ago
Resolution: | → fixed |
---|---|
Status: | open → closed |
Should be fixed in current git head, thank you for testing!
comment:10 by , 11 years ago
Hi everyone,
I am new to ffmpeg and I recently ran into this same problem. Could some explain how to apply the patch? I am working on a windows static build here.
Thanks
Matt
Please add command line (ffmpeg -i file) together with complete, uncut console output.
Does it work if the referenced files are not in an absolute, but a relative path?