tanersener / mobile-ffmpeg

FFmpeg for Android, iOS and tvOS. Not maintained anymore. Superseded by FFmpegKit.
https://tanersener.github.io/mobile-ffmpeg
GNU General Public License v3.0
3.87k stars 791 forks source link

[iOS] rtsp not working #256

Closed kapalzi closed 5 years ago

kapalzi commented 5 years ago

ERROR: rtsp://xxxx:xxxx@[ip address]/onvif1: Protocol not found 2019-10-22 15:14:55.556154+0200 CameraPrototype[28889:4365892] ERROR: Did you mean file:rtsp://xxxx:xxxx@[ip address]/onvif1 2019-10-22 15:14:55.556420+0200 CameraPrototype[28889:4365892] :

My code is : MobileFFmpeg.execute("-i (self.cameraURI) -vcodec libx264 -maxrate 2000k -bufsize 2000k -acodec libmp3lame -ar 44100 -b:a 128k -f flv (self.serverURL)")

Environment

tanersener commented 5 years ago

Can you please provide console logs and full command without variables?

kapalzi commented 5 years ago

MobileFFmpeg.execute("-i rtsp://admin:304a26583183@192.168.200.1:554/onvif1 -vcodec h264 -maxrate 2000k -bufsize 2000k -acodec libmp3lame -ar 44100 -b:a 128k -f flv rtmp://[myserverip]/live")

I changed libx264 to h264 because it worked in Your example app. In my swift app still not working. All console logs are already provided.

tanersener commented 5 years ago

I changed libx264 to h264 because it worked in Your example app. In my swift app still not working.

Which mobile-ffmpeg package do you use? If you are using a custom build, can you please explain which parameters/arguments are used to compile that build?

All console logs are already provided.

I only see the following two lines. I need to see full log to make a comment.

ERROR: rtsp://xxxx:xxxx@[ip address]/onvif1: Protocol not found 2019-10-22 15:14:55.556154+0200 CameraPrototype[28889:4365892] ERROR: Did you mean file:rtsp://xxxx:xxxx@[ip address]/onvif1 2019-10-22 15:14:55.556420+0200 CameraPrototype[28889:4365892] :

kapalzi commented 5 years ago

I uninstalled MobileVLCKit from my project and now everything is working.

I use mobile-ffmpeg-min, also tried full and full gpl.

Here are logs if you still want to see them. 2019-10-23 08:08:53.771153+0200 CameraPrototype[30890:4525205] creating player instance using shared library 2019-10-23 08:09:38.848024+0200 CameraPrototype[30890:4525205] Loaded mobile-ffmpeg-min-arm64-4.2.2-20190703 2019-10-23 08:09:38.849226+0200 CameraPrototype[30890:4525251] INFO: ffmpeg version v4.2-dev-1824 2019-10-23 08:09:38.849453+0200 CameraPrototype[30890:4525251] INFO: Copyright (c) 2000-2019 the FFmpeg developers 2019-10-23 08:09:38.849839+0200 CameraPrototype[30890:4525251] INFO: 2019-10-23 08:09:38.850075+0200 CameraPrototype[30890:4525251] INFO: built with Apple LLVM version 10.0.1 (clang-1001.0.46.4) 2019-10-23 08:09:38.850357+0200 CameraPrototype[30890:4525251] INFO: configuration: --sysroot=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.2.sdk --prefix=/Users/taner/Projects/mobile-ffmpeg/prebuilt/ios-arm64-apple-darwin/ffmpeg --enable-version3 --arch=aarch64 --cpu=armv8 --target-os=darwin --ar=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ar --cc=clang --cxx=clang++ --as='/Users/taner/Projects/mobile-ffmpeg/.tmp/gas-preprocessor.pl -arch aarch64 -- clang -arch arm64 -target aarch64-ios-darwin -march=armv8-a+crc+crypto -mcpu=generic -DMOBILE_FFMPEG_ARM64 -Wno-unused-function -Wno-deprecated-declarations -fstrict-aliasing -fembed-bitcode -DIOS -DMOBILE_FFMPEG_BUILD_DATE=20190703 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.2.sdk -Oz -miphoneos-version-min=12.1 -I/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.2.sdk/usr/include' --ranlib=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib --strip=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/strip --enable-neon --enable-cross-compile --enable-pic --enable-asm --enable-inline-asm --enable-optimizations --enable-swscale --enable-static --disable-shared --enable-small --disable-v4l2-m2m --disable-outdev=v4l2 --disable-outdev=fbdev --disable-indev=v4l2 --disable-indev=fbdev --disable-openssl --disable-xmm-clobber-test --disable-debug --disable-neon-clobber-test --disable-programs --disable-postproc --disable-doc --disable-htmlpages --disable-manpages --disable-podpages --disable-txtpages --disable-sndio --disable-schannel --disable-securetransport --disable-xlib --disable-cuda --disable-cuvid --disable-nvenc --disable-vaapi --disable-vdpau --disable-appkit --disable-alsa --disable-cuda --disable-cuvid --disable-nvenc --disable-vaapi --disable-vdpau --disable-iconv --disable-sdl2 --enable-zlib --enable-audiotoolbox --enable-coreimage --enable-bzlib --enable-videotoolbox --enable-avfoundation 2019-10-23 08:09:38.852117+0200 CameraPrototype[30890:4525251] INFO: WARNING: library configuration mismatch 2019-10-23 08:09:38.852306+0200 CameraPrototype[30890:4525251] INFO: avutil configuration: --extra-ldflags='-arch arm64 -Wl,-ios_version_min,8.4 -L/Users/jenkins/workspace/vlc-release/macosx/vlc-release-MobileVLCKit/libvlc/vlc/contrib/iPhone-aarch64-apple-darwin14-aarch64/lib -arch arm64 -Wl,-ios_version_min,8.4' --cc=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang --pkg-config=pkg-config --disable-doc --disable-encoder=vorbis --disable-decoder=opus --enable-libgsm --disable-decoder=mlp --disable-demuxer=mlp --disable-parser=mlp --disable-debug --disable-avdevice --disable-devices --disable-avfilter --disable-filters --disable-protocol=concat --disable-bsfs --disable-bzlib --disable-libvpx --disable-avresample --enable-bsf=vp9_superframe --disable-swresample --disable-iconv --disable-avisynth --disable-nvenc --disable-linux-perf --disable-securetransport --enable-libopenjpeg --enable-libmp3lame --enable-cross-compile --disable-programs --arch=aarch64 --arch=aarch64 --target-os=darwin --disable-lzma --enable-pic --extra-ldflags='-arch arm64 -miphoneos-version-min=8.4 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.4.sdk -arch arm64 -O3 -g -miphoneos-version-min=8.4 -arch arm64 -miphoneos-version-min=8.4 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.4.sdk -arch arm64 -O3 -g -miphoneos-version-min=8.4 -I/Users/jenkins/workspace/vlc-release/macosx/vlc-release-MobileVLCKit/libvlc/vlc/contrib/iPhone-aarch64-apple-darwin14-aarch64/include -g -O2 -I/Users/jenkins/workspace/vlc-release/macosx/vlc-release-MobileVLCKit/libvlc/vlc/contrib/iPhone-aarch64-apple-darwin14-aarch64/include' --enable-pthreads --nm= --ar=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ar --prefix=/Users/jenkins/workspace/vlc-release/macosx/vlc-release-MobileVLCKit/libvlc/vlc/contrib/iPhone-aarch64-apple-darwin14-aarch64 --enable-static --disable-shared 2019-10-23 08:09:38.853284+0200 CameraPrototype[30890:4525251] INFO: avcodec configuration: --extra-ldflags='-arch arm64 -Wl,-ios_version_min,8.4 -L/Users/jenkins/workspace/vlc-release/macosx/vlc-release-MobileVLCKit/libvlc/vlc/contrib/iPhone-aarch64-apple-darwin14-aarch64/lib -arch arm64 -Wl,-ios_version_min,8.4' --cc=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang --pkg-config=pkg-config --disable-doc --disable-encoder=vorbis --disable-decoder=opus --enable-libgsm --disable-decoder=mlp --disable-demuxer=mlp --disable-parser=mlp --disable-debug --disable-avdevice --disable-devices --disable-avfilter --disable-filters --disable-protocol=concat --disable-bsfs --disable-bzlib --disable-libvpx --disable-avresample --enable-bsf=vp9_superframe --disable-swresample --disable-iconv --disable-avisynth --disable-nvenc --disable-linux-perf --disable-securetransport --enable-libopenjpeg --enable-libmp3lame --enable-cross-compile --disable-programs --arch=aarch64 --arch=aarch64 --target-os=darwin --disable-lzma --enable-pic --extra-ldflags='-arch arm64 -miphoneos-version-min=8.4 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.4.sdk -arch arm64 -O3 -g -miphoneos-version-min=8.4 -arch arm64 -miphoneos-version-min=8.4 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.4.sdk -arch arm64 -O3 -g -miphoneos-version-min=8.4 -I/Users/jenkins/workspace/vlc-release/macosx/vlc-release-MobileVLCKit/libvlc/vlc/contrib/iPhone-aarch64-apple-darwin14-aarch64/include -g -O2 -I/Users/jenkins/workspace/vlc-release/macosx/vlc-release-MobileVLCKit/libvlc/vlc/contrib/iPhone-aarch64-apple-darwin14-aarch64/include' --enable-pthreads --nm= --ar=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ar --prefix=/Users/jenkins/workspace/vlc-release/macosx/vlc-release-MobileVLCKit/libvlc/vlc/contrib/iPhone-aarch64-apple-darwin14-aarch64 --enable-static --disable-shared 2019-10-23 08:09:38.855780+0200 CameraPrototype[30890:4525251] INFO: avformat configuration: --extra-ldflags='-arch arm64 -Wl,-ios_version_min,8.4 -L/Users/jenkins/workspace/vlc-release/macosx/vlc-release-MobileVLCKit/libvlc/vlc/contrib/iPhone-aarch64-apple-darwin14-aarch64/lib -arch arm64 -Wl,-ios_version_min,8.4' --cc=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang --pkg-config=pkg-config --disable-doc --disable-encoder=vorbis --disable-decoder=opus --enable-libgsm --disable-decoder=mlp --disable-demuxer=mlp --disable-parser=mlp --disable-debug --disable-avdevice --disable-devices --disable-avfilter --disable-filters --disable-protocol=concat --disable-bsfs --disable-bzlib --disable-libvpx --disable-avresample --enable-bsf=vp9_superframe --disable-swresample --disable-iconv --disable-avisynth --disable-nvenc --disable-linux-perf --disable-securetransport --enable-libopenjpeg --enable-libmp3lame --enable-cross-compile --disable-programs --arch=aarch64 --arch=aarch64 --target-os=darwin --disable-lzma --enable-pic --extra-ldflags='-arch arm64 -miphoneos-version-min=8.4 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.4.sdk -arch arm64 -O3 -g -miphoneos-version-min=8.4 -arch arm64 -miphoneos-version-min=8.4 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.4.sdk -arch arm64 -O3 -g -miphoneos-version-min=8.4 -I/Users/jenkins/workspace/vlc-release/macosx/vlc-release-MobileVLCKit/libvlc/vlc/contrib/iPhone-aarch64-apple-darwin14-aarch64/include -g -O2 -I/Users/jenkins/workspace/vlc-release/macosx/vlc-release-MobileVLCKit/libvlc/vlc/contrib/iPhone-aarch64-apple-darwin14-aarch64/include' --enable-pthreads --nm= --ar=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ar --prefix=/Users/jenkins/workspace/vlc-release/macosx/vlc-release-MobileVLCKit/libvlc/vlc/contrib/iPhone-aarch64-apple-darwin14-aarch64 --enable-static --disable-shared 2019-10-23 08:09:38.856822+0200 CameraPrototype[30890:4525251] INFO: swscale configuration: --extra-ldflags='-arch arm64 -Wl,-ios_version_min,8.4 -L/Users/jenkins/workspace/vlc-release/macosx/vlc-release-MobileVLCKit/libvlc/vlc/contrib/iPhone-aarch64-apple-darwin14-aarch64/lib -arch arm64 -Wl,-ios_version_min,8.4' --cc=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang --pkg-config=pkg-config --disable-doc --disable-encoder=vorbis --disable-decoder=opus --enable-libgsm --disable-decoder=mlp --disable-demuxer=mlp --disable-parser=mlp --disable-debug --disable-avdevice --disable-devices --disable-avfilter --disable-filters --disable-protocol=concat --disable-bsfs --disable-bzlib --disable-libvpx --disable-avresample --enable-bsf=vp9_superframe --disable-swresample --disable-iconv --disable-avisynth --disable-nvenc --disable-linux-perf --disable-securetransport --enable-libopenjpeg --enable-libmp3lame --enable-cross-compile --disable-programs --arch=aarch64 --arch=aarch64 --target-os=darwin --disable-lzma --enable-pic --extra-ldflags='-arch arm64 -miphoneos-version-min=8.4 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.4.sdk -arch arm64 -O3 -g -miphoneos-version-min=8.4 -arch arm64 -miphoneos-version-min=8.4 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.4.sdk -arch arm64 -O3 -g -miphoneos-version-min=8.4 -I/Users/jenkins/workspace/vlc-release/macosx/vlc-release-MobileVLCKit/libvlc/vlc/contrib/iPhone-aarch64-apple-darwin14-aarch64/include -g -O2 -I/Users/jenkins/workspace/vlc-release/macosx/vlc-release-MobileVLCKit/libvlc/vlc/contrib/iPhone-aarch64-apple-darwin14-aarch64/include' --enable-pthreads --nm= --ar=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ar --prefix=/Users/jenkins/workspace/vlc-release/macosx/vlc-release-MobileVLCKit/libvlc/vlc/contrib/iPhone-aarch64-apple-darwin14-aarch64 --enable-static --disable-shared 2019-10-23 08:09:38.857484+0200 CameraPrototype[30890:4525251] INFO: libavutil 56. 30.100 / 56. 5.100 2019-10-23 08:09:38.857657+0200 CameraPrototype[30890:4525251] INFO: libavcodec 58. 53.101 / 58. 6.103 2019-10-23 08:09:38.857784+0200 CameraPrototype[30890:4525251] INFO: libavformat 58. 28.101 / 58. 3.100 2019-10-23 08:09:38.857922+0200 CameraPrototype[30890:4525251] INFO: libavdevice 58. 7.100 / 58. 7.100 2019-10-23 08:09:38.858086+0200 CameraPrototype[30890:4525251] INFO: libavfilter 7. 55.100 / 7. 55.100 2019-10-23 08:09:38.858216+0200 CameraPrototype[30890:4525251] INFO: libswscale 5. 4.101 / 5. 0.101 2019-10-23 08:09:38.858432+0200 CameraPrototype[30890:4525251] INFO: libswresample 3. 4.100 / 3. 4.100 2019-10-23 08:09:38.858558+0200 CameraPrototype[30890:4525251] ERROR: rtsp://admin:304a52359183@192.168.200.1:554/onvif1: Protocol not found 2019-10-23 08:09:38.858673+0200 CameraPrototype[30890:4525251] ERROR: Did you mean file:rtsp://admin:304a52359183@192.168.200.1:554/onvif1? 2019-10-23 08:09:38.859701+0200 CameraPrototype[30890:4525251] :

tanersener commented 5 years ago

According to your logs MobileVLCKit is still used by your application. The following paths show that MobileVLCKit libraries are loaded instead of MobileFFmpeg. This is the cause of your Protocol not found errors. You need to fix that.

-L/Users/jenkins/workspace/vlc-release/macosx/vlc-release-MobileVLCKit/libvlc/vlc/contrib/iPhone-aarch64-apple-darwin14-aarch64/lib`
--prefix=/Users/jenkins/workspace/vlc-release/macosx/vlc-release-MobileVLCKit/libvlc/vlc/contrib/iPhone-aarch64-apple-darwin14-aarch64

If you want to use MobileVLCKit in your application, Wiki has a detailed Using Multiple FFmpeg Implementations In The Same iOS Application page. It contains a section on how to use MobileVLCKit with MobileFFmpeg.

tanersener commented 5 years ago

@kapalzi Any update on this?

kapalzi commented 5 years ago

@tanersener I uninstalled MobileVLCKit from my project and now everything is working.

tanersener commented 5 years ago

@kapalzi Thanks for the update 👍