MobileVLCKit iOS相机视频" VLC无法打开MRL"错误

时间:2016-07-28 11:22:15

标签: ios vlc libvlc

我在iOS项目中集成了MobileVLCKit版本:2.2.2。从Camera Roll播放本地视频时遇到问题。文档目录和流媒体中的视频工作正常。

我正在使用此代码提取PHAsset对象的网址:

- (void)urlForPhAsset:(PHAsset*)phAsset withCompletionBlock:(void (^)(NSURL* url))completionBlock{
    [[PHImageManager defaultManager] requestAVAssetForVideo:phAsset options:nil resultHandler:^(AVAsset * _Nullable asset, AVAudioMix * _Nullable audioMix, NSDictionary * _Nullable info) {
        NSURL* url= nil;
        if([asset isKindOfClass:[AVURLAsset class]]){
            url= [(AVURLAsset *)asset URL];
        }else if([asset isKindOfClass:[AVComposition class]]){
            AVCompositionTrack* compositionTrack= [[(AVComposition*)asset tracks] firstObject];
            AVCompositionTrackSegment* segment= [[compositionTrack segments] firstObject];
            url= [segment sourceURL];
        }
        completionBlock(url);
    }];
}

这些是播放器中显示的提醒:

Your input can't be opened
VLC is unable to open the MRL 'file:///var/mobile/Media/DCIM/102APPLE/IMG2728.MOV'. 
Check the log for details.


File reading failed
VLC could not open the file "/VLC/mobile/Media/DCIM/102APPLE/IMG_2728.MOV" 
(Operation not permitted).

enter image description here enter image description here

以下是我使用-vvvv选项后的日志:

creating player instance with private library as options were given
[000000015e6cf238] core libvlc debug: VLC media player - 2.2.2 Weatherwax
[000000015e6cf238] core libvlc debug: Copyright © 1996-2016 the VideoLAN team
[000000015e6cf238] core libvlc debug: revision 2.2.2-18-gf8b3bf0
[000000015e6cf238] core libvlc debug: configured with /Users/fkuehne/Desktop/VLCKit/MobileVLCKit/ImportedSources/vlc/configure  '--prefix=/Users/fkuehne/Desktop/VLCKit/MobileVLCKit/ImportedSources/vlc/install-ios-OS/arm64' '--host=arm-apple-darwin11' '--with-contrib=/Users/fkuehne/Desktop/VLCKit/MobileVLCKit/ImportedSources/vlc/contrib/arm-apple-darwin11-arm64' '--enable-static' '--disable-debug' '--enable-dvbpsi' '--enable-avcodec' '--disable-macosx' '--disable-macosx-dialog-provider' '--disable-macosx-qtkit' '--disable-macosx-eyetv' '--disable-macosx-vlc-app' '--disable-macosx-avfoundation' '--disable-audioqueue' '--disable-shared' '--enable-macosx-quartztext' '--enable-mkv' '--enable-opus' '--disable-faad' '--disable-lua' '--disable-a52' '--enable-fribidi' '--disable-qt' '--disable-skins2' '--disable-vcd' '--disable-vlc' '--disable-vlm' '--disable-httpd' '--disable-nls' '--disable-glx' '--disable-sse' '--enable-neon' '--disable-notify' '--enable-live555' '--enable-realrtsp' '--enable-swscale' '--disable-projectm' '--enable-libass' '--enable-libxml2' '--disable-goom' '--disable-dvdread' '--disable-dvdnav' '--disable-bluray' '--disable-linsys' '--disable-libva' '--disable-gme' '--disable-tremor' '--enable-vorbis' '--disable-fluidsynth' '--disable-jack' '--disable-pulse' '--disable-mtp' '--enable-ogg' '--enable-speex' '--enable-theora' '--enable-flac' '--disable-screen' '--enable-freetype' '--enable-taglib' '--disable-mmx' '--disable-addonmanagermodules' '--disable-mad' 'host_alias=arm-apple-darwin11' 'CC=xcrun clang' 'CFLAGS=-isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.2.sdk -arch arm64 -O3 -g -miphoneos-version-min=7.0' 'LDFLAGS=-L/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.2.sdk/usr/lib -arch arm64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.2.sdk -Wl,-ios_version_min,7.0' 'CPPFLAGS=-isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.2.sdk -arch arm64 -O3 -g -miphoneos-version-min=7.0' 'CPP=xcrun cc -E' 'CXX=xcrun clang++' 'CXXFLAGS=-isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.2.sdk -arch arm64 -O3 -g -miphoneos-version-min=7.0 -stdlib=libstdc++' 'OBJC=xcrun clang' 'CCAS=gas-preprocessor.pl xcrun clang' 'CXXCPP=xcrun c++ -E' 'AVCODEC_CFLAGS=-I/Users/fkuehne/Desktop/VLCKit/MobileVLCKit/ImportedSources/vlc/install-ios-OS/arm64/include ' 'AVCODEC_LIBS=-L/Users/fkuehne/Desktop/VLCKit/MobileVLCKit/ImportedSources/vlc/install-ios-OS/arm64/lib -lavcodec -lavutil -lz' 'AVFORMAT_CFLAGS=-I/Users/fkuehne/Desktop/VLCKit/MobileVLCKit/ImportedSources/vlc/install-ios-OS/arm64/include' 'AVFORMAT_LIBS=-L/Users/fkuehne/Desktop/VLCKit/MobileVLCKit/ImportedSources/vlc/install-ios-OS/arm64/lib -lavcodec -lz -lavutil -lavformat'
[000000015e6cf238] core libvlc debug: plug-ins loaded: 217 modules
[000000015e6cf238] core libvlc debug: translation test: code is "C"
[000000015e6cf238] core libvlc debug: CPU has capabilities FPU 
[000000015f9aab18] core playlist debug: creating audio output
[000000015f9aaf38] core audio output debug: looking for audio output module matching "any": 3 candidates
[000000015f9aaf38] core audio output debug: using audio output module "audiounit_ios"
[000000015f9aab18] core playlist debug: keeping audio output
[000000015f9792a8] core interface debug: looking for interface module matching "ios_dialog_provider,none": 1 candidates
[000000015f9792a8] ios_dialog_provider interface debug: iOS dialog provider initialised
[000000015f9792a8] core interface debug: using interface module "ios_dialog_provider"
[000000015e61f258] core generic error: option marq-color does not exist
[000000015e61f258] core generic error: option marq-opacity does not exist
[000000015e61f258] core generic error: option marq-position does not exist
[000000015e61f258] core generic error: option marq-refresh does not exist
[000000015e61f258] core generic error: option marq-size does not exist
[000000015e61f258] core generic error: option marq-timeout does not exist
[000000015e61f258] core generic error: option marq-x does not exist
[000000015e61f258] core generic error: option marq-y does not exist
[000000015e61f258] core generic debug: creating audio output
[000000015e6cf4c8] core audio output debug: looking for audio output module matching "any": 3 candidates
[000000015e6cf4c8] core audio output debug: using audio output module "audiounit_ios"
[000000015e61f258] core generic debug: keeping audio output
[00000001701d3078] core input debug: Creating an input for 'IMG_2728.MOV'
[00000001701d3078] core input debug: using timeshift granularity of 50 MiB, in path '/tmp'
[00000001701d3078] core input debug: `file:///var/mobile/Media/DCIM/102APPLE/IMG_2728.MOV' gives access `file' demux `' path `/var/mobile/Media/DCIM/102APPLE/IMG_2728.MOV'
[00000001701d3078] core input debug: specified demux `any'
[00000001701d3078] core input debug: creating demux: access='file' demux='any' location='/var/mobile/Media/DCIM/102APPLE/IMG_2728.MOV' file='/var/mobile/Media/DCIM/102APPLE/IMG_2728.MOV'
[000000015e6cf7a8] core demux debug: looking for access_demux module matching "file": 4 candidates
[000000015e6cf7a8] core demux debug: no access_demux modules matched
[00000001701d3078] core input debug: creating access 'file' location='/var/mobile/Media/DCIM/102APPLE/IMG_2728.MOV', path='/var/mobile/Media/DCIM/102APPLE/IMG_2728.MOV'
[000000015f99d0b8] core access debug: looking for access module matching "file": 15 candidates
[000000015f99d0b8] filesystem access debug: opening file `/var/mobile/Media/DCIM/102APPLE/IMG_2728.MOV'
[000000015f99d0b8] filesystem access error: cannot open file /var/mobile/Media/DCIM/102APPLE/IMG_2728.MOV (Operation not permitted)
[000000015f99d0b8] core access debug: no access modules matched
[00000001701d3078] core input error: open of `file:///var/mobile/Media/DCIM/102APPLE/IMG_2728.MOV' failed

如果有其他人遇到类似问题,请帮助。

0 个答案:

没有答案
相关问题