
Recherche avancée
Médias (1)
-
The pirate bay depuis la Belgique
1er avril 2013, par
Mis à jour : Avril 2013
Langue : français
Type : Image
Autres articles (46)
-
Qu’est ce qu’un éditorial
21 juin 2013, parEcrivez votre de point de vue dans un article. Celui-ci sera rangé dans une rubrique prévue à cet effet.
Un éditorial est un article de type texte uniquement. Il a pour objectif de ranger les points de vue dans une rubrique dédiée. Un seul éditorial est placé à la une en page d’accueil. Pour consulter les précédents, consultez la rubrique dédiée.
Vous pouvez personnaliser le formulaire de création d’un éditorial.
Formulaire de création d’un éditorial Dans le cas d’un document de type éditorial, les (...) -
Publier sur MédiaSpip
13 juin 2013Puis-je poster des contenus à partir d’une tablette Ipad ?
Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir -
Contribute to translation
13 avril 2011You can help us to improve the language used in the software interface to make MediaSPIP more accessible and user-friendly. You can also translate the interface into any language that allows it to spread to new linguistic communities.
To do this, we use the translation interface of SPIP where the all the language modules of MediaSPIP are available. Just subscribe to the mailing list and request further informantion on translation.
MediaSPIP is currently available in French and English (...)
Sur d’autres sites (6525)
-
Make a duet video like tiktok
27 juin 2020, par user1hjgjhgjhggjhgHello I want to create a duet video feature like tiktok. I am using FFmepg. I have tried this code


ffmpeg -i movie_output.mp4 -i movie_output.mp4 -filter_complex "nullsrc=size=360x480[base]; \ [0:v] setpts=PTS-STARTPTS, scale=360x480, crop=180:480:90:0[left]; \ [1:v] setpts=PTS-STARTPTS, scale=360x480, crop=180:480:90:0 [right]; \ [base][left] overlay=x=0:y=0[base1]; \ [base1][right] overlay=shortest=1:x=180:y=0" -c:v libx264 -y result.mp4



It gives me this error


No such filter: ' '
Error initializing complex filters.
Invalid argument



Whole output


ubuntu@ip-171-xx-xx-xxx: ffmpeg -i movie_output.mp4 -i movie_output.mp4 -filter_complex "nullsrc=size=360x480[base]; \ [0:v] setpts=PTS-STARTPTS, scale=360x480, crop=180:480:90:0[left]; \ [1:v] setpts=PTS-STARTPTS, scale=360x480, crop=180:480:90:0 [right]; \ [base][left] overlay=x=0:y=0[base1]; \ [base1][right] overlay=shortest=1:x=180:y=0" -c:v libx264 -y result.mp4


ffmpeg version 3.4.6-0ubuntu0.18.04.1 Copyright (c) 2000-2019 the FFmpeg developers
 built with gcc 7 (Ubuntu 7.3.0-16ubuntu3)
 configuration: --prefix=/usr --extra-version=0ubuntu0.18.04.1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-librsvg --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared
 libavutil 55. 78.100 / 55. 78.100
 libavcodec 57.107.100 / 57.107.100
 libavformat 57. 83.100 / 57. 83.100
 libavdevice 57. 10.100 / 57. 10.100
 libavfilter 6.107.100 / 6.107.100
 libavresample 3. 7. 0 / 3. 7. 0
 libswscale 4. 8.100 / 4. 8.100
 libswresample 2. 9.100 / 2. 9.100
 libpostproc 54. 7.100 / 54. 7.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'movie_output.mp4':
 Metadata:
 major_brand : isom
 minor_version : 512
 compatible_brands: isomiso2avc1mp41
 encoder : Lavf58.45.100
 comment : vid:v090440c0000brppph37mt2vmmsj1dig
 Duration: 00:00:08.04, start: 0.000000, bitrate: 1135 kb/s
 Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 540x960 [SAR 1:1 DAR 9:16], 996 kb/s, 30 fps, 30 tbr, 15360 tbn, 60 tbc (default)
 Metadata:
 handler_name : VideoHandler
 Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 129 kb/s (default)
 Metadata:
 handler_name : SoundHandler
Input #1, mov,mp4,m4a,3gp,3g2,mj2, from 'movie_output.mp4':
 Metadata:
 major_brand : isom
 minor_version : 512
 compatible_brands: isomiso2avc1mp41
 encoder : Lavf58.45.100
 comment : vid:v090440c0000brppph37mt2vmmsj1dig
 Duration: 00:00:08.04, start: 0.000000, bitrate: 1135 kb/s
 Stream #1:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 540x960 [SAR 1:1 DAR 9:16], 996 kb/s, 30 fps, 30 tbr, 15360 tbn, 60 tbc (default)
 Metadata:
 handler_name : VideoHandler
 Stream #1:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 129 kb/s (default)
 Metadata:
 handler_name : SoundHandler
[AVFilterGraph @ 0x560fd395e2e0] No such filter: ' '
Error initializing complex filters.
Invalid argument



I have tried this as well


ffmpeg -report -i "movie_output.mp4" -i "movie_output.mp4" -an \ -filter_complex \ "[0:v]trim=start=0:end=9,setpts=PTS-STARTPTS[firstclip]; \ [1:v]trim=start=1,setpts=PTS-STARTPTS[secondclip]; \ [0:v]trim=start=9:end=10,setpts=PTS-STARTPTS[fadeoutsrc]; \ [1:v]trim=start=0:end=1,setpts=PTS-STARTPTS[fadeinsrc]; \ [fadeinsrc]format=pix_fmts=yuva420p,fade=t=in:st=0:d=1:alpha=1[fadein]; \ [fadeoutsrc]format=pix_fmts=yuva420p,fade=t=out:st=0:d=1:alpha=1[fadeout]; \ [fadein]fifo[fadeinfifo]; \ [fadeout]fifo[fadeoutfifo]; \ [fadeoutfifo][fadeinfifo]overlay[crossfade]; \ [firstclip][crossfade][secondclip]concat=n=3" \ outputname.mp4
ffmpeg started on 2020-06-27 at 10:11:41
Report written to "ffmpeg-20200627-101141.log"
ffmpeg version 3.4.6-0ubuntu0.18.04.1 Copyright (c) 2000-2019 the FFmpeg developers
 built with gcc 7 (Ubuntu 7.3.0-16ubuntu3)
 configuration: --prefix=/usr --extra-version=0ubuntu0.18.04.1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-librsvg --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared
 libavutil 55. 78.100 / 55. 78.100
 libavcodec 57.107.100 / 57.107.100
 libavformat 57. 83.100 / 57. 83.100
 libavdevice 57. 10.100 / 57. 10.100
 libavfilter 6.107.100 / 6.107.100
 libavresample 3. 7. 0 / 3. 7. 0
 libswscale 4. 8.100 / 4. 8.100
 libswresample 2. 9.100 / 2. 9.100
 libpostproc 54. 7.100 / 54. 7.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'movie_output.mp4':
 Metadata:
 major_brand : isom
 minor_version : 512
 compatible_brands: isomiso2avc1mp41
 encoder : Lavf58.45.100
 comment : vid:v090440c0000brppph37mt2vmmsj1dig
 Duration: 00:00:08.04, start: 0.000000, bitrate: 1135 kb/s
 Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 540x960 [SAR 1:1 DAR 9:16], 996 kb/s, 30 fps, 30 tbr, 15360 tbn, 60 tbc (default)
 Metadata:
 handler_name : VideoHandler
 Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 129 kb/s (default)
 Metadata:
 handler_name : SoundHandler
Input #1, mov,mp4,m4a,3gp,3g2,mj2, from 'movie_output.mp4':
 Metadata:
 major_brand : isom
 minor_version : 512
 compatible_brands: isomiso2avc1mp41
 encoder : Lavf58.45.100
 comment : vid:v090440c0000brppph37mt2vmmsj1dig
 Duration: 00:00:08.04, start: 0.000000, bitrate: 1135 kb/s
 Stream #1:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 540x960 [SAR 1:1 DAR 9:16], 996 kb/s, 30 fps, 30 tbr, 15360 tbn, 60 tbc (default)
 Metadata:
 handler_name : VideoHandler
 Stream #1:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 129 kb/s (default)
 Metadata:
 handler_name : SoundHandler
[NULL @ 0x562dea344220] Unable to find a suitable output format for ' -filter_complex'
 -filter_complex: Invalid argument



This code gives this error


Unable to find a suitable output format for ' -filter_complex'
 -filter_complex: Invalid argument



Anyone can help ?


-
Concat filter : Error initializing output stream
18 juin 2020, par Ittai BarkaiThis 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 BarkaiI 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 :






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