Recherche avancée

Médias (91)

Autres articles (62)

  • Keeping control of your media in your hands

    13 avril 2011, par

    The vocabulary used on this site and around MediaSPIP in general, aims to avoid reference to Web 2.0 and the companies that profit from media-sharing.
    While using MediaSPIP, you are invited to avoid using words like "Brand", "Cloud" and "Market".
    MediaSPIP is designed to facilitate the sharing of creative media online, while allowing authors to retain complete control of their work.
    MediaSPIP aims to be accessible to as many people as possible and development is based on expanding the (...)

  • Gestion des droits de création et d’édition des objets

    8 février 2011, par

    Par défaut, beaucoup de fonctionnalités sont limitées aux administrateurs mais restent configurables indépendamment pour modifier leur statut minimal d’utilisation notamment : la rédaction de contenus sur le site modifiables dans la gestion des templates de formulaires ; l’ajout de notes aux articles ; l’ajout de légendes et d’annotations sur les images ;

  • HTML5 audio and video support

    13 avril 2011, par

    MediaSPIP uses HTML5 video and audio tags to play multimedia files, taking advantage of the latest W3C innovations supported by modern browsers.
    The MediaSPIP player used has been created specifically for MediaSPIP and can be easily adapted to fit in with a specific theme.
    For older browsers the Flowplayer flash fallback is used.
    MediaSPIP allows for media playback on major mobile platforms with the above (...)

Sur d’autres sites (8353)

  • Concat filter : Error initializing output stream

    18 juin 2020, par Ittai Barkai

    This is a follow-up question to : Flutter (Dart) : Merge two videos and view the new output in the device’s gallery (photos)

    



    In essence, I am trying to record two videos, merge them and then view the new video in the gallery. I am currently having some issues with the flutter_ffmpeg package.

    



    I uploaded the my Flutter project onto GitHub here :

    



    https://github.com/IttaiBarkai/Flutter-Video-Merger

    



    Below is a snippet of my code used to execute ffmpeg :

    



    void _videoMerger() async {

    final appDir = await syspaths.getApplicationDocumentsDirectory();
    String rawDocumentPath = appDir.path;
    final outputPath = '$rawDocumentPath/output.mp4';

    final FlutterFFmpeg _flutterFFmpeg = new FlutterFFmpeg();

        String commandToExecute = '-y -i ${_storedVideoOne.path} -i ${_storedVideoTwo.path} -filter_complex \'[0:0][1:0]concat=n=2:v=1:a=0[out]\' -map \'[out]\' $outputPath';
        _flutterFFmpeg.execute(commandToExecute).then((rc) => print("FFmpeg process exited with rc $rc"));

  }


    



    and this is the output displayed on my debug console when ffmpeg gets executed :

    



    D/flutter-ffmpeg(29135): Running FFmpeg with arguments: [-y, -i, /storage/emulated/0/Android/data/com.example.video_merger_two/files/Pictures/1e8947f4-c9c2-4020-b78d-c40fb77ce0d16301015681843175998.mp4, -i, /storage/emulated/0/Android/data/com.example.video_merger_two/files/Pictures/3555b190-a9a6-450d-b6a7-7d1b8fc89ad38627500242651150494.mp4, -filter_complex, [0:0][1:0]concat=n=2:v=1:a=0[out], -map, [out], /data/user/0/com.example.video_merger_two/app_flutter/output.mp4].
    I/mobile-ffmpeg(29135): Loading mobile-ffmpeg.
    I/mobile-ffmpeg(29135): Loaded mobile-ffmpeg-https-x86-4.3.1-20200125.
    D/mobile-ffmpeg(29135): Callback thread started.
    I/mobile-ffmpeg(29135): ffmpeg version git-2020-01-25-fd11dd500
    I/mobile-ffmpeg(29135):  Copyright (c) 2000-2020 the FFmpeg developers
    I/mobile-ffmpeg(29135):
    I/mobile-ffmpeg(29135):   built with Android (5220042 based on r346389c) clang version 8.0.7 (https://android.googlesource.com/toolchain/clang b55f2d4ebfd35bf643d27dbca1bb228957008617) (https://android.googlesource.com/toolchain/llvm 3c393fe7a7e13b0fba4ac75a01aa683d7a5b11cd) (based on LLVM 8.0.7svn)
    I/mobile-ffmpeg(29135):   configuration: --cross-prefix=i686-linux-android- --sysroot=/files/android-sdk/ndk-bundle/toolchains/llvm/prebuilt/linux-x86_64/sysroot --prefix=/home/taner/Projects/mobile-ffmpeg/prebuilt/android-x86/ffmpeg --pkg-config=/usr/bin/pkg-config --enable-version3 --arch=i686 --cpu=i686 --cc=i686-linux-android24-clang --cxx=i686-linux-android24-clang++ --target-os=android --disable-neon --disable-asm --disable-inline-asm --enable-cross-compile --enable-pic --enable-jni --enable-optimizations --enable-swscale --enable-shared --disable-v4l2-m2m --disable-outdev=v4l2 --disable-outdev=fbdev --disable-indev=v4l2 --disable-indev=fbdev --enable-small --disable-openssl --disable-xmm-clobber-test --disable-debug --enable-lto --disable-neon-clobber-test --disable-programs --disable-postproc --disable-doc --disable-htmlpages --disable-manpages --disable-podpages --disable-txtpages --disable-static --disable-sndio --disable-schannel --disable-securetransport --disable-xlib --disable-cuda --disable-cuvid --disable-nvenc --di
    I/mobile-ffmpeg(29135):   libavutil      56. 38.100 / 56. 38.100
    I/mobile-ffmpeg(29135):   libavcodec     58. 65.102 / 58. 65.102
    I/mobile-ffmpeg(29135):   libavformat    58. 35.101 / 58. 35.101
    I/mobile-ffmpeg(29135):   libavdevice    58.  9.103 / 58.  9.103
    I/mobile-ffmpeg(29135):   libavfilter     7. 70.101 /  7. 70.101
    I/mobile-ffmpeg(29135):   libswscale      5.  6.100 /  5.  6.100
    I/mobile-ffmpeg(29135):   libswresample   3.  6.100 /  3.  6.100
    I/mobile-ffmpeg(29135): Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/storage/emulated/0/Android/data/com.example.video_merger_two/files/Pictures/1e8947f4-c9c2-4020-b78d-c40fb77ce0d16301015681843175998.mp4':
    I/mobile-ffmpeg(29135):   Metadata:
    I/mobile-ffmpeg(29135):     major_brand     :
    I/mobile-ffmpeg(29135): mp42
    I/mobile-ffmpeg(29135):
    I/mobile-ffmpeg(29135):     minor_version   :
    I/mobile-ffmpeg(29135): 0
    I/mobile-ffmpeg(29135):
    I/mobile-ffmpeg(29135):     compatible_brands:
    I/mobile-ffmpeg(29135): isommp42
    I/mobile-ffmpeg(29135):
    I/mobile-ffmpeg(29135):     creation_time   :
    I/mobile-ffmpeg(29135): 2020-06-17T18:26:00.000000Z
    I/mobile-ffmpeg(29135):
    I/mobile-ffmpeg(29135):     com.android.version:
    I/mobile-ffmpeg(29135): 10
    I/mobile-ffmpeg(29135):
    I/mobile-ffmpeg(29135):   Duration:
    I/mobile-ffmpeg(29135): 27:34:19.38
    I/mobile-ffmpeg(29135): , start:
    I/mobile-ffmpeg(29135): 0.000000
    I/mobile-ffmpeg(29135): , bitrate:
    I/mobile-ffmpeg(29135): 0 kb/s
    I/mobile-ffmpeg(29135):
    I/mobile-ffmpeg(29135):     Stream #0:0
    I/mobile-ffmpeg(29135): (eng)
    I/mobile-ffmpeg(29135): : Video: h264 (avc1 / 0x31637661), yuv420p(tv, GBR), 1280x720, 3554 kb/s
    I/mobile-ffmpeg(29135): , SAR 1:1 DAR 16:9
    I/mobile-ffmpeg(29135): ,
    I/mobile-ffmpeg(29135): 29.01 fps,
    I/mobile-ffmpeg(29135): 29 tbr,
    I/mobile-ffmpeg(29135): 90k tbn,
    I/mobile-ffmpeg(29135): 180k tbc    
    I/mobile-ffmpeg(29135):  (default)
    I/mobile-ffmpeg(29135):
    I/mobile-ffmpeg(29135):     Metadata:
    I/mobile-ffmpeg(29135):       rotate          :
    I/mobile-ffmpeg(29135): 90
    I/mobile-ffmpeg(29135):
    I/mobile-ffmpeg(29135):       creation_time   :
    I/mobile-ffmpeg(29135): 2020-06-17T18:26:00.000000Z
    I/mobile-ffmpeg(29135):
    I/mobile-ffmpeg(29135):       handler_name    :
    I/mobile-ffmpeg(29135): VideoHandle
    I/mobile-ffmpeg(29135):
    I/mobile-ffmpeg(29135):     Side data:
    I/mobile-ffmpeg(29135):
    I/mobile-ffmpeg(29135): displaymatrix: rotation of -90.00 degrees
    I/mobile-ffmpeg(29135):
    I/mobile-ffmpeg(29135):     Stream #0:1
    I/mobile-ffmpeg(29135): (eng)
    I/mobile-ffmpeg(29135): : Audio: amr_nb (samr / 0x726D6173), 8000 Hz, mono, flt, 12 kb/s
    I/mobile-ffmpeg(29135):  (default)
    I/mobile-ffmpeg(29135):
    I/mobile-ffmpeg(29135):     Metadata:
    I/mobile-ffmpeg(29135):       creation_time   :
    I/mobile-ffmpeg(29135): 2020-06-17T18:26:00.000000Z
    I/mobile-ffmpeg(29135):
    I/mobile-ffmpeg(29135):       handler_name    :
    I/mobile-ffmpeg(29135): SoundHandle
    I/mobile-ffmpeg(29135):
    I/mobile-ffmpeg(29135): Input #1, mov,mp4,m4a,3gp,3g2,mj2, from '/storage/emulated/0/Android/data/com.example.video_merger_two/files/Pictures/3555b190-a9a6-450d-b6a7-7d1b8fc89ad38627500242651150494.mp4':
    I/mobile-ffmpeg(29135):   Metadata:
    I/mobile-ffmpeg(29135):     major_brand     :
    I/mobile-ffmpeg(29135): mp42
    I/mobile-ffmpeg(29135):
    I/mobile-ffmpeg(29135):     minor_version   :
    I/mobile-ffmpeg(29135): 0
    I/mobile-ffmpeg(29135):
    I/mobile-ffmpeg(29135):     compatible_brands:
    I/mobile-ffmpeg(29135): isommp42
    I/mobile-ffmpeg(29135):
    I/mobile-ffmpeg(29135):     creation_time   :
    I/mobile-ffmpeg(29135): 2020-06-17T18:26:09.000000Z
    I/mobile-ffmpeg(29135):
    I/mobile-ffmpeg(29135):     com.android.version:
    I/mobile-ffmpeg(29135): 10
    I/mobile-ffmpeg(29135):
    I/mobile-ffmpeg(29135):   Duration:
    I/mobile-ffmpeg(29135): 27:34:19.62
    I/mobile-ffmpeg(29135): , start:
    I/mobile-ffmpeg(29135): 0.000000
    I/mobile-ffmpeg(29135): , bitrate:
    I/mobile-ffmpeg(29135): 0 kb/s
    I/mobile-ffmpeg(29135):
    I/mobile-ffmpeg(29135):     Stream #1:0
    I/mobile-ffmpeg(29135): (eng)
    I/mobile-ffmpeg(29135): : Video: h264 (avc1 / 0x31637661), yuv420p(tv, GBR), 1280x720, 3765 kb/s
    I/mobile-ffmpeg(29135): , SAR 1:1 DAR 16:9
    I/mobile-ffmpeg(29135): ,
    I/mobile-ffmpeg(29135): 28.80 fps,
    I/mobile-ffmpeg(29135): 29.08 tbr,
    I/mobile-ffmpeg(29135): 90k tbn,
    I/mobile-ffmpeg(29135): 180k tbc
    I/mobile-ffmpeg(29135):  (default)
    I/mobile-ffmpeg(29135):
    I/mobile-ffmpeg(29135):     Metadata:
    I/mobile-ffmpeg(29135):       rotate          :
    I/mobile-ffmpeg(29135): 90
    I/mobile-ffmpeg(29135):
    I/mobile-ffmpeg(29135):       creation_time   :
    I/mobile-ffmpeg(29135): 2020-06-17T18:26:09.000000Z
    I/mobile-ffmpeg(29135):
    I/mobile-ffmpeg(29135):       handler_name    :
    I/mobile-ffmpeg(29135): VideoHandle
    I/mobile-ffmpeg(29135):
    I/mobile-ffmpeg(29135):     Side data:
    I/mobile-ffmpeg(29135):
    I/mobile-ffmpeg(29135): displaymatrix: rotation of -90.00 degrees
    I/mobile-ffmpeg(29135):
    I/mobile-ffmpeg(29135):     Stream #1:1
    I/mobile-ffmpeg(29135): (eng)
    I/mobile-ffmpeg(29135): : Audio: amr_nb (samr / 0x726D6173), 8000 Hz, mono, flt, 12 kb/s
    I/mobile-ffmpeg(29135):  (default)
    I/mobile-ffmpeg(29135):
    I/mobile-ffmpeg(29135):     Metadata:
    I/mobile-ffmpeg(29135):       creation_time   :
    I/mobile-ffmpeg(29135): 2020-06-17T18:26:09.000000Z
    I/mobile-ffmpeg(29135):
    I/mobile-ffmpeg(29135):       handler_name    :
    I/mobile-ffmpeg(29135): SoundHandle
    I/mobile-ffmpeg(29135):
    I/mobile-ffmpeg(29135): Stream mapping:
    I/mobile-ffmpeg(29135):   Stream #0:0 (h264) -> concat:in0:v0
    I/mobile-ffmpeg(29135):
    I/mobile-ffmpeg(29135):   Stream #1:0 (h264) -> concat:in1:v0
    I/mobile-ffmpeg(29135):
    I/mobile-ffmpeg(29135):   concat
    I/mobile-ffmpeg(29135):  -> Stream #0:0 (mpeg4)
    I/mobile-ffmpeg(29135): Press [q] to stop, [?] for help
    W/mobile-ffmpeg(29135): [graph 0 input from stream 0:0 @ 0xed087710] sws_param option is deprecated and ignored
    W/mobile-ffmpeg(29135): [graph 0 input from stream 1:0 @ 0xed086830] sws_param option is deprecated and ignored
    W/mobile-ffmpeg(29135): [mp4 @ 0xeccd8790] Frame rate very high for a muxer not efficiently supporting it.
    W/mobile-ffmpeg(29135): Please consider specifying a lower framerate, a different muxer or -vsync 2
    E/mobile-ffmpeg(29135): [mpeg4 @ 0xe68049d0] timebase 1/1000000 not supported by MPEG 4 standard, the maximum admitted value for the timebase denominator is 65535
    E/mobile-ffmpeg(29135): Error initializing output stream 0:0 -- Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height
    I/mobile-ffmpeg(29135): Conversion failed!
    D/flutter-ffmpeg(29135): FFmpeg exited with rc: 1
    I/flutter (29135): FFmpeg process exited with rc 1


    


  • Flutter (Dart) : Merge two videos and view the new output in the device's gallery (photos)

    17 juin 2020, par Ittai Barkai

    I am aware that there already exists a solution to a very similar question, which can be found on the following link : Flutter/Dart : Find two video segments and merge them into a single valid video file ? However, being relatively new to Flutter (and programming in general) I cannot seem to replicate the desired result.

    



    My app is very simple and currently looks like this :

    



    enter image description here

    



    I click on the button "Record Video" to record two videos, which are both successfully stored into the device's gallery. Using the Flutter image_picker and gallery_saver packages and the following piece of code :

    



        void _recordVideo() async {
    ImagePicker.pickVideo(source: ImageSource.camera)
        .then((File recordedVideo) {
      if (recordedVideo != null && recordedVideo.path != null) {
        setState(() {
          _buttonText = 'Saving in Progress...';
        });
        GallerySaver.saveVideo(recordedVideo.path).then((_) {
          setState(() {
            _buttonText = 'Video Saved!\n\nClick to Record New Video';
            if (_storedVideoOne == null) {
              _storedVideoOne = recordedVideo;
              print('video 1 stored');
            } else {
              _storedVideoTwo = recordedVideo;
              print('video 2 stored');
              _videoMerger();
            }
          });
        });
      }
    });
  }


    



    I can view these videos when I click on the button at the bottom "View Video From Gallery".

    



    Next I try to merge these two stored video files, using the flutter_ffmpeg package, as well as following the solution provided in the stack overflow question mentioned above. I try and do this using the following function I wrote :

    



    void _videoMerger() async {


    final appDir = await syspaths.getApplicationDocumentsDirectory();
    String rawDocumentPath = appDir.path;
    final outputPath = '$rawDocumentPath/output.mp4';

    final FlutterFFmpeg _flutterFFmpeg = new FlutterFFmpeg();

        String commandToExecute = '-i ${_storedVideoOne.path} -i ${_storedVideoTwo.path} -filter_complex \'[0:0][1:0]concat=n=2:v=1:a=0[out]\' -map \'[out]\' outputPath';
        _flutterFFmpeg.execute(commandToExecute).then((rc) => print("FFmpeg process exited with rc $rc"));

  }


    



    But after running the function I do not seem to get a new combined video, which should be stored in outputPath and ideally also viewable in the gallery. Uploaded the Flutter project onto GitHub here :

    



    https://github.com/IttaiBarkai/Flutter-Video-Merger

    



    Any help would be greatly appreciated :)

    



    Updated :

    



    Below is the output displayed on my debug console when ffmpeg gets executed :

    



    D/flutter-ffmpeg( 4146): Running FFmpeg with arguments: [-i, /storage/emulated/0/Android/data/com.example.video_merger_two/files/Pictures/d2b7a612-7c6d-48fe-8d06-85ceeb10e2f584195978113840656.mp4, -i, /storage/emulated/0/Android/data/com.example.video_merger_two/files/Pictures/b6cb83a3-10ac-49c7-80f3-3447bebe93ac5245748251872788895.mp4, -filter_complex, [0:0][1:0]concat=n=2:v=1:a=0[out], -map, [out], outputPath.mp4].
I/mobile-ffmpeg( 4146): ffmpeg version git-2020-01-25-fd11dd500
I/mobile-ffmpeg( 4146):  Copyright (c) 2000-2020 the FFmpeg developers
I/mobile-ffmpeg( 4146):
I/mobile-ffmpeg( 4146):   built with Android (5220042 based on r346389c) clang version 8.0.7 (https://android.googlesource.com/toolchain/clang b55f2d4ebfd35bf643d27dbca1bb228957008617) (https://android.googlesource.com/toolchain/llvm 3c393fe7a7e13b0fba4ac75a01aa683d7a5b11cd) (based on LLVM 8.0.7svn)
I/mobile-ffmpeg( 4146):   configuration: --cross-prefix=i686-linux-android- --sysroot=/files/android-sdk/ndk-bundle/toolchains/llvm/prebuilt/linux-x86_64/sysroot --prefix=/home/taner/Projects/mobile-ffmpeg/prebuilt/android-x86/ffmpeg --pkg-config=/usr/bin/pkg-config --enable-version3 --arch=i686 --cpu=i686 --cc=i686-linux-android24-clang --cxx=i686-linux-android24-clang++ --target-os=android --disable-neon --disable-asm --disable-inline-asm --enable-cross-compile --enable-pic --enable-jni --enable-optimizations --enable-swscale --enable-shared --disable-v4l2-m2m --disable-outdev=v4l2 --disable-outdev=fbdev --disable-indev=v4l2 --disable-indev=fbdev --enable-small --disable-openssl --disable-xmm-clobber-test --disable-debug --enable-lto --disable-neon-clobber-test --disable-programs --disable-postproc --disable-doc --disable-htmlpages --disable-manpages --disable-podpages --disable-txtpages --disable-static --disable-sndio --disable-schannel --disable-securetransport --disable-xlib --disable-cuda --disable-cuvid --disable-nvenc --di
I/mobile-ffmpeg( 4146):   libavutil      56. 38.100 / 56. 38.100
I/mobile-ffmpeg( 4146):   libavcodec     58. 65.102 / 58. 65.102
I/mobile-ffmpeg( 4146):   libavformat    58. 35.101 / 58. 35.101
I/mobile-ffmpeg( 4146):   libavdevice    58.  9.103 / 58.  9.103
I/mobile-ffmpeg( 4146):   libavfilter     7. 70.101 /  7. 70.101
I/mobile-ffmpeg( 4146):   libswscale      5.  6.100 /  5.  6.100
I/mobile-ffmpeg( 4146):   libswresample   3.  6.100 /  3.  6.100
I/mobile-ffmpeg( 4146): Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/storage/emulated/0/Android/data/com.example.video_merger_two/files/Pictures/d2b7a612-7c6d-48fe-8d06-85ceeb10e2f584195978113840656.mp4':
I/mobile-ffmpeg( 4146):   Metadata:
I/mobile-ffmpeg( 4146):     major_brand     :
I/mobile-ffmpeg( 4146): mp42
I/mobile-ffmpeg( 4146):
I/mobile-ffmpeg( 4146):     minor_version   :
I/mobile-ffmpeg( 4146): 0
I/mobile-ffmpeg( 4146):
I/mobile-ffmpeg( 4146):     compatible_brands:
I/mobile-ffmpeg( 4146): isommp42
I/mobile-ffmpeg( 4146):
I/mobile-ffmpeg( 4146):     creation_time   :
I/mobile-ffmpeg( 4146): 2020-06-17T12:07:20.000000Z
I/mobile-ffmpeg( 4146):
I/mobile-ffmpeg( 4146):     com.android.version:
I/mobile-ffmpeg( 4146): 10
I/mobile-ffmpeg( 4146):
I/mobile-ffmpeg( 4146):   Duration:
I/mobile-ffmpeg( 4146): 27:34:19.40
I/mobile-ffmpeg( 4146): , start:
I/mobile-ffmpeg( 4146): 0.000000
I/mobile-ffmpeg( 4146): , bitrate:
I/mobile-ffmpeg( 4146): 0 kb/s
I/mobile-ffmpeg( 4146):
I/mobile-ffmpeg( 4146):     Stream #0:0
I/mobile-ffmpeg( 4146): (eng)
I/mobile-ffmpeg( 4146): : Video: h264 (avc1 / 0x31637661), yuv420p(tv, GBR), 1280x720, 3536 kb/s
I/mobile-ffmpeg( 4146): , SAR 1:1 DAR 16:9
I/mobile-ffmpeg( 4146): ,
I/mobile-ffmpeg( 4146): 28.75 fps,
I/mobile-ffmpeg( 4146): 29.08 tbr,
I/mobile-ffmpeg( 4146): 90k tbn,
I/mobile-ffmpeg( 4146): 180k tbc
I/mobile-ffmpeg( 4146):  (default)
I/mobile-ffmpeg( 4146):
I/mobile-ffmpeg( 4146):     Metadata:
I/mobile-ffmpeg( 4146):       rotate          :
I/mobile-ffmpeg( 4146): 90
I/mobile-ffmpeg( 4146):
I/mobile-ffmpeg( 4146):       creation_time   :
I/mobile-ffmpeg( 4146): 2020-06-17T12:07:20.000000Z
I/mobile-ffmpeg( 4146):
I/mobile-ffmpeg( 4146):       handler_name    :
I/mobile-ffmpeg( 4146): VideoHandle
I/mobile-ffmpeg( 4146):
I/mobile-ffmpeg( 4146):     Side data:
I/mobile-ffmpeg( 4146):
I/mobile-ffmpeg( 4146): displaymatrix: rotation of -90.00 degrees
I/mobile-ffmpeg( 4146):
I/mobile-ffmpeg( 4146):     Stream #0:1
I/mobile-ffmpeg( 4146): (eng)
I/mobile-ffmpeg( 4146): : Audio: amr_nb (samr / 0x726D6173), 8000 Hz, mono, flt, 12 kb/s
I/mobile-ffmpeg( 4146):  (default)
I/mobile-ffmpeg( 4146):
I/mobile-ffmpeg( 4146):     Metadata:
I/mobile-ffmpeg( 4146):       creation_time   :
I/mobile-ffmpeg( 4146): 2020-06-17T12:07:20.000000Z
I/mobile-ffmpeg( 4146):
I/mobile-ffmpeg( 4146):       handler_name    :
I/mobile-ffmpeg( 4146): SoundHandle
I/mobile-ffmpeg( 4146):
I/mobile-ffmpeg( 4146): Input #1, mov,mp4,m4a,3gp,3g2,mj2, from '/storage/emulated/0/Android/data/com.example.video_merger_two/files/Pictures/b6cb83a3-10ac-49c7-80f3-3447bebe93ac5245748251872788895.mp4':
I/mobile-ffmpeg( 4146):   Metadata:
I/mobile-ffmpeg( 4146):     major_brand     :
I/mobile-ffmpeg( 4146): mp42
I/mobile-ffmpeg( 4146):
I/mobile-ffmpeg( 4146):     minor_version   :
I/mobile-ffmpeg( 4146): 0
I/mobile-ffmpeg( 4146):
I/mobile-ffmpeg( 4146):     compatible_brands:
I/mobile-ffmpeg( 4146): isommp42
I/mobile-ffmpeg( 4146):
I/mobile-ffmpeg( 4146):     creation_time   :
I/mobile-ffmpeg( 4146): 2020-06-17T12:07:32.000000Z
I/mobile-ffmpeg( 4146):
I/mobile-ffmpeg( 4146):     com.android.version:
I/mobile-ffmpeg( 4146): 10
I/mobile-ffmpeg( 4146):
I/mobile-ffmpeg( 4146):   Duration:
I/mobile-ffmpeg( 4146): 27:34:19.35
I/mobile-ffmpeg( 4146): , start:
I/mobile-ffmpeg( 4146): 0.000000
I/mobile-ffmpeg( 4146): , bitrate:
I/mobile-ffmpeg( 4146): 0 kb/s
I/mobile-ffmpeg( 4146):
I/mobile-ffmpeg( 4146):     Stream #1:0
I/mobile-ffmpeg( 4146): (eng)
I/mobile-ffmpeg( 4146): : Video: h264 (avc1 / 0x31637661), yuv420p(tv, GBR), 1280x720, 3561 kb/s
I/mobile-ffmpeg( 4146): , SAR 1:1 DAR 16:9
I/mobile-ffmpeg( 4146): ,
I/mobile-ffmpeg( 4146): 28.95 fps,
I/mobile-ffmpeg( 4146): 29 tbr,
I/mobile-ffmpeg( 4146): 90k tbn,
I/mobile-ffmpeg( 4146): 180k tbc
I/mobile-ffmpeg( 4146):  (default)
I/mobile-ffmpeg( 4146):
I/mobile-ffmpeg( 4146):     Metadata:
I/mobile-ffmpeg( 4146):       rotate          
:
I/mobile-ffmpeg( 4146): 90
I/mobile-ffmpeg( 4146):
I/mobile-ffmpeg( 4146):       creation_time   :
I/mobile-ffmpeg( 4146): 2020-06-17T12:07:32.000000Z
I/mobile-ffmpeg( 4146):
I/mobile-ffmpeg( 4146):       handler_name    :
I/mobile-ffmpeg( 4146): VideoHandle
I/mobile-ffmpeg( 4146):
I/mobile-ffmpeg( 4146):     Side data:
I/mobile-ffmpeg( 4146):
I/mobile-ffmpeg( 4146): displaymatrix: rotation of -90.00 degrees
I/mobile-ffmpeg( 4146):
I/mobile-ffmpeg( 4146):     Stream #1:1
I/mobile-ffmpeg( 4146): (eng)
I/mobile-ffmpeg( 4146): : Audio: amr_nb (samr / 0x726D6173), 8000 Hz, mono, flt, 12 kb/s
I/mobile-ffmpeg( 4146):  (default)
I/mobile-ffmpeg( 4146):
I/mobile-ffmpeg( 4146):     Metadata:
I/mobile-ffmpeg( 4146):       creation_time   :
I/mobile-ffmpeg( 4146): 2020-06-17T12:07:32.000000Z
I/mobile-ffmpeg( 4146):
I/mobile-ffmpeg( 4146):       handler_name    :
I/mobile-ffmpeg( 4146): SoundHandle
I/mobile-ffmpeg( 4146):
E/mobile-ffmpeg( 4146): outputPath.mp4: Read-only file system
D/flutter-ffmpeg( 4146): FFmpeg exited with rc: 1
I/flutter ( 4146): FFmpeg process exited with rc 1


    


  • ffmpeg webm to mp4 conversion failed

    13 juin 2020, par Jaunius Bumptirklu

    Trying to convert webm file to mp4. Getting "conversion failed" as a result. Other webm files I am working with converts just fine.

    



    ffprobe info on inputfile.webm

    



    $ ffprobe -v quiet -print_format json -show_format -show_streams inputfile.webm
{
    "streams": [
        {
            "index": 0,
            "codec_name": "vp8",
            "codec_long_name": "On2 VP8",
            "profile": "0",
            "codec_type": "video",
            "codec_time_base": "1/30",
            "codec_tag_string": "[0][0][0][0]",
            "codec_tag": "0x0000",
            "width": 640,
            "height": 480,
            "coded_width": 640,
            "coded_height": 480,
            "has_b_frames": 0,
            "sample_aspect_ratio": "1:1",
            "display_aspect_ratio": "4:3",
            "pix_fmt": "yuv420p",
            "level": -99,
            "field_order": "progressive",
            "refs": 1,
            "r_frame_rate": "30/1",
            "avg_frame_rate": "30/1",
            "time_base": "1/1000",
            "start_pts": 0,
            "start_time": "0.000000",
            "disposition": {
                "default": 1,
                "dub": 0,
                "original": 0,
                "comment": 0,
                "lyrics": 0,
                "karaoke": 0,
                "forced": 0,
                "hearing_impaired": 0,
                "visual_impaired": 0,
                "clean_effects": 0,
                "attached_pic": 0,
                "timed_thumbnails": 0
            }
        },
        {
            "index": 1,
            "codec_name": "opus",
            "codec_long_name": "Opus (Opus Interactive Audio Codec)",
            "codec_type": "audio",
            "codec_time_base": "1/48000",
            "codec_tag_string": "[0][0][0][0]",
            "codec_tag": "0x0000",
            "sample_fmt": "fltp",
            "sample_rate": "48000",
            "channels": 1,
            "channel_layout": "mono",
            "bits_per_sample": 0,
            "r_frame_rate": "0/0",
            "avg_frame_rate": "0/0",
            "time_base": "1/1000",
            "start_pts": 0,
            "start_time": "0.000000",
            "duration_ts": 12333,
            "duration": "12.333000",
            "disposition": {
                "default": 1,
                "dub": 0,
                "original": 0,
                "comment": 0,
                "lyrics": 0,
                "karaoke": 0,
                "forced": 0,
                "hearing_impaired": 0,
                "visual_impaired": 0,
                "clean_effects": 0,
                "attached_pic": 0,
                "timed_thumbnails": 0
            }
        }
    ],
    "format": {
        "filename": "inputfile.webm",
        "nb_streams": 2,
        "nb_programs": 0,
        "format_name": "matroska,webm",
        "format_long_name": "Matroska / WebM",
        "start_time": "0.000000",
        "duration": "12.333000",
        "size": "1609303",
        "bit_rate": "1043900",
        "probe_score": 100,
        "tags": {
            "encoder": "Lavf56.40.101",
            "creation_time": "2020-06-12T11:32:05.000000Z"
        }
    }
}


    



    ffmpeg conversion log for command "ffmpeg -i inputfile.webm out.mp4" is below.

    



    $ ffmpeg -i inputfile.webm out.mp4
ffmpeg version 4.2.2 Copyright (c) 2000-2019 the FFmpeg developers
  built with Apple clang version 11.0.3 (clang-1103.0.32.59)
  configuration: --prefix=/usr/local/Cellar/ffmpeg/4.2.2_3 --enable-shared --enable-pthreads --enable-version3 --enable-avresample --cc=clang --host-cflags=-fno-stack-check --host-ldflags= --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libbluray --enable-libmp3lame --enable-libopus --enable-librubberband --enable-libsnappy --enable-libsrt --enable-libtesseract --enable-libtheora --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-lzma --enable-libfontconfig --enable-libfreetype --enable-frei0r --enable-libass --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librtmp --enable-libspeex --enable-libsoxr --enable-videotoolbox --disable-libjack --disable-indev=jack
  libavutil      56. 31.100 / 56. 31.100
  libavcodec     58. 54.100 / 58. 54.100
  libavformat    58. 29.100 / 58. 29.100
  libavdevice    58.  8.100 / 58.  8.100
  libavfilter     7. 57.100 /  7. 57.100
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale      5.  5.100 /  5.  5.100
  libswresample   3.  5.100 /  3.  5.100
  libpostproc    55.  5.100 / 55.  5.100
Input #0, matroska,webm, from 'inputfile.webm':
  Metadata:
    encoder         : Lavf56.40.101
    creation_time   : 2020-06-12T11:32:05.000000Z
  Duration: 00:00:12.33, start: 0.000000, bitrate: 1043 kb/s
    Stream #0:0: Video: vp8, yuv420p(progressive), 640x480, SAR 1:1 DAR 4:3, 30 fps, 30 tbr, 1k tbn, 1k tbc (default)
    Stream #0:1: Audio: opus, 48000 Hz, mono, fltp (default)
Stream mapping:
  Stream #0:0 -> #0:0 (vp8 (native) -> h264 (libx264))
  Stream #0:1 -> #0:1 (opus (native) -> aac (native))
Press [q] to stop, [?] for help
[libx264 @ 0x7f9e64811600] using SAR=1/1
[libx264 @ 0x7f9e64811600] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
[libx264 @ 0x7f9e64811600] profile High, level 5.0
[libx264 @ 0x7f9e64811600] 264 - core 155 r2917 0a84d98 - H.264/MPEG-4 AVC codec - Copyleft 2003-2018 - 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=18 lookahead_threads=3 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
Too many packets buffered for output stream 0:0.577014:32:22.77 bitrate=  -0.0kbits/s dup=45 drop=0 speed=N/A
[libx264 @ 0x7f9e64811600] frame I:1     Avg QP:16.69  size: 56001
[libx264 @ 0x7f9e64811600] frame P:33    Avg QP:19.46  size:  9705
[libx264 @ 0x7f9e64811600] frame B:95    Avg QP:19.23  size:   662
[libx264 @ 0x7f9e64811600] consecutive B-frames:  0.8%  0.0%  4.6% 94.7%
[libx264 @ 0x7f9e64811600] mb I  I16..4: 46.7% 36.4% 16.9%
[libx264 @ 0x7f9e64811600] mb P  I16..4:  4.0%  9.4%  0.5%  P16..4:  6.5%  1.2%  0.6%  0.0%  0.0%    skip:77.8%
[libx264 @ 0x7f9e64811600] mb B  I16..4:  0.1%  0.1%  0.0%  B16..8:  6.0%  0.1%  0.0%  direct: 0.7%  skip:93.0%  L0:44.7% L1:54.8% BI: 0.4%
[libx264 @ 0x7f9e64811600] 8x8 transform intra:61.3% inter:37.9%
[libx264 @ 0x7f9e64811600] coded y,uvDC,uvAC intra: 8.6% 3.3% 1.3% inter: 0.9% 0.9% 0.1%
[libx264 @ 0x7f9e64811600] i16 v,h,dc,p: 41% 52%  6%  1%
[libx264 @ 0x7f9e64811600] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 42% 16% 41%  0%  0%  0%  0%  0%  0%
[libx264 @ 0x7f9e64811600] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 32% 40% 17%  2%  2%  2%  2%  1%  3%
[libx264 @ 0x7f9e64811600] i8c dc,h,v,p: 88%  8%  3%  0%
[libx264 @ 0x7f9e64811600] Weighted P-Frames: Y:0.0% UV:0.0%
[libx264 @ 0x7f9e64811600] ref P L0: 75.5% 13.1%  9.1%  2.3%
[libx264 @ 0x7f9e64811600] ref B L0: 82.1% 16.4%  1.5%
[libx264 @ 0x7f9e64811600] ref B L1: 97.0%  3.0%
[libx264 @ 0x7f9e64811600] kb/s:816.97
Conversion failed!


    



    I don't have deeper experience with ffmpeg conversions and codecs. It seems to me that this is a frames related problem. Do you have a clue why does it fail ? What options should I use in ffmpeg command to solve this ? Thanks for any help.