Closed JulioCRFilho closed 3 months ago
UDP is not supported on Android
, see #8
in Tips wiki. Can you try with TCP?
UDP is not supported on
Android
, see#8
in Tips wiki. Can you try with TCP?
I got another error saying Options rtsp_transport not found. I'm using the ffmpeg_kit_flutter_min_gpl, could it be the problem?
I/flutter (18338): Loading ffmpeg-kit-flutter. D/ffmpeg-kit-flutter(18338): FFmpegKitFlutterPlugin com.arthenica.ffmpegkit.flutter.FFmpegKitFlutterPlugin@c205f8c started listening to events on io.flutter.plugin.common.EventChannel$IncomingStreamRequestHandler$EventSinkImplementation@5d7c905. I/flutter (18338): Loaded ffmpeg-kit-flutter-android-min-gpl-arm64-v8a-6.0.3. I/flutter (18338): ffmpeg version n6.0 I/flutter (18338): Copyright (c) 2000-2023 the FFmpeg developers I/flutter (18338): I/flutter (18338): built with Android (7155654, based on r399163b1) clang version 11.0.5 (https://android.googlesource.com/toolchain/llvm-project 87f1315dfbea7c137aa2e6d362dbb457e388158d) I/flutter (18338): configuration: --cross-prefix=aarch64-linux-android- --sysroot=/Users/sue/Library/Android/sdk/ndk/22.1.7171670/toolchains/llvm/prebuilt/darwin-x86_64/sysroot --prefix=/Users/sue/Projects/arthenica/ffmpeg-kit/prebuilt/android-arm64/ffmpeg --pkg-config=/opt/homebrew/bin/pkg-config --enable-version3 --arch=aarch64 --cpu=armv8-a --target-os=android --enable-neon --enable-asm --enable-inline-asm --ar=aarch64-linux-android-ar --cc=aarch64-linux-android24-clang --cxx=aarch64-linux-android24-clang++ --ranlib=aarch64-linux-android-ranlib --strip=aarch64-linux-android-strip --nm=aarch64-linux-android-nm --extra-libs='-L/Users/sue/Projects/arthenica/ffmpeg-kit/prebuilt/android-arm64/cpu-features/lib -lndk_compat' --disable-autodetect --enable-cross-compile --enable-pic --enable-jni --enable-optimizations --enable-swscale --disable-static --enable-shared --enable-pthreads --enable-v4l2-m2m --disable-outdev=fbdev --disable-indev=fbdev --enable-small --disable-xmm-clobber-test --disable-debug --enable-lto --disable-neon I/flutter (18338): libavutil 58. 2.100 / 58. 2.100 I/flutter (18338): libavcodec 60. 3.100 / 60. 3.100 I/flutter (18338): libavformat 60. 3.100 / 60. 3.100 I/flutter (18338): libavdevice 60. 1.100 / 60. 1.100 I/flutter (18338): libavfilter 9. 3.100 / 9. 3.100 I/flutter (18338): libswscale 7. 1.100 / 7. 1.100 I/flutter (18338): libswresample 4. 10.100 / 4. 10.100 D/VendorTagDescriptor(18338): addVendorDescriptor: vendor tag id 14172875900359437128 added D/OpenGLRenderer(18338): CacheManager::trimMemory(5) I/flutter (18338): Option rtsp_transport not found.
I'm using the ffmpeg_kit_flutter_min_gpl, could it be the problem?
I'm not sure. I don't remember any library dependencies needed to make it work. Some options require gnutls
, but I don't think it's needed here. Could you test it with one of the full
packages?
I'm using the ffmpeg_kit_flutter_min_gpl, could it be the problem?
I'm not sure. I don't remember any library dependencies needed to make it work. Some options require
gnutls
, but I don't think it's needed here. Could you test it with one of thefull
packages?
I've tried with the ffmpeg_kit_flutter_full and ffmpeg_kit_flutter_full_gpl too. Still the same error in both:
I/flutter ( 7408): Loading ffmpeg-kit-flutter. D/ffmpeg-kit-flutter( 7408): FFmpegKitFlutterPlugin com.arthenica.ffmpegkit.flutter.FFmpegKitFlutterPlugin@767ba4a started listening to events on io.flutter.plugin.common.EventChannel$IncomingStreamRequestHandler$EventSinkImplementation@ebafbf1. I/flutter ( 7408): Loaded ffmpeg-kit-flutter-android-full-gpl-arm64-v8a-6.0.3. I/flutter ( 7408): ffmpeg version n6.0 I/flutter ( 7408): Copyright (c) 2000-2023 the FFmpeg developers I/flutter ( 7408): I/flutter ( 7408): built with Android (7155654, based on r399163b1) clang version 11.0.5 (https://android.googlesource.com/toolchain/llvm-project 87f1315dfbea7c137aa2e6d362dbb457e388158d) I/flutter ( 7408): configuration: --cross-prefix=aarch64-linux-android- --sysroot=/Users/sue/Library/Android/sdk/ndk/22.1.7171670/toolchains/llvm/prebuilt/darwin-x86_64/sysroot --prefix=/Users/sue/Projects/arthenica/ffmpeg-kit/prebuilt/android-arm64/ffmpeg --pkg-config=/opt/homebrew/bin/pkg-config --enable-version3 --arch=aarch64 --cpu=armv8-a --target-os=android --enable-neon --enable-asm --enable-inline-asm --ar=aarch64-linux-android-ar --cc=aarch64-linux-android24-clang --cxx=aarch64-linux-android24-clang++ --ranlib=aarch64-linux-android-ranlib --strip=aarch64-linux-android-strip --nm=aarch64-linux-android-nm --extra-libs='-L/Users/sue/Projects/arthenica/ffmpeg-kit/prebuilt/android-arm64/cpu-features/lib -lndk_compat' --disable-autodetect --enable-cross-compile --enable-pic --enable-jni --enable-optimizations --enable-swscale --disable-static --enable-shared --enable-pthreads --enable-v4l2-m2m --disable-outdev=fbdev --disable-indev=fbdev --enable-small --disable-xmm-clobber-test --disable-debug --enable-lto --disable-neon I/flutter ( 7408): libavutil 58. 2.100 / 58. 2.100 I/flutter ( 7408): libavcodec 60. 3.100 / 60. 3.100 I/flutter ( 7408): libavformat 60. 3.100 / 60. 3.100 I/flutter ( 7408): libavdevice 60. 1.100 / 60. 1.100 I/flutter ( 7408): libavfilter 9. 3.100 / 9. 3.100 I/flutter ( 7408): libswscale 7. 1.100 / 7. 1.100 I/flutter ( 7408): libswresample 4. 10.100 / 4. 10.100 I/flutter ( 7408): Option rtsp_transport not found. I/flutter ( 7408): falha!!
@tanersener I've tried removing the flag but still passing the RTSP and it doesn't show any errors, but the RTMP did that too. Anyway, no stream reaching youtube server...
I/flutter (10967): Loading ffmpeg-kit-flutter. D/ffmpeg-kit-flutter(10967): FFmpegKitFlutterPlugin com.arthenica.ffmpegkit.flutter.FFmpegKitFlutterPlugin@767ba4a started listening to events on io.flutter.plugin.common.EventChannel$IncomingStreamRequestHandler$EventSinkImplementation@ebafbf1. D/EGL_emulation(10967): app_time_stats: avg=56643.01ms min=6.09ms max=169769.95ms count=3 I/flutter (10967): Loaded ffmpeg-kit-flutter-android-full-gpl-arm64-v8a-6.0.3. I/flutter (10967): ffmpeg version n6.0 I/flutter (10967): Copyright (c) 2000-2023 the FFmpeg developers I/flutter (10967): I/flutter (10967): built with Android (7155654, based on r399163b1) clang version 11.0.5 (https://android.googlesource.com/toolchain/llvm-project 87f1315dfbea7c137aa2e6d362dbb457e388158d) I/flutter (10967): configuration: --cross-prefix=aarch64-linux-android- --sysroot=/Users/sue/Library/Android/sdk/ndk/22.1.7171670/toolchains/llvm/prebuilt/darwin-x86_64/sysroot --prefix=/Users/sue/Projects/arthenica/ffmpeg-kit/prebuilt/android-arm64/ffmpeg --pkg-config=/opt/homebrew/bin/pkg-config --enable-version3 --arch=aarch64 --cpu=armv8-a --target-os=android --enable-neon --enable-asm --enable-inline-asm --ar=aarch64-linux-android-ar --cc=aarch64-linux-android24-clang --cxx=aarch64-linux-android24-clang++ --ranlib=aarch64-linux-android-ranlib --strip=aarch64-linux-android-strip --nm=aarch64-linux-android-nm --extra-libs='-L/Users/sue/Projects/arthenica/ffmpeg-kit/prebuilt/android-arm64/cpu-features/lib -lndk_compat' --disable-autodetect --enable-cross-compile --enable-pic --enable-jni --enable-optimizations --enable-swscale --disable-static --enable-shared --enable-pthreads --enable-v4l2-m2m --disable-outdev=fbdev --disable-indev=fbdev --enable-small --disable-xmm-clobber-test --disable-debug --enable-lto --disable-neon I/flutter (10967): libavutil 58. 2.100 / 58. 2.100 I/flutter (10967): libavcodec 60. 3.100 / 60. 3.100 I/flutter (10967): libavformat 60. 3.100 / 60. 3.100 I/flutter (10967): libavdevice 60. 1.100 / 60. 1.100 I/flutter (10967): libavfilter 9. 3.100 / 9. 3.100 I/flutter (10967): libswscale 7. 1.100 / 7. 1.100 I/flutter (10967): libswresample 4. 10.100 / 4. 10.100 I/flutter (10967): Input #0, android_camera, from '0': I/flutter (10967): Duration: I/flutter (10967): N/A I/flutter (10967): , start: I/flutter (10967): 9001.643403 I/flutter (10967): , bitrate: I/flutter (10967): N/A I/flutter (10967): I/flutter (10967): Stream #0:0 I/flutter (10967): : Video: rawvideo (I420 / 0x30323449), yuv420p, 720x480 I/flutter (10967): , I/flutter (10967): 30 fps, I/flutter (10967): 30 tbr, I/flutter (10967): 1000000000.00 tbn I/flutter (10967): I/flutter (10967): Side data: I/flutter (10967):
I/flutter (10967): displaymatrix: rotation of 90.00 degrees I/flutter (10967): I/flutter (10967): Stream mapping: I/flutter (10967): Stream #0:0 -> #0:0 I/flutter (10967): (rawvideo (native) -> h264 (libx264)) I/flutter (10967): I/flutter (10967): Press [q] to stop, [?] for help I/flutter (10967): [libx264 @ 0xb400007d74d03fb0] using cpu capabilities: ARMv8 NEON I/flutter (10967): [libx264 @ 0xb400007d74d03fb0] profile High, level 3.0, 4:2:0, 8-bit I/flutter (10967): [libx264 @ 0xb400007d74d03fb0] 264 - core 164 - H.264/MPEG-4 AVC codec - Copyleft 2003-2023 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=6 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00 I/flutter (10967): Output #0, flv, to 'rtmps://x.rtmps.youtube.com/live2/xxxx-xxxx-xxxx-xxxx-xxxx': I/flutter (10967): Metadata: I/flutter (10967): encoder : I/flutter (10967): Lavf60.3.100 I/flutter (10967): I/flutter (10967): Stream #0:0 I/flutter (10967): : Video: h264 ([7][0][0][0] / 0x0007), yuv420p(progressive), 480x720, q=2-31 I/flutter (10967): , I/flutter (10967): 30 fps, I/flutter (10967): 1k tbn I/flutter (10967): I/flutter (10967): Metadata: I/flutter (10967): encoder : I/flutter (10967): Lavc60.3.100 libx264 I/flutter (10967): I/flutter (10967): Side data: I/flutter (10967):
I/flutter (10967): cpb: I/flutter (10967): bitrate max/min/avg: 0/0/0 buffer size: 0 I/flutter (10967): vbv_delay: N/A I/flutter (10967): I/flutter (10967):
I/flutter (10967): displaymatrix: rotation of -0.00 degrees I/flutter (10967): I/flutter (10967): frame= 0 fps=0.0 q=0.0 size= 0kB time=N/A bitrate=N/A speed=N/A
I/flutter (10967): frame= 0 fps=0.0 q=0.0 size= 0kB time=N/A bitrate=N/A speed=N/A
I/flutter (10967): frame= 0 fps=0.0 q=0.0 size= 0kB time=N/A bitrate=N/A speed=N/A
I/flutter (10967): frame= 2 fps=1.3 q=29.0 size= 18kB time=00:00:00.00 bitrate=N/A speed= 0x
I/flutter (10967): frame= 17 fps=8.2 q=29.0 size= 127kB time=00:00:06.03 bitrate= 172.5kbits/s speed=2.93x
I/flutter (10967): frame= 32 fps= 12 q=29.0 size= 152kB time=00:00:06.56 bitrate= 189.1kbits/s speed=2.54x
I/flutter (10967): frame= 47 fps= 15 q=29.0 size= 172kB time=00:00:07.06 bitrate= 199.1kbits/s speed=2.28x
I/flutter (10967): frame= 62 fps= 17 q=29.0 size= 200kB time=00:00:07.56 bitrate= 216.5kbits/s speed=2.09x
I/flutter (10967): frame= 77 fps= 19 q=29.0 size= 226kB time=00:00:08.10 bitrate= 228.9kbits/s speed=1.96x
I/flutter (10967): frame= 92 fps= 20 q=29.0 size= 247kB time=00:00:08.60 bitrate= 235.3kbits/s speed=1.85x
I/flutter (10967): frame= 107 fps= 21 q=29.0 size= 275kB time=00:00:09.13 bitrate= 246.3kbits/s speed=1.77x
I/flutter (10967): frame= 122 fps= 21 q=29.0 size= 293kB time=00:00:09.63 bitrate= 248.8kbits/s speed= 1.7x
I/flutter (10967): frame= 137 fps= 22 q=29.0 size= 319kB time=00:00:10.16 bitrate= 256.9kbits/s speed=1.64x
I/flutter (10967): frame= 152 fps= 23 q=29.0 size= 340kB time=00:00:10.66 bitrate= 260.8kbits/s speed=1.59x
I/flutter (10967): frame= 167 fps= 23 q=29.0 size= 359kB time=00:00:11.16 bitrate= 263.4kbits/s speed=1.54x
I/flutter (10967): frame= 182 fps= 24 q=29.0 size= 382kB time=00:00:11.70 bitrate= 267.8kbits/s speed=1.51x
I/flutter (10967): frame= 197 fps= 24 q=29.0 size= 400kB time=00:00:12.23 bitrate= 268.1kbits/s speed=1.48x
I/flutter (10967): frame= 212 fps= 24 q=29.0 size= 421kB time=00:00:12.73 bitrate= 270.6kbits/s speed=1.45x
I/flutter (10967): frame= 227 fps= 24 q=29.0 size= 440kB time=00:00:13.26 bitrate= 271.4kbits/s speed=1.43x
I/flutter (10967): frame= 242 fps= 25 q=29.0 size= 460kB time=00:00:13.76 bitrate= 273.9kbits/s speed=1.41x
I/flutter (10967): frame= 257 fps= 25 q=29.0 size= 505kB time=00:00:14.26 bitrate= 290.1kbits/s speed=1.38x
@tanersener this is the command I'm using FYI:
'-rtsp_transport tcp -f android_camera -video_size 720x480 -i 0 -c:v libx264 -pix_fmt yuv420p -f flv "$rtmpUrl/$streamKey"'
Any updates or suggestions? I didn't find a solution for this
Ok so apparently I have to build the rtsp url from my android camera IP, and I think that's why FFmpeg is throwing option not found because I didn't pass the rtsp url for it. Could that be it? I'm trying to figure how to do that now...
Description I'm trying to build a Flutter App for streaming the camera to youtube using FFmpeg and rtmp.
Expected behavior It's expected that the streamed video reaches the server
Current behavior FFmpeg logs streaming just fine, although the stream doesn't reach the youtube studio
To Reproduce