Recherche avancée

Médias (39)

Mot : - Tags -/audio

Autres articles (49)

  • Personnaliser les catégories

    21 juin 2013, par

    Formulaire de création d’une catégorie
    Pour ceux qui connaissent bien SPIP, une catégorie peut être assimilée à une rubrique.
    Dans le cas d’un document de type catégorie, les champs proposés par défaut sont : Texte
    On peut modifier ce formulaire dans la partie :
    Administration > Configuration des masques de formulaire.
    Dans le cas d’un document de type média, les champs non affichés par défaut sont : Descriptif rapide
    Par ailleurs, c’est dans cette partie configuration qu’on peut indiquer le (...)

  • Encoding and processing into web-friendly formats

    13 avril 2011, par

    MediaSPIP automatically converts uploaded files to internet-compatible formats.
    Video files are encoded in MP4, Ogv and WebM (supported by HTML5) and MP4 (supported by Flash).
    Audio files are encoded in MP3 and Ogg (supported by HTML5) and MP3 (supported by Flash).
    Where possible, text is analyzed in order to retrieve the data needed for search engine detection, and then exported as a series of image files.
    All uploaded files are stored online in their original format, so you can (...)

  • Supporting all media types

    13 avril 2011, par

    Unlike most software and media-sharing platforms, MediaSPIP aims to manage as many different media types as possible. The following are just a few examples from an ever-expanding list of supported formats : images : png, gif, jpg, bmp and more audio : MP3, Ogg, Wav and more video : AVI, MP4, OGV, mpg, mov, wmv and more text, code and other data : OpenOffice, Microsoft Office (Word, PowerPoint, Excel), web (html, CSS), LaTeX, Google Earth and (...)

Sur d’autres sites (8880)

  • FFmpeg Video Overlay Function Not Working (Flutter)

    30 août 2022, par Dennis Ashford

    I am simply trying to get a watermarked video from the Flutter FFmpeg package and cannot seem to get it to work. For right now, I am downloading the video from Firebase, storing it in cache, overlaying a watermark image using the Flutter FFmpeg Kit package. The original video file, image file, and output file are being created properly. However, the overlay function is not working properly. Can someone help me with the FFmpegKit.execute function string ? I am not seeing any obvious errors in the function, but it isn't working properly. I tried writing as a new File and asBytes but neither worked.

    


    Edit : I want to take the originalVideo and overlay it with the watermark image with the expected outcome being a new file that contains the new overlayed video. Not concerned with where the overlay is yet.

    


    Pubspec.yaml

    


    ffmpeg_kit_flutter: ^4.5.1


    


    The function is :

    


    import &#x27;package:ffmpeg_kit_flutter/ffmpeg_kit.dart&#x27;;&#xA;&#xA;Future<file> waterMarkVideo(String videoPath, String watermarkPath) async {&#xA;    //these calls are to load the video into temporary directory&#xA;    final response = await http.get(Uri.parse(videoPath));&#xA;    final originalVideo = File (&#x27;${(await getTemporaryDirectory()).path}/video.mp4&#x27;);&#xA;    await originalVideo.create(recursive: true);&#xA;    await originalVideo.writeAsBytes(response.bodyBytes);&#xA;    print(&#x27;video path&#x27; &#x2B; originalVideo.path);&#xA;&#xA;    //this grabs the watermark image from assets and decodes it&#xA;    final byteData = await rootBundle.load(watermarkPath);&#xA;    final watermark = File(&#x27;${(await getTemporaryDirectory()).path}/image.png&#x27;);&#xA;    await watermark.create(recursive: true);&#xA;    await watermark.writeAsBytes(byteData.buffer.asUint8List(byteData.offsetInBytes, byteData.lengthInBytes));&#xA;    print(&#x27;watermark path&#x27; &#x2B; watermark.path);&#xA;&#xA;    //this creates temporary directory for new watermarked video&#xA;    var tempDir = await getTemporaryDirectory();&#xA;    final newVideoPath = &#x27;${tempDir.path}/${DateTime.now().microsecondsSinceEpoch}result.mp4&#x27;;&#xA;    final videoFile = await File(newVideoPath).create();&#xA;&#xA;//overlaying video using FFmpegkit where I need some help&#xA;    await FFmpegKit.executeAsync("-i $originalVideo -i $watermark -filter_complex &#x27;overlay=(W-w)/2:(H-h)/2&#x27; $videoFile")&#xA;    .then((session) async {&#xA;      final state = FFmpegKitConfig.sessionStateToString(await session.getState());&#xA;      final returnCode = await session.getReturnCode();&#xA;      final failStackTrace = await session.getFailStackTrace();&#xA;      final output = await session.getOutput();&#xA;      print(&#x27;FFmpeg process exited with state ${state} and rs ${returnCode}.If failed ${failStackTrace}&#x27;);&#xA;      print(&#x27;Last output $output&#x27;);&#xA;    } );&#xA;    print(&#x27;new video path&#x27; &#x2B; newVideoPath);&#xA;    Uint8List videoByteData = await videoFile.readAsBytes();&#xA;    return videoFile.writeAsBytes(videoByteData);&#xA;}&#xA;</file>

    &#xA;

    The output for the function above is

    &#xA;

    flutter: video path/Users/dennisashford/Library/Developer/CoreSimulator/Devices/FBFB4D51-EC31-47DF-8FE0-66B114806EA4/data/Containers/Data/Application/0EA3BB35-D364-4B98-A104-15CDB17AAD54/Library/Caches/video.mp4&#xA;flutter: watermark path/Users/dennisashford/Library/Developer/CoreSimulator/Devices/FBFB4D51-EC31-47DF-8FE0-66B114806EA4/data/Containers/Data/Application/0EA3BB35-D364-4B98-A104-15CDB17AAD54/Library/Caches/image.png&#xA;ffmpeg version v4.5-dev-3393-g30322ebe3c Copyright (c) 2000-2021 the FFmpeg developers&#xA;  built with Apple clang version 13.0.0 (clang-1300.0.29.30)&#xA;  configuration: --cross-prefix=x86_64-ios-darwin- --sysroot=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator15.2.sdk --prefix=/Users/taner/Projects/ffmpeg-kit/prebuilt/apple-ios-x86_64/ffmpeg --pkg-config=/opt/homebrew/bin/pkg-config --enable-version3 --arch=x86_64 --cpu=x86_64 --target-os=darwin --disable-neon --disable-asm --ar=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ar --cc=clang --cxx=clang&#x2B;&#x2B; --as=&#x27;clang -arch x86_64 -target x86_64-apple-ios12.1-simulator -march=x86-64 -msse4.2 -mpopcnt -m64 -DFFMPEG_KIT_X86_64 -Wno-unused-function -Wno-deprecated-declarations -fstrict-aliasing -DIOS -DFFMPEG_KIT_BUILD_DATE=20220114 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator15.2.sdk -O2 -mios-simulator-version-min=12.1 -I/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator15.2.sdk/usr/include&#x27; --ranlib=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib --strip=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/strip --nm=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/nm --extra-ldflags=&#x27;-mios-simulator-version-min=12.1&#x27; --disable-autodetect --enable-cross-compile --enable-pic --enable-inline-asm --enable-optimizations --enable-swscale --enable-shared --disable-static --install-name-dir=&#x27;@rpath&#x27; --enable-pthreads --disable-v4l2-m2m --disable-outdev=v4l2 --disable-outdev=fbdev --disable-indev=v4l2 --disable-indev=fbdev --enable-small --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-alsa --disable-cuda --disable-cuvid --disable-nvenc --disable-vaapi --disable-vdpau --enable-gmp --enable-gnutls --disable-sdl2 --disable-openssl --enable-zlib --enable-audiotoolbox --disable-outdev=audiotoolbox --enable-bzlib --enable-videotoolbox --enable-avfoundation --enable-iconv --disable-coreimage --disable-appkit --disable-opencl --disable-opengl&#xA;  libavutil      57. 13.100 / 57. 13.100&#xA;  libavcodec     59. 15.102 / 59. 15.102&#xA;  libavformat    59. 10.100 / 59. 10.100&#xA;  libavdevice    59.  1.100 / 59.  1.100&#xA;  libavfilter     8. 21.100 /  8. 21.100&#xA;  libswscale      6.  1.102 /  6.  1.102&#xA;  libswresample   4.  0.100 /  4.  0.100&#xA;File:: Protocol not found&#xA;Did you mean file:File:?&#xA;flutter: FFmpeg process exited with state RUNNING and rs 1.If failed null&#xA;flutter: Last output ffmpeg version v4.5-dev-3393-g30322ebe3c Copyright (c) 2000-2021 the FFmpeg developers&#xA;flutter:   built with Apple clang version 13.0.0 (clang-1300.0.29.30)&#xA;flutter:   configuration: --cross-prefix=x86_64-ios-darwin- --sysroot=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator15.2.sdk --prefix=/Users/taner/Projects/ffmpeg-kit/prebuilt/apple-ios-x86_64/ffmpeg --pkg-config=/opt/homebrew/bin/pkg-config --enable-version3 --arch=x86_64 --cpu=x86_64 --target-os=darwin --disable-neon --disable-asm --ar=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ar --cc=clang --cxx=clang&#x2B;&#x2B; --as=&#x27;clang -arch x86_64 -target x86_64-apple-ios12.1-simulator -march=x86-64 -msse4.2 -mpopcnt -m64 -DFFMPEG_KIT_X86_64 -Wno-unused-function -Wno-deprecated-declarations -fstrict-aliasing -DIOS -DFFMPEG_KIT_BUILD_DATE=20220114 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator15.2.sdk -O2 -mios-simulator-version-min=12.1 -I/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator15.2.sdk/usr/include&#x27; --ranlib=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib --strip=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/strip --nm=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/nm --extra-ldflags=&#x27;-mios-simulator-version-min=12.1&#x27; --disable-autodetect --enable-cross-compile --enable-pic --enable-inline-asm --enable-optimizations --enable-swscale --enable-shared --disable-static --install-name-dir=&#x27;@rpath&#x27; --enable-pthreads --disable-v4l2-m2m --disable-outdev=v4l2 --disable-outdev=fbdev --disable-indev=v4l2 --disable-indev=fbdev --enable-small --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-alsa --disable-cuda --disable-cuvid --disable-nvenc --disable-vaapi --disable-vdpau --enable-gmp --enable-gnutls --disable-sdl2 --disable-openssl --enable-zlib --enable-audiotoolbox --disable-outdev=audiotoolbox --enable-bzlib --enable-videotoolbox --enable-avfoundation --enable-iconv --disable-coreimage --disable-appkit --disable-opencl --disable-opengl&#xA;flutter:   libavutil      57. 13.100 / 57. 13.100&#xA;flutter:   libavcodec     59. 15.102 / 59. 15.102&#xA;flutter:   libavformat    59. 10.100 / 59. 10.100&#xA;flutter:   libavdevice    59.  1.100 / 59.  1.100&#xA;flutter:   libavfilter     8. 21.100 /  8. 21.100&#xA;flutter:   libswscale      6.  1.102 /  6.  1.102&#xA;flutter:   libswresample   4.  0.100 /  4.  0.100&#xA;flutter: File:: Protocol not found&#xA;flutter: Did you mean file:File:?&#xA;flutter: &#xA;flutter: new video path/Users/dennisashford/Library/Developer/CoreSimulator/Devices/FBFB4D51-EC31-47DF-8FE0-66B114806EA4/data/Containers/Data/Application/0EA3BB35-D364-4B98-A104-15CDB17AAD54/Library/Caches/1661892011213545result.mp4&#xA;

    &#xA;

    Update : So I built the code on a physical device and was able to get a little more information for what may be the problem. The error may be coming from

    &#xA;

    File:: Protocol not found&#xA;Did you mean file:File:?&#xA;

    &#xA;

    Complete logs from the physical device are given below

    &#xA;

    flutter: video path/var/mobile/Containers/Data/Application/70EA92CD-DF5D-440E-BBE1-C130BC7F0CC7/Library/Caches/video.mp4&#xA;flutter: watermark path/var/mobile/Containers/Data/Application/70EA92CD-DF5D-440E-BBE1-C130BC7F0CC7/Library/Caches/image.png&#xA;ffmpeg version v4.5-dev-3393-g30322ebe3c Copyright (c) 2000-2021 the FFmpeg developers&#xA;  built with Apple clang version 13.0.0 (clang-1300.0.29.30)&#xA;  configuration: --cross-prefix=arm64-ios-darwin- --sysroot=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS15.2.sdk --prefix=/Users/taner/Projects/ffmpeg-kit/prebuilt/apple-ios-arm64/ffmpeg --pkg-config=/opt/homebrew/bin/pkg-config --enable-version3 --arch=aarch64 --cpu=armv8 --target-os=darwin --enable-neon --enable-asm --ar=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ar --cc=clang --cxx=clang&#x2B;&#x2B; --as=&#x27;/Users/taner/Projects/ffmpeg-kit/.tmp/gas-preprocessor.pl -arch aarch64 -- clang -arch arm64 -target arm64-apple-ios12.1 -march=armv8-a&#x2B;crc&#x2B;crypto -mcpu=generic -DFFMPEG_KIT_ARM64 -Wno-unused-function -Wno-deprecated-declarations -fstrict-aliasing -fembed-bitcode -DIOS -DFFMPEG_KIT_BUILD_DATE=20220114 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS15.2.sdk -Oz -miphoneos-version-min=12.1 -I/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS15.2.sdk/usr/include&#x27; --ranlib=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib --strip=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/strip --nm=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/nm --extra-ldflags=&#x27;-miphoneos-version-min=12.1&#x27; --disable-autodetect --enable-cross-compile --enable-pic --enable-inline-asm --enable-optimizations --enable-swscale --enable-shared --disable-static --install-name-dir=&#x27;@rpath&#x27; --enable-pthreads --disable-v4l2-m2m --disable-outdev=v4l2 --disable-outdev=fbdev --disable-indev=v4l2 --disable-indev=fbdev --enable-small --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-alsa --disable-cuda --disable-cuvid --disable-nvenc --disable-vaapi --disable-vdpau --enable-gmp --enable-gnutls --disable-sdl2 --disable-openssl --enable-zlib --enable-audiotoolbox --disable-outdev=audiotoolbox --enable-bzlib --enable-videotoolbox --enable-avfoundation --enable-iconv --disable-coreimage --disable-appkit --disable-opencl --disable-opengl&#xA;  libavutil      57. 13.100 / 57. 13.100&#xA;  libavcodec     59. 15.102 / 59. 15.102&#xA;  libavformat    59. 10.100 / 59. 10.100&#xA;  libavdevice    59.  1.100 / 59.  1.100&#xA;  libavfilter     8. 21.100 /  8. 21.100&#xA;  libswscale      6.  1.102 /  6.  1.102&#xA;  libswresample   4.  0.100 /  4.  0.100&#xA;File:: Protocol not found&#xA;Did you mean file:File:?&#xA;flutter: FFmpeg process exited with state RUNNING and rs 1.If failed null&#xA;flutter: Last output ffmpeg version v4.5-dev-3393-g30322ebe3c Copyright (c) 2000-2021 the FFmpeg developers&#xA;  built with Apple clang version 13.0.0 (clang-1300.0.29.30)&#xA;  configuration: --cross-prefix=arm64-ios-darwin- --sysroot=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS15.2.sdk --prefix=/Users/taner/Projects/ffmpeg-kit/prebuilt/apple-ios-arm64/ffmpeg --pkg-config=/opt/homebrew/bin/pkg-config --enable-version3 --arch=aarch64 --cpu=armv8 --target-os=darwin --enable-neon --enable-asm --ar=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ar --cc=clang --cxx=clang&#x2B;&#x2B; --as=&#x27;/Users/taner/Projects/ffmpeg-kit/.tmp/gas-preprocessor.pl -arch aarch64 -- clang -arch arm64 -target arm64-apple-ios12.1 -march=armv8-a&#x2B;crc&#x2B;crypto -mcpu=generic -DFFMPEG_KIT_ARM64 -Wno-unused-function -Wno-deprecated-declarations -fstrict-aliasing -fembed-bitcode -DIOS -DFFMPEG_KIT_BUILD_DATE=20220114 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS15.2.sdk -Oz -miphoneos-version-min=12.1 -I/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS15.2.sdk/usr/include&#x27; --ranlib=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib --strip=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/strip --nm=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/nm --extra-ldflags=&#x27;-miphoneos-version-min=12.1&#x27; --disable-autodetect --enable-cross-compile --enable-pic --enable-inline-asm --enable-optimizations --enable-swscale --enable-shared --disable-static --install-name-dir=&#x27;@rpath&#x27; --enable-pthreads --disable-v4l2-m2m --disable-outdev=v4l2 --disable-outdev=fbdev --disable-indev=v4l2 --disable-indev=fbdev --enable-small --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-alsa --disable-cuda --disable-cuvid --disable-nvenc --disable-vaapi --disable-vdpau --enable-gmp --enable-gnutls --disable-sdl2 --disable-openssl --enable-zlib --enable-audiotoolbox --disable-outdev=audiotoolbox --enable-bzlib --enable-videotoolbox --enable-avfoundation --enable-iconv --disable-coreimage --disable-appkit --disable-opencl --disable-opengl&#xA;  libavutil      57. 13.100 / 57. 13.100&#xA;  libavcodec     59. 15.102 / 59. 15.102&#xA;  libavformat    59. 10.100 / 59. 10.100&#xA;  libavdevice    59.  1.100 / 59.  1.100&#xA;  libavfilter     8. 21.100 /  8. 21.100&#xA;  libswscale      6.  1.102 /  6.  1.102&#xA;  libswresample   4.  0.100 /  4.  0.100&#xA;File:: Protocol not found&#xA;Did you mean file:File:?&#xA;flutter: new video path/var/mobile/Containers/Data/Application/70EA92CD-DF5D-440E-BBE1-C130BC7F0CC7/Library/Caches/1661891272856433result.mp4&#xA;

    &#xA;

    Update #2 after a lot of help from @kesh below, this function was actually able to overlay the image on the video.

    &#xA;

    await FFmpegKit.executeAsync(&#x27;-i $videoPath -i ${watermark.path} -filter_complex "overlay=10:10" -y ${videoFile.path}&#x27;)&#xA;

    &#xA;

  • FFmpeg video overlay function not working

    5 novembre 2022, par Dennis Ashford

    I am simply trying to get a watermarked video from the Flutter FFmpeg package and cannot seem to get it to work. Right now, I am downloading the video from Firebase, storing it in cache, overlaying a watermark image using the Flutter FFmpeg Kit package. The original video file, image file, and output file are being created properly.

    &#xA;

    However, the overlay function is not working properly. How can I use the FFmpegKit.execute function string ? I am not seeing any obvious errors in the function, but it isn't working properly. I tried writing as a new File and asBytes but neither worked.

    &#xA;

    Edit : I want to take the originalVideo and overlay it with the watermark image with the expected outcome being a new file that contains the new overlayed video. Not concerned with where the overlay is yet.

    &#xA;

    Pubspec.yaml

    &#xA;

    ffmpeg_kit_flutter: ^4.5.1&#xA;

    &#xA;

    The function is :

    &#xA;

    import &#x27;package:ffmpeg_kit_flutter/ffmpeg_kit.dart&#x27;;&#xA;&#xA;Future<file> waterMarkVideo(String videoPath, String watermarkPath) async {&#xA;    //these calls are to load the video into temporary directory&#xA;    final response = await http.get(Uri.parse(videoPath));&#xA;    final originalVideo = File (&#x27;${(await getTemporaryDirectory()).path}/video.mp4&#x27;);&#xA;    await originalVideo.create(recursive: true);&#xA;    await originalVideo.writeAsBytes(response.bodyBytes);&#xA;    print(&#x27;video path&#x27; &#x2B; originalVideo.path);&#xA;&#xA;    //this grabs the watermark image from assets and decodes it&#xA;    final byteData = await rootBundle.load(watermarkPath);&#xA;    final watermark = File(&#x27;${(await getTemporaryDirectory()).path}/image.png&#x27;);&#xA;    await watermark.create(recursive: true);&#xA;    await watermark.writeAsBytes(byteData.buffer.asUint8List(byteData.offsetInBytes, byteData.lengthInBytes));&#xA;    print(&#x27;watermark path&#x27; &#x2B; watermark.path);&#xA;&#xA;    //this creates temporary directory for new watermarked video&#xA;    var tempDir = await getTemporaryDirectory();&#xA;    final newVideoPath = &#x27;${tempDir.path}/${DateTime.now().microsecondsSinceEpoch}result.mp4&#x27;;&#xA;    final videoFile = await File(newVideoPath).create();&#xA;&#xA;//overlaying video using FFmpegkit where I need some help&#xA;    await FFmpegKit.executeAsync("-i $originalVideo -i $watermark -filter_complex &#x27;overlay=(W-w)/2:(H-h)/2&#x27; $videoFile")&#xA;    .then((session) async {&#xA;      final state = FFmpegKitConfig.sessionStateToString(await session.getState());&#xA;      final returnCode = await session.getReturnCode();&#xA;      final failStackTrace = await session.getFailStackTrace();&#xA;      final output = await session.getOutput();&#xA;      print(&#x27;FFmpeg process exited with state ${state} and rs ${returnCode}.If failed ${failStackTrace}&#x27;);&#xA;      print(&#x27;Last output $output&#x27;);&#xA;    } );&#xA;    print(&#x27;new video path&#x27; &#x2B; newVideoPath);&#xA;    Uint8List videoByteData = await videoFile.readAsBytes();&#xA;    return videoFile.writeAsBytes(videoByteData);&#xA;}&#xA;</file>

    &#xA;

    The output for the function above is

    &#xA;

    flutter: video path/Users/dennisashford/Library/Developer/CoreSimulator/Devices/FBFB4D51-EC31-47DF-8FE0-66B114806EA4/data/Containers/Data/Application/0EA3BB35-D364-4B98-A104-15CDB17AAD54/Library/Caches/video.mp4&#xA;flutter: watermark path/Users/dennisashford/Library/Developer/CoreSimulator/Devices/FBFB4D51-EC31-47DF-8FE0-66B114806EA4/data/Containers/Data/Application/0EA3BB35-D364-4B98-A104-15CDB17AAD54/Library/Caches/image.png&#xA;ffmpeg version v4.5-dev-3393-g30322ebe3c Copyright (c) 2000-2021 the FFmpeg developers&#xA;  built with Apple clang version 13.0.0 (clang-1300.0.29.30)&#xA;  configuration: --cross-prefix=x86_64-ios-darwin- --sysroot=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator15.2.sdk --prefix=/Users/taner/Projects/ffmpeg-kit/prebuilt/apple-ios-x86_64/ffmpeg --pkg-config=/opt/homebrew/bin/pkg-config --enable-version3 --arch=x86_64 --cpu=x86_64 --target-os=darwin --disable-neon --disable-asm --ar=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ar --cc=clang --cxx=clang&#x2B;&#x2B; --as=&#x27;clang -arch x86_64 -target x86_64-apple-ios12.1-simulator -march=x86-64 -msse4.2 -mpopcnt -m64 -DFFMPEG_KIT_X86_64 -Wno-unused-function -Wno-deprecated-declarations -fstrict-aliasing -DIOS -DFFMPEG_KIT_BUILD_DATE=20220114 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator15.2.sdk -O2 -mios-simulator-version-min=12.1 -I/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator15.2.sdk/usr/include&#x27; --ranlib=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib --strip=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/strip --nm=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/nm --extra-ldflags=&#x27;-mios-simulator-version-min=12.1&#x27; --disable-autodetect --enable-cross-compile --enable-pic --enable-inline-asm --enable-optimizations --enable-swscale --enable-shared --disable-static --install-name-dir=&#x27;@rpath&#x27; --enable-pthreads --disable-v4l2-m2m --disable-outdev=v4l2 --disable-outdev=fbdev --disable-indev=v4l2 --disable-indev=fbdev --enable-small --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-alsa --disable-cuda --disable-cuvid --disable-nvenc --disable-vaapi --disable-vdpau --enable-gmp --enable-gnutls --disable-sdl2 --disable-openssl --enable-zlib --enable-audiotoolbox --disable-outdev=audiotoolbox --enable-bzlib --enable-videotoolbox --enable-avfoundation --enable-iconv --disable-coreimage --disable-appkit --disable-opencl --disable-opengl&#xA;  libavutil      57. 13.100 / 57. 13.100&#xA;  libavcodec     59. 15.102 / 59. 15.102&#xA;  libavformat    59. 10.100 / 59. 10.100&#xA;  libavdevice    59.  1.100 / 59.  1.100&#xA;  libavfilter     8. 21.100 /  8. 21.100&#xA;  libswscale      6.  1.102 /  6.  1.102&#xA;  libswresample   4.  0.100 /  4.  0.100&#xA;File:: Protocol not found&#xA;Did you mean file:File:?&#xA;flutter: FFmpeg process exited with state RUNNING and rs 1.If failed null&#xA;flutter: Last output ffmpeg version v4.5-dev-3393-g30322ebe3c Copyright (c) 2000-2021 the FFmpeg developers&#xA;flutter:   built with Apple clang version 13.0.0 (clang-1300.0.29.30)&#xA;flutter:   configuration: --cross-prefix=x86_64-ios-darwin- --sysroot=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator15.2.sdk --prefix=/Users/taner/Projects/ffmpeg-kit/prebuilt/apple-ios-x86_64/ffmpeg --pkg-config=/opt/homebrew/bin/pkg-config --enable-version3 --arch=x86_64 --cpu=x86_64 --target-os=darwin --disable-neon --disable-asm --ar=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ar --cc=clang --cxx=clang&#x2B;&#x2B; --as=&#x27;clang -arch x86_64 -target x86_64-apple-ios12.1-simulator -march=x86-64 -msse4.2 -mpopcnt -m64 -DFFMPEG_KIT_X86_64 -Wno-unused-function -Wno-deprecated-declarations -fstrict-aliasing -DIOS -DFFMPEG_KIT_BUILD_DATE=20220114 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator15.2.sdk -O2 -mios-simulator-version-min=12.1 -I/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator15.2.sdk/usr/include&#x27; --ranlib=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib --strip=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/strip --nm=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/nm --extra-ldflags=&#x27;-mios-simulator-version-min=12.1&#x27; --disable-autodetect --enable-cross-compile --enable-pic --enable-inline-asm --enable-optimizations --enable-swscale --enable-shared --disable-static --install-name-dir=&#x27;@rpath&#x27; --enable-pthreads --disable-v4l2-m2m --disable-outdev=v4l2 --disable-outdev=fbdev --disable-indev=v4l2 --disable-indev=fbdev --enable-small --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-alsa --disable-cuda --disable-cuvid --disable-nvenc --disable-vaapi --disable-vdpau --enable-gmp --enable-gnutls --disable-sdl2 --disable-openssl --enable-zlib --enable-audiotoolbox --disable-outdev=audiotoolbox --enable-bzlib --enable-videotoolbox --enable-avfoundation --enable-iconv --disable-coreimage --disable-appkit --disable-opencl --disable-opengl&#xA;flutter:   libavutil      57. 13.100 / 57. 13.100&#xA;flutter:   libavcodec     59. 15.102 / 59. 15.102&#xA;flutter:   libavformat    59. 10.100 / 59. 10.100&#xA;flutter:   libavdevice    59.  1.100 / 59.  1.100&#xA;flutter:   libavfilter     8. 21.100 /  8. 21.100&#xA;flutter:   libswscale      6.  1.102 /  6.  1.102&#xA;flutter:   libswresample   4.  0.100 /  4.  0.100&#xA;flutter: File:: Protocol not found&#xA;flutter: Did you mean file:File:?&#xA;flutter: &#xA;flutter: new video path/Users/dennisashford/Library/Developer/CoreSimulator/Devices/FBFB4D51-EC31-47DF-8FE0-66B114806EA4/data/Containers/Data/Application/0EA3BB35-D364-4B98-A104-15CDB17AAD54/Library/Caches/1661892011213545result.mp4&#xA;

    &#xA;

    Update : So I built the code on a physical device and was able to get a little more information for what may be the problem. The error may be coming from

    &#xA;

    File:: Protocol not found&#xA;Did you mean file:File:?&#xA;

    &#xA;

    Complete logs from the physical device are given below

    &#xA;

    flutter: video path/var/mobile/Containers/Data/Application/70EA92CD-DF5D-440E-BBE1-C130BC7F0CC7/Library/Caches/video.mp4&#xA;flutter: watermark path/var/mobile/Containers/Data/Application/70EA92CD-DF5D-440E-BBE1-C130BC7F0CC7/Library/Caches/image.png&#xA;ffmpeg version v4.5-dev-3393-g30322ebe3c Copyright (c) 2000-2021 the FFmpeg developers&#xA;  built with Apple clang version 13.0.0 (clang-1300.0.29.30)&#xA;  configuration: --cross-prefix=arm64-ios-darwin- --sysroot=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS15.2.sdk --prefix=/Users/taner/Projects/ffmpeg-kit/prebuilt/apple-ios-arm64/ffmpeg --pkg-config=/opt/homebrew/bin/pkg-config --enable-version3 --arch=aarch64 --cpu=armv8 --target-os=darwin --enable-neon --enable-asm --ar=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ar --cc=clang --cxx=clang&#x2B;&#x2B; --as=&#x27;/Users/taner/Projects/ffmpeg-kit/.tmp/gas-preprocessor.pl -arch aarch64 -- clang -arch arm64 -target arm64-apple-ios12.1 -march=armv8-a&#x2B;crc&#x2B;crypto -mcpu=generic -DFFMPEG_KIT_ARM64 -Wno-unused-function -Wno-deprecated-declarations -fstrict-aliasing -fembed-bitcode -DIOS -DFFMPEG_KIT_BUILD_DATE=20220114 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS15.2.sdk -Oz -miphoneos-version-min=12.1 -I/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS15.2.sdk/usr/include&#x27; --ranlib=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib --strip=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/strip --nm=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/nm --extra-ldflags=&#x27;-miphoneos-version-min=12.1&#x27; --disable-autodetect --enable-cross-compile --enable-pic --enable-inline-asm --enable-optimizations --enable-swscale --enable-shared --disable-static --install-name-dir=&#x27;@rpath&#x27; --enable-pthreads --disable-v4l2-m2m --disable-outdev=v4l2 --disable-outdev=fbdev --disable-indev=v4l2 --disable-indev=fbdev --enable-small --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-alsa --disable-cuda --disable-cuvid --disable-nvenc --disable-vaapi --disable-vdpau --enable-gmp --enable-gnutls --disable-sdl2 --disable-openssl --enable-zlib --enable-audiotoolbox --disable-outdev=audiotoolbox --enable-bzlib --enable-videotoolbox --enable-avfoundation --enable-iconv --disable-coreimage --disable-appkit --disable-opencl --disable-opengl&#xA;  libavutil      57. 13.100 / 57. 13.100&#xA;  libavcodec     59. 15.102 / 59. 15.102&#xA;  libavformat    59. 10.100 / 59. 10.100&#xA;  libavdevice    59.  1.100 / 59.  1.100&#xA;  libavfilter     8. 21.100 /  8. 21.100&#xA;  libswscale      6.  1.102 /  6.  1.102&#xA;  libswresample   4.  0.100 /  4.  0.100&#xA;File:: Protocol not found&#xA;Did you mean file:File:?&#xA;flutter: FFmpeg process exited with state RUNNING and rs 1.If failed null&#xA;flutter: Last output ffmpeg version v4.5-dev-3393-g30322ebe3c Copyright (c) 2000-2021 the FFmpeg developers&#xA;  built with Apple clang version 13.0.0 (clang-1300.0.29.30)&#xA;  configuration: --cross-prefix=arm64-ios-darwin- --sysroot=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS15.2.sdk --prefix=/Users/taner/Projects/ffmpeg-kit/prebuilt/apple-ios-arm64/ffmpeg --pkg-config=/opt/homebrew/bin/pkg-config --enable-version3 --arch=aarch64 --cpu=armv8 --target-os=darwin --enable-neon --enable-asm --ar=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ar --cc=clang --cxx=clang&#x2B;&#x2B; --as=&#x27;/Users/taner/Projects/ffmpeg-kit/.tmp/gas-preprocessor.pl -arch aarch64 -- clang -arch arm64 -target arm64-apple-ios12.1 -march=armv8-a&#x2B;crc&#x2B;crypto -mcpu=generic -DFFMPEG_KIT_ARM64 -Wno-unused-function -Wno-deprecated-declarations -fstrict-aliasing -fembed-bitcode -DIOS -DFFMPEG_KIT_BUILD_DATE=20220114 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS15.2.sdk -Oz -miphoneos-version-min=12.1 -I/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS15.2.sdk/usr/include&#x27; --ranlib=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib --strip=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/strip --nm=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/nm --extra-ldflags=&#x27;-miphoneos-version-min=12.1&#x27; --disable-autodetect --enable-cross-compile --enable-pic --enable-inline-asm --enable-optimizations --enable-swscale --enable-shared --disable-static --install-name-dir=&#x27;@rpath&#x27; --enable-pthreads --disable-v4l2-m2m --disable-outdev=v4l2 --disable-outdev=fbdev --disable-indev=v4l2 --disable-indev=fbdev --enable-small --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-alsa --disable-cuda --disable-cuvid --disable-nvenc --disable-vaapi --disable-vdpau --enable-gmp --enable-gnutls --disable-sdl2 --disable-openssl --enable-zlib --enable-audiotoolbox --disable-outdev=audiotoolbox --enable-bzlib --enable-videotoolbox --enable-avfoundation --enable-iconv --disable-coreimage --disable-appkit --disable-opencl --disable-opengl&#xA;  libavutil      57. 13.100 / 57. 13.100&#xA;  libavcodec     59. 15.102 / 59. 15.102&#xA;  libavformat    59. 10.100 / 59. 10.100&#xA;  libavdevice    59.  1.100 / 59.  1.100&#xA;  libavfilter     8. 21.100 /  8. 21.100&#xA;  libswscale      6.  1.102 /  6.  1.102&#xA;  libswresample   4.  0.100 /  4.  0.100&#xA;File:: Protocol not found&#xA;Did you mean file:File:?&#xA;flutter: new video path/var/mobile/Containers/Data/Application/70EA92CD-DF5D-440E-BBE1-C130BC7F0CC7/Library/Caches/1661891272856433result.mp4&#xA;

    &#xA;

    Update #2 after a lot of help from @kesh below, this function was actually able to overlay the image on the video.

    &#xA;

    await FFmpegKit.executeAsync(&#x27;-i $videoPath -i ${watermark.path} -filter_complex "overlay=10:10" -y ${videoFile.path}&#x27;)&#xA;

    &#xA;

  • ffmpeg realtime bad quality variable fps cams inputs to constant framerate problem

    23 janvier 2023, par BloodMan
        ../ffmpeg/ffmpeg -err_detect ignore_err -nostdin -threads 0 -y -strict experimental -thread_queue_size 10M -max_delay 20M -rtbufsize 20M -fflags &#x2B;discardcorrupt \&#xA;        -i "${cam1}" -i "${cam2}" -i "${cam3}" -i "${cam4}" \&#xA;        -filter_complex " \&#xA;        nullsrc=size=3840x2160:rate=30 [main1]; \&#xA;        anullsrc=channel_layout=stereo:sample_rate=44100 [a]; \&#xA;        [0:v] scale=1920:1080 [overlay1]; \&#xA;        [1:v] scale=1920:1080 [overlay2]; \&#xA;        [2:v] scale=1920:1080 [overlay3]; \&#xA;        [3:v] scale=1920:1080 [overlay4]; \&#xA;        [main1][overlay1] overlay=0:0 [main2]; \&#xA;        [main2][overlay2] overlay=1920:0 [main3]; \&#xA;        [main3][overlay3] overlay=0:1080 [main4]; \&#xA;        [main4][overlay4] overlay=1920:1080 [v] " \&#xA;        -t 10 -r 30 -g 60 -map "[v]" -map "[a]" \&#xA;        -shortest -video_size 3840x2160 -pix_fmt yuv420p -vcodec libx264 -preset ultrafast -tune zerolatency -minrate 2M -maxrate 2M -bufsize 20M -c:a aac -b:a 96k -ac 2 -ar 48000 -copytb 1 \&#xA;        -f flv -y -fflags &#x2B;genpts rtmp://b.rtmp.youtube.com/live2/${key}?backup=1&#xA;

    &#xA;

    ffmpeg version N-109650-g9d5e66942c Copyright (c) 2000-2023 the FFmpeg developers&#xA;  built with gcc 10 (Debian 10.2.1-6)&#xA;  configuration: --prefix=/home/bloodman/ffmpeg --pkg-config-flags=--static --extra-cflags=&#x27;-I/home/bloodman/ffmpeg/include -march=native&#x27; --extra-ldflags=-L/home/bloodman/ffmpeg/lib --extra-libs=&#x27;-lpthread -lm&#x27; --bindir=/home/bloodman/ffmpeg --enable-gpl --enable-nonfree --enable-libx264 --enable-libfdk-aac --enable-libmp3lame --enable-libfreetype --enable-hardcoded-tables&#xA;  libavutil      57. 44.100 / 57. 44.100&#xA;  libavcodec     59. 56.100 / 59. 56.100&#xA;  libavformat    59. 35.100 / 59. 35.100&#xA;  libavdevice    59.  8.101 / 59.  8.101&#xA;  libavfilter     8. 54.100 /  8. 54.100&#xA;  libswscale      6.  8.112 /  6.  8.112&#xA;  libswresample   4.  9.100 /  4.  9.100&#xA;  libpostproc    56.  7.100 / 56.  7.100&#xA;[hls @ 0x56019db77780] Skip (&#x27;#EXT-X-VERSION:3&#x27;)&#xA;[hls @ 0x56019db77780] Opening &#x27;cams/stream1_113.ts&#x27; for reading&#xA;Input #0, hls, from &#x27;cams/stream1.m3u8&#x27;:&#xA;  Duration: N/A, start: 1122.341667, bitrate: N/A&#xA;  Program 0&#xA;    Metadata:&#xA;      variant_bitrate : 0&#xA;  Stream #0:0: Video: h264 (Baseline) ([27][0][0][0] / 0x001B), yuv420p, 2048x1536, 15 fps, 15 tbr, 90k tbn&#xA;    Metadata:&#xA;      variant_bitrate : 0&#xA;[hls @ 0x56019db9e980] Skip (&#x27;#EXT-X-VERSION:3&#x27;)&#xA;[hls @ 0x56019db9e980] Opening &#x27;cams/stream2_105.ts&#x27; for reading&#xA;Input #1, hls, from &#x27;cams/stream2.m3u8&#x27;:&#xA;  Duration: N/A, start: 1042.633000, bitrate: N/A&#xA;  Program 0&#xA;    Metadata:&#xA;      variant_bitrate : 0&#xA;  Stream #1:0: Video: h264 (Main) ([27][0][0][0] / 0x001B), yuvj420p(pc, bt709), 1920x1080 [SAR 1:1 DAR 16:9], 25 fps, 100 tbr, 90k tbn&#xA;    Metadata:&#xA;      variant_bitrate : 0&#xA;[hls @ 0x56019dccdbc0] Skip (&#x27;#EXT-X-VERSION:3&#x27;)&#xA;[hls @ 0x56019dccdbc0] Opening &#x27;cams/stream3_14.ts&#x27; for reading&#xA;Input #2, hls, from &#x27;cams/stream3.m3u8&#x27;:&#xA;  Duration: N/A, start: 132.469000, bitrate: N/A&#xA;  Program 0&#xA;    Metadata:&#xA;      variant_bitrate : 0&#xA;  Stream #2:0: Video: h264 (Main) ([27][0][0][0] / 0x001B), yuv420p, 2688x1520, 25 fps, 100 tbr, 90k tbn&#xA;    Metadata:&#xA;      variant_bitrate : 0&#xA;[hls @ 0x56019f0ec980] Skip (&#x27;#EXT-X-VERSION:3&#x27;)&#xA;[hls @ 0x56019f0ec980] Opening &#x27;cams/stream4_26.ts&#x27; for reading&#xA;Input #3, hls, from &#x27;cams/stream4.m3u8&#x27;:&#xA;  Duration: N/A, start: 253.389000, bitrate: N/A&#xA;  Program 0&#xA;    Metadata:&#xA;      variant_bitrate : 0&#xA;  Stream #3:0: Video: h264 (High) ([27][0][0][0] / 0x001B), yuvj420p(pc, bt709), 1920x1080, 90k tbr, 90k tbn&#xA;    Metadata:&#xA;      variant_bitrate : 0&#xA;Stream mapping:&#xA;  Stream #0:0 (h264) -> scale:default&#xA;  Stream #1:0 (h264) -> scale:default&#xA;  Stream #2:0 (h264) -> scale:default&#xA;  Stream #3:0 (h264) -> scale:default&#xA;  overlay:default -> Stream #0:0 (libx264)&#xA;  anullsrc:default -> Stream #0:1 (aac)&#xA;[hls @ 0x56019db77780] Opening &#x27;cams/stream1_114.ts&#x27; for reading&#xA;[hls @ 0x56019db77780] Opening &#x27;cams/stream1_115.ts&#x27; for reading&#xA;[swscaler @ 0x5601a2c78e40] deprecated pixel format used, make sure you did set range correctly&#xA;[swscaler @ 0x5601a332c940] deprecated pixel format used, make sure you did set range correctly&#xA;[swscaler @ 0x5601a2c78e40] deprecated pixel format used, make sure you did set range correctly&#xA;    Last message repeated 2 times&#xA;[swscaler @ 0x5601a332c940] deprecated pixel format used, make sure you did set range correctly&#xA;[swscaler @ 0x5601a361fc00] deprecated pixel format used, make sure you did set range correctly&#xA;    Last message repeated 1 times&#xA;[libx264 @ 0x56019e5212c0] using SAR=1/1&#xA;[libx264 @ 0x56019e5212c0] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2&#xA;[libx264 @ 0x56019e5212c0] profile Constrained Baseline, level 5.1, 4:2:0, 8-bit&#xA;[libx264 @ 0x56019e5212c0] 264 - core 160 r3011 cde9a93 - H.264/MPEG-4 AVC codec - Copyleft 2003-2020 - http://www.videolan.org/x264.html - options: cabac=0 ref=1 deblock=0:0:0 analyse=0:0 me=dia subme=0 psy=1 psy_rd=1.00:0.00 mixed_ref=0 me_range=16 chroma_me=1 trellis=0 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=0 threads=8 lookahead_threads=8 sliced_threads=1 slices=8 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=0 weightp=0 keyint=60 keyint_min=6 scenecut=0 intra_refresh=0 rc_lookahead=0 rc=crf mbtree=0 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 vbv_maxrate=2000 vbv_bufsize=20000 crf_max=0.0 nal_hrd=none filler=0 ip_ratio=1.40 aq=0&#xA;Output #0, flv, to &#x27;rtmp://b.rtmp.youtube.com/live2/XXXX-XXXX-XXXX-XXXX-XXXX?backup=1&#x27;:&#xA;  Metadata:&#xA;    encoder         : Lavf59.35.100&#xA;  Stream #0:0: Video: h264 ([7][0][0][0] / 0x0007), yuv420p(progressive), 3840x2160 [SAR 1:1 DAR 16:9], q=2-31, 30 fps, 1k tbn&#xA;    Metadata:&#xA;      encoder         : Lavc59.56.100 libx264&#xA;    Side data:&#xA;      cpb: bitrate max/min/avg: 2000000/0/0 buffer size: 20000000 vbv_delay: N/A&#xA;  Stream #0:1: Audio: aac (LC) ([10][0][0][0] / 0x000A), 48000 Hz, stereo, fltp, 96 kb/s&#xA;    Metadata:&#xA;      encoder         : Lavc59.56.100 aac&#xA;[hls @ 0x56019db77780] Skip (&#x27;#EXT-X-VERSION:3&#x27;)00:00:03.22 bitrate=7519.6kbits/s speed=0.359x&#xA;[hls @ 0x56019db77780] Opening &#x27;cams/stream1_116.ts&#x27; for reading&#xA;[hls @ 0x56019db77780] Skip (&#x27;#EXT-X-VERSION:3&#x27;)00:00:07.23 bitrate=4470.2kbits/s speed=0.383x&#xA;[hls @ 0x56019db77780] Opening &#x27;cams/stream1_117.ts&#x27; for reading&#xA;[hls @ 0x56019f0ec980] Skip (&#x27;#EXT-X-VERSION:3&#x27;)00:00:09.04 bitrate=3978.1kbits/s speed=0.384x&#xA;[hls @ 0x56019f0ec980] Opening &#x27;cams/stream4_27.ts&#x27; for reading&#xA;[hls @ 0x56019dccdbc0] Skip (&#x27;#EXT-X-VERSION:3&#x27;)&#xA;[hls @ 0x56019dccdbc0] Opening &#x27;cams/stream3_15.ts&#x27; for reading&#xA;[hls @ 0x56019db9e980] Skip (&#x27;#EXT-X-VERSION:3&#x27;)&#xA;[hls @ 0x56019db9e980] Opening &#x27;cams/stream2_106.ts&#x27; for reading&#xA;[flv @ 0x56019e639a00] Failed to update header with correct duration.811.6kbits/s speed=0.385x&#xA;[flv @ 0x56019e639a00] Failed to update header with correct filesize.&#xA;frame=  299 fps= 12 q=34.0 Lsize=    4622kB time=00:00:09.98 bitrate=3792.7kbits/s speed=0.386x&#xA;video:4603kB audio:3kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.349536%&#xA;[libx264 @ 0x56019e5212c0] frame I:5     Avg QP:45.60  size:275880&#xA;[libx264 @ 0x56019e5212c0] frame P:294   Avg QP:38.77  size: 11340&#xA;[libx264 @ 0x56019e5212c0] mb I  I16..4: 100.0%  0.0%  0.0%&#xA;[libx264 @ 0x56019e5212c0] mb P  I16..4:  1.4%  0.0%  0.0%  P16..4:  4.7%  0.0%  0.0%  0.0%  0.0%    skip:93.9%&#xA;[libx264 @ 0x56019e5212c0] coded y,uvDC,uvAC intra: 16.2% 8.9% 1.2% inter: 1.8% 0.6% 0.0%&#xA;[libx264 @ 0x56019e5212c0] i16 v,h,dc,p: 64% 17% 15%  5%&#xA;[libx264 @ 0x56019e5212c0] i8c dc,h,v,p: 90%  6%  3%  1%&#xA;[libx264 @ 0x56019e5212c0] kb/s:3783.23&#xA;[aac @ 0x56019e63a700] Qavg: 65511.207&#xA;[hls @ 0x56019db77780] Skip (&#x27;#EXT-X-VERSION:3&#x27;)&#xA;[hls @ 0x56019db77780] Opening &#x27;cams/stream1_118.ts&#x27; for reading&#xA;

    &#xA;

    NOTES : sources are cams streamed first to hls/m3u8. -t 10 only for testing purposes.

    &#xA;

    The problem is variable output fps= 12 (sometimes 2, 5, 10, maybe 13) where I expect 30. Machine is 10 times greater (encode uses up to 5% cpu).

    &#xA;

    Im trying adding -re, -r 30, -r 15 to sources, convert sources via stream_filter (,fps=30), vsync (old versions of ffmpeg), wallclock time, etc. and reading stackoverflow of course. And... nothing.

    &#xA;

    Where is the problem ?

    &#xA;