Я пытаюсь записать файл .mp4 из источника rtsp на Android, используя библиотеку ffmpeg. Я включил разрешение на запись во внешнее хранилище, но получил «Отказано в доступе» из источника rtsp. Если я использую тот же источник на VL C, он работает.
I/FFmpeg: Loading FFmpeg for armv7 CPU
I/System.out: INIZIO
W/VRSystemServiceManager: vr service is not alive
I/HwSecImmHelper: mSecurityInputMethodService is null
I/HwPointEventFilter: support AFT
I/System.out: [/data/user/0/com.example.rtsp/files/ffmpeg, -i, rtsp://xxxxxxx:xxxxx@ipAddress:554/stream2, -acodec, copy, -vcodec, copy, /storage/emulated/0/Movies/recording1.mp4]
null
null
Calling by::className:com.github.hiteshsondhi88.libffmpeg.ShellCommand MethodName:run
I/OpenGLRenderer: Initialized EGL, version 1.4
W/linker: /vendor/lib64/libhwuibp.so: unused DT entry: type 0xf arg 0xe3a
I/System.out: PROGRESS: ffmpeg version n3.0.1 Copyright (c) 2000-2016 the FFmpeg developers
I/System.out: PROGRESS: built with gcc 4.8 (GCC)
PROGRESS: configuration: --target-os=linux --cross-prefix=/home/vagrant/SourceCode/ffmpeg-android/toolchain-android/bin/arm-linux-androideabi- --arch=arm --cpu=cortex-a8 --enable-runtime-cpudetect --sysroot=/home/vagrant/SourceCode/ffmpeg-android/toolchain-android/sysroot --enable-pic --enable-libx264 --enable-libass --enable-libfreetype --enable-libfribidi --enable-libmp3lame --enable-fontconfig --enable-pthreads --disable-debug --disable-ffserver --enable-version3 --enable-hardcoded-tables --disable-ffplay --disable-ffprobe --enable-gpl --enable-yasm --disable-doc --disable-shared --enable-static --pkg-config=/home/vagrant/SourceCode/ffmpeg-android/ffmpeg-pkg-config --prefix=/home/vagrant/SourceCode/ffmpeg-android/build/armeabi-v7a --extra-cflags='-I/home/vagrant/SourceCode/ffmpeg-android/toolchain-android/include -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fno-strict-overflow -fstack-protector-all' --extra-ldflags='-L/home/vagrant/SourceCode/ffmpeg-android/toolchain-android/lib -Wl,-z,relro -Wl,-z,now -pie' --extra-libs='-lpng -lexpat -lm' --extra-cxxflags=
PROGRESS: libavutil 55. 17.103 / 55. 17.103
PROGRESS: libavcodec 57. 24.102 / 57. 24.102
PROGRESS: libavformat 57. 25.100 / 57. 25.100
PROGRESS: libavdevice 57. 0.101 / 57. 0.101
PROGRESS: libavfilter 6. 31.100 / 6. 31.100
PROGRESS: libswscale 4. 0.100 / 4. 0.100
PROGRESS: libswresample 2. 0.101 / 2. 0.101
PROGRESS: libpostproc 54. 0.100 / 54. 0.100
PROGRESS: rtsp://xxxxxxx:xxxxx@ipAddress:554/stream2: Permission denied
I/System.out: FAIL: ffmpeg version n3.0.1 Copyright (c) 2000-2016 the FFmpeg developers
built with gcc 4.8 (GCC)
configuration: --target-os=linux --cross-prefix=/home/vagrant/SourceCode/ffmpeg-android/toolchain-android/bin/arm-linux-androideabi- --arch=arm --cpu=cortex-a8 --enable-runtime-cpudetect --sysroot=/home/vagrant/SourceCode/ffmpeg-android/toolchain-android/sysroot --enable-pic --enable-libx264 --enable-libass --enable-libfreetype --enable-libfribidi --enable-libmp3lame --enable-fontconfig --enable-pthreads --disable-debug --disable-ffserver --enable-version3 --enable-hardcoded-tables --disable-ffplay --disable-ffprobe --enable-gpl --enable-yasm --disable-doc --disable-shared --enable-static --pkg-config=/home/vagrant/SourceCode/ffmpeg-android/ffmpeg-pkg-config --prefix=/home/vagrant/SourceCode/ffmpeg-android/build/armeabi-v7a --extra-cflags='-I/home/vagrant/SourceCode/ffmpeg-android/toolchain-android/include -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fno-strict-overflow -fstack-protector-all' --extra-ldflags='-L/home/vagrant/SourceCode/ffmpeg-android/toolchain-android/lib -Wl,-z,relro -Wl,-z,now -pie' --extra-libs='-lpng -lexpat -lm' --extra-cxxflags=
libavutil 55. 17.103 / 55. 17.103
libavcodec 57. 24.102 / 57. 24.102
libavformat 57. 25.100 / 57. 25.100
libavdevice 57. 0.101 / 57. 0.101
libavfilter 6. 31.100 / 6. 31.100
libswscale 4. 0.100 / 4. 0.100
libswresample 2. 0.101 / 2. 0.101
libpostproc 54. 0.100 / 54. 0.100
rtsp://xxxxxxx:xxxxx@ipAddress/stream2: Permission denied
FINISH