
Recherche avancée
Autres articles (83)
-
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 -
Automated installation script of MediaSPIP
25 avril 2011, parTo overcome the difficulties mainly due to the installation of server side software dependencies, an "all-in-one" installation script written in bash was created to facilitate this step on a server with a compatible Linux distribution.
You must have access to your server via SSH and a root account to use it, which will install the dependencies. Contact your provider if you do not have that.
The documentation of the use of this installation script is available here.
The code of this (...) -
Support de tous types de médias
10 avril 2011Contrairement à beaucoup de logiciels et autres plate-formes modernes de partage de documents, MediaSPIP a l’ambition de gérer un maximum de formats de documents différents qu’ils soient de type : images (png, gif, jpg, bmp et autres...) ; audio (MP3, Ogg, Wav et autres...) ; vidéo (Avi, MP4, Ogv, mpg, mov, wmv et autres...) ; contenu textuel, code ou autres (open office, microsoft office (tableur, présentation), web (html, css), LaTeX, Google Earth) (...)
Sur d’autres sites (3889)
-
FFmpeg - Copy a (not A/V) data stream from input MP4 file [closed]
31 mars 2023, par darkshineI've got an
MP4
video file captured by DJI drone. The file contains the video stream (H.264) and also two data streams of unknown format. I would like to convert the video fromh.264
toh.265
and also save both of the included data streams. Unfortunately, I cannot force FFmpeg to copy the data streams across from the input file into the output file.

Here is the mp4 file :


ffprobe DJI_0019.MP4


[mov,mp4,m4a,3gp,3g2,mj2 @ 0x5631004c2730] stream 0, timescale not set
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'DJI_0019.MP4':
 Metadata:
 major_brand : isom
 minor_version : 512
 compatible_brands: isomiso2avc1mp41
 creation_time : replaced_timestamp
 encoder : DJIMavic3
 Duration: 00:01:05.66, start: 0.000000, bitrate: 128915 kb/s
 Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709), 3840x2160, 127648 kb/s, 29.41 fps, 29.97 tbr, 30k tbn, 59.94 tbc (default)
 Metadata:
 creation_time : replaced_timestamp
 handler_name : VideoHandler
 vendor_id : [0][0][0][0]
 Stream #0:1(und): Data: none (djmd / 0x646D6A64), 13 kb/s
 Metadata:
 creation_time : replaced_timestamp
 handler_name : DJI meta
 Stream #0:2(und): Data: none (dbgi / 0x69676264), 1190 kb/s
 Metadata:
 creation_time : replaced_timestamp
 handler_name : DJI dbgi
 Stream #0:3: Video: mjpeg (Baseline), yuvj420p(pc, bt470bg/unknown/unknown), 960x540 [SAR 1:1 DAR 16:9], 90k tbr, 90k tbn, 90k tbc (attached pic)
Unsupported codec with id 0 for input stream 1
Unsupported codec with id 0 for input stream 2



I tried the command below :


ffmpeg -i DJI_0019.MP4 -map 0 -c:v libx265 -crf 25 -c:d copy -copy_unknown DJI_0019.v2.MP4


The command fails with the following error. The output file is empty.


[mp4 @ 0x556d0180ced0] Could not find tag for codec none in stream #1, codec not currently supported in container
Could not write header for output file #0 (incorrect codec parameters ?): Invalid argument
Error initializing output stream 0:0 --



Note that for "-c:d" option I tried different suggested values, none of them succeeded :


copy
none
bin
bin_data
data
null
file



In the meantime an attempt to save the data streams to separate files succeeds for the both of them with the commands :


ffmpeg -i DJI_0019.MP4 -map 0:d:0 -c copy -copy_unknown -f data DJI_0019.data0.bin


ffmpeg -i DJI_0019.MP4 -map 0:d:1 -c copy -copy_unknown -f data DJI_0019.data1.bin


Question :


How to force FFmpeg to copy the data streams from input to output ?


This is the ffmpeg's info :


ffmpeg version 4.4.3 Copyright (c) 2000-2022 the FFmpeg developers
 built with gcc 11.3.0 (Gentoo 11.3.0 p5)
 configuration: --prefix=/usr --libdir=/usr/lib64 --shlibdir=/usr/lib64 
--docdir=/usr/share/doc/ffmpeg-4.4.3/html --mandir=/usr/share/man --enable-shared 
--cc=x86_64-pc-linux-gnu-gcc --cxx=x86_64-pc-linux-gnu-g++ --ar=x86_64-pc-linux-gnu-ar 
--nm=x86_64-pc-linux-gnu-nm --strip=x86_64-pc-linux-gnu-strip 
--ranlib=x86_64-pc-linux-gnu-ranlib --pkg-config=x86_64-pc-linux-gnu-pkg-config 
--optflags='-O2 -pipe -march=native' --disable-static --enable-avfilter --enable-avresample 
--disable-stripping --disable-optimizations --disable-libcelt --disable-indev=oss 
--disable-indev=jack --disable-indev=sndio --disable-outdev=oss --disable-outdev=sndio 
--enable-nonfree --enable-bzlib --disable-runtime-cpudetect --disable-debug --disable-gcrypt 
--enable-gnutls --disable-gmp --enable-gpl --disable-hardcoded-tables --enable-iconv 
--disable-libxml2 --disable-lzma --enable-network --disable-opencl --disable-openssl 
--enable-postproc --disable-libsmbclient --enable-ffplay --enable-sdl2 --disable-vaapi 
--disable-vdpau --disable-vulkan --enable-xlib --enable-libxcb --enable-libxcb-shm 
--enable-libxcb-xfixes --enable-zlib --enable-libcdio --disable-libiec61883 
--disable-libdc1394 --enable-libcaca --disable-openal --disable-opengl --enable-libv4l2 
--disable-libpulse --disable-libdrm --disable-libjack --disable-libopencore-amrwb 
--disable-libopencore-amrnb --disable-libcodec2 --enable-libdav1d --enable-libfdk-aac 
--disable-libopenjpeg --disable-libbluray --disable-libgme --disable-libgsm 
--disable-libaribb24 --disable-mmal --disable-libmodplug --disable-libopus 
--disable-libilbc --disable-librtmp --disable-libssh --disable-libspeex --disable-libsrt 
--disable-librsvg --disable-ffnvcodec --disable-libvorbis --disable-libvpx --disable-libzvbi 
--disable-appkit --disable-libbs2b --disable-chromaprint --disable-cuda-llvm 
--disable-libflite --disable-frei0r --disable-libvmaf --disable-libfribidi 
--disable-fontconfig --disable-ladspa --enable-libass --disable-libtesseract 
--disable-lv2 --disable-libfreetype --disable-libvidstab --disable-librubberband 
--disable-libzmq --disable-libzimg --disable-libsoxr --enable-pthreads --disable-amf 
--disable-libvo-amrwbenc --disable-libkvazaar --disable-libaom --enable-libmp3lame 
--disable-libopenh264 --disable-librav1e --disable-libsnappy --disable-libsvtav1 
--disable-libtheora --disable-libtwolame --disable-libwebp --enable-libx264 --enable-libx265 
--enable-libxvid --disable-armv5te --disable-armv6 --disable-armv6t2 --disable-neon 
--disable-vfp --disable-vfpv3 --disable-armv8 --disable-mipsdsp --disable-mipsdspr2 
--disable-mipsfpu --disable-altivec --disable-vsx --disable-power8 --disable-amd3dnow 
--disable-amd3dnowext --disable-aesni --disable-avx --disable-avx2 --disable-fma3 
--disable-fma4 --disable-sse3 --disable-ssse3 --disable-sse4 --disable-sse42 --disable-xop 
--cpu=host --disable-doc --disable-htmlpages --enable-manpages
 libavutil 56. 70.100 / 56. 70.100
 libavcodec 58.134.100 / 58.134.100
 libavformat 58. 76.100 / 58. 76.100
 libavdevice 58. 13.100 / 58. 13.100
 libavfilter 7.110.100 / 7.110.100
 libavresample 4. 0. 0 / 4. 0. 0
 libswscale 5. 9.100 / 5. 9.100
 libswresample 3. 9.100 / 3. 9.100
 libpostproc 55. 9.100 / 55. 9.100



-
ffmpeg : cannot copy data stream
I've got the mp4 video file captured by DJI drone. The file contains the video stream and two data streams of unknown format. I would like to convert the video from h.264 to h.265 and also save the both data streams. Unfortunately, I cannot force ffmpeg to copy the data streams from input to the output.


Here is the mp4 file :


ffprobe DJI_0019.MP4


[mov,mp4,m4a,3gp,3g2,mj2 @ 0x5631004c2730] stream 0, timescale not set
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'DJI_0019.MP4':
 Metadata:
 major_brand : isom
 minor_version : 512
 compatible_brands: isomiso2avc1mp41
 creation_time : replaced_timestamp
 encoder : DJIMavic3
 Duration: 00:01:05.66, start: 0.000000, bitrate: 128915 kb/s
 Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709), 3840x2160, 127648 kb/s, 29.41 fps, 29.97 tbr, 30k tbn, 59.94 tbc (default)
 Metadata:
 creation_time : replaced_timestamp
 handler_name : VideoHandler
 vendor_id : [0][0][0][0]
 Stream #0:1(und): Data: none (djmd / 0x646D6A64), 13 kb/s
 Metadata:
 creation_time : replaced_timestamp
 handler_name : DJI meta
 Stream #0:2(und): Data: none (dbgi / 0x69676264), 1190 kb/s
 Metadata:
 creation_time : replaced_timestamp
 handler_name : DJI dbgi
 Stream #0:3: Video: mjpeg (Baseline), yuvj420p(pc, bt470bg/unknown/unknown), 960x540 [SAR 1:1 DAR 16:9], 90k tbr, 90k tbn, 90k tbc (attached pic)
Unsupported codec with id 0 for input stream 1
Unsupported codec with id 0 for input stream 2



I tried the command below :


ffmpeg -i DJI_0019.MP4 -map 0 -c:v libx265 -crf 25 -c:d copy -copy_unknown DJI_0019.v2.MP4


The command fails with the following error. The output file is empty.


[mp4 @ 0x556d0180ced0] Could not find tag for codec none in stream #1, codec not currently supported in container
Could not write header for output file #0 (incorrect codec parameters ?): Invalid argument
Error initializing output stream 0:0 --



Note that for "-c:d" option I tried different suggested values, none of them succeeded :


copy
none
bin
bin_data
data
null
file



In the meantime an attempt to save the data streams to separate files succeeds for the both of them with the commands :


ffmpeg -i DJI_0019.MP4 -map 0:d:0 -c copy -copy_unknown -f data DJI_0019.data0.bin


ffmpeg -i DJI_0019.MP4 -map 0:d:1 -c copy -copy_unknown -f data DJI_0019.data1.bin


How to force ffmpeg to copy the data streams from input to output ?


This is the ffmpeg's info :


ffmpeg version 4.4.3 Copyright (c) 2000-2022 the FFmpeg developers
 built with gcc 11.3.0 (Gentoo 11.3.0 p5)
 configuration: --prefix=/usr --libdir=/usr/lib64 --shlibdir=/usr/lib64 
--docdir=/usr/share/doc/ffmpeg-4.4.3/html --mandir=/usr/share/man --enable-shared 
--cc=x86_64-pc-linux-gnu-gcc --cxx=x86_64-pc-linux-gnu-g++ --ar=x86_64-pc-linux-gnu-ar 
--nm=x86_64-pc-linux-gnu-nm --strip=x86_64-pc-linux-gnu-strip 
--ranlib=x86_64-pc-linux-gnu-ranlib --pkg-config=x86_64-pc-linux-gnu-pkg-config 
--optflags='-O2 -pipe -march=native' --disable-static --enable-avfilter --enable-avresample 
--disable-stripping --disable-optimizations --disable-libcelt --disable-indev=oss 
--disable-indev=jack --disable-indev=sndio --disable-outdev=oss --disable-outdev=sndio 
--enable-nonfree --enable-bzlib --disable-runtime-cpudetect --disable-debug --disable-gcrypt 
--enable-gnutls --disable-gmp --enable-gpl --disable-hardcoded-tables --enable-iconv 
--disable-libxml2 --disable-lzma --enable-network --disable-opencl --disable-openssl 
--enable-postproc --disable-libsmbclient --enable-ffplay --enable-sdl2 --disable-vaapi 
--disable-vdpau --disable-vulkan --enable-xlib --enable-libxcb --enable-libxcb-shm 
--enable-libxcb-xfixes --enable-zlib --enable-libcdio --disable-libiec61883 
--disable-libdc1394 --enable-libcaca --disable-openal --disable-opengl --enable-libv4l2 
--disable-libpulse --disable-libdrm --disable-libjack --disable-libopencore-amrwb 
--disable-libopencore-amrnb --disable-libcodec2 --enable-libdav1d --enable-libfdk-aac 
--disable-libopenjpeg --disable-libbluray --disable-libgme --disable-libgsm 
--disable-libaribb24 --disable-mmal --disable-libmodplug --disable-libopus 
--disable-libilbc --disable-librtmp --disable-libssh --disable-libspeex --disable-libsrt 
--disable-librsvg --disable-ffnvcodec --disable-libvorbis --disable-libvpx --disable-libzvbi 
--disable-appkit --disable-libbs2b --disable-chromaprint --disable-cuda-llvm 
--disable-libflite --disable-frei0r --disable-libvmaf --disable-libfribidi 
--disable-fontconfig --disable-ladspa --enable-libass --disable-libtesseract 
--disable-lv2 --disable-libfreetype --disable-libvidstab --disable-librubberband 
--disable-libzmq --disable-libzimg --disable-libsoxr --enable-pthreads --disable-amf 
--disable-libvo-amrwbenc --disable-libkvazaar --disable-libaom --enable-libmp3lame 
--disable-libopenh264 --disable-librav1e --disable-libsnappy --disable-libsvtav1 
--disable-libtheora --disable-libtwolame --disable-libwebp --enable-libx264 --enable-libx265 
--enable-libxvid --disable-armv5te --disable-armv6 --disable-armv6t2 --disable-neon 
--disable-vfp --disable-vfpv3 --disable-armv8 --disable-mipsdsp --disable-mipsdspr2 
--disable-mipsfpu --disable-altivec --disable-vsx --disable-power8 --disable-amd3dnow 
--disable-amd3dnowext --disable-aesni --disable-avx --disable-avx2 --disable-fma3 
--disable-fma4 --disable-sse3 --disable-ssse3 --disable-sse4 --disable-sse42 --disable-xop 
--cpu=host --disable-doc --disable-htmlpages --enable-manpages
 libavutil 56. 70.100 / 56. 70.100
 libavcodec 58.134.100 / 58.134.100
 libavformat 58. 76.100 / 58. 76.100
 libavdevice 58. 13.100 / 58. 13.100
 libavfilter 7.110.100 / 7.110.100
 libavresample 4. 0. 0 / 4. 0. 0
 libswscale 5. 9.100 / 5. 9.100
 libswresample 3. 9.100 / 3. 9.100
 libpostproc 55. 9.100 / 55. 9.100



-
Flutter FFmpeg | Concat Multiple Videos From TXT File And Save As A Video
7 mai 2023, par Muhammad HassanI have a text file with all path of video files that I want to concat using
https://pub.dev/packages/ffmpeg_kit_flutter in my flutter app.


For this purpose, I write a file
my_file.txt
with the below data...

/data/user/0/com.example.video_merger/cache/75f72300-1203-4e2c-93cf-65777152f1d16524788775537818173.mp4
/data/user/0/com.example.video_merger/cache/318d5ea7-3e0c-4453-903b-06966aa86f348487775694692938421.mp4



Now I am using the below code to merge all the upper videos.


String outputPath = "/data/user/0/com.example.video_merger/app_flutter/output.mp4";
String commandToExecute = '-f concat -i $rawDocumentPath/my_file.txt -c copy $outputPath';
FFmpegKit.execute(commandToExecute).then((session) async {
 final returnCode = await session.getReturnCode();
 print("FFmpeg Process Exited With ReturnCode = $returnCode");
 GallerySaver.saveVideo(outputPath).then((_) {
 print("Merged Video Saved");
 });
 if (ReturnCode.isSuccess(returnCode)) {
 // SUCCESS
 } else if (ReturnCode.isCancel(returnCode)) {
 // CANCEL
 } else {
 // ERROR
 }
});



But it is giving me error as shown below...


FFmpeg Process Exited With ReturnCode = 1 
E/GallerySaver(31493): /data/user/0/com.example.video_merger/app_flutter/output.mp4: open failed: ENOENT (No such file or directory)



But when I use the below
ffmpeg
command directly without reading from text file works fine and save my video.

String commandToExecute = '-y -i ${_storedVideoOne!.path} -i ${_storedVideoTwo!.path} -r 24000/1001 -filter_complex \'[0:v:0][0:a:0][1:v:0][1:a:0]concat=n=2:v=1:a=1[out]\' -map \'[out]\' $outputPath';



Now my question is that I will have dynamic number of videos to concat so I want to use text file where I will write all paths then will make merged video from them. So what is the error in my
ffmpeg
command...???

Log Report :


I used the log reporting as follows to get the below output of errors...


FFmpegKit.executeAsync(
 commandToExecute2,
 (session) async {
 final returnCode = await session.getReturnCode();
 print("FFmpeg Process Exited With ReturnCode = $returnCode");
 GallerySaver.saveVideo(outputPath).then((_) async {
 print("Merged Video Saved");
 });
 if (ReturnCode.isSuccess(returnCode)) {
 // SUCCESS
 } else if (ReturnCode.isCancel(returnCode)) {
 // CANCEL
 } else {
 // ERROR
 }
 },
 (log) {
 print("XXXXXXXXXXXX fFmpeg XXXXXXXXXX ${log.getMessage()}");
 },
 );



And here is the Log Output...


I/flutter ( 5432): Text On File: /data/user/0/com.example.video_merger/cache/75f72300-1203-4e2c-93cf-65777152f1d16524788775537818173.mp4
I/flutter ( 5432): /data/user/0/com.example.video_merger/cache/318d5ea7-3e0c-4453-903b-06966aa86f348487775694692938421.mp4
I/flutter ( 5432): XXXXXXXXXXXX fFmpeg XXXXXXXXXX ffmpeg version n5.1.2
I/flutter ( 5432): XXXXXXXXXXXX fFmpeg XXXXXXXXXX Copyright (c) 2000-2022 the FFmpeg developers
I/flutter ( 5432): XXXXXXXXXXXX fFmpeg XXXXXXXXXX
I/flutter ( 5432): XXXXXXXXXXXX fFmpeg XXXXXXXXXX built with Android (7155654, based on r399163b1) clang version 11.0.5 (https://android.googlesource.com/toolchain/llvm-project 87f1315dfbea7c137aa2e6d362dbb457e388158d)
I/flutter ( 5432): XXXXXXXXXXXX fFmpeg XXXXXXXXXX configuration: --cross-prefix=aarch64-linux-android- --sysroot=/files/android-sdk/ndk/22.1.7171670/toolchains/llvm/prebuilt/linux-x86_64/sysroot --prefix=/home/taner/Projects/ffmpeg-kit/prebuilt/android-arm64/ffmpeg --pkg-config=/usr/bin/pkg-config --enable-version3 --arch=aarch64 --cpu=armv8-a --target-os=android --enable-neon --enable-asm --enable-inline-asm --ar=aarch64-linux-android-ar --cc=aarch64-linux-android24-clang --cxx=aarch64-linux-android24-clang++ --ranlib=aarch64-linux-android-ranlib --strip=aarch64-linux-android-strip --nm=aarch64-linux-android-nm --extra-libs='-L/home/taner/Projects/ffmpeg-kit/prebuilt/android-arm64/cpu-features/lib -lndk_compat' --disable-autodetect --enable-cross-compile --enable-pic --enable-jni --enable-optimizations --enable-swscale --disable-static --enable-shared --enable-pthreads --enable-v4l2-m2m --disable-outdev=fbdev --disable-indev=fbdev --enable-small --disable-xmm-clobber-test --disable-debug --enable-lto --disable-neon-clobber-t
I/flutter ( 5432): XXXXXXXXXXXX fFmpeg XXXXXXXXXX libavutil 57. 28.100 / 57. 28.100
I/flutter ( 5432): XXXXXXXXXXXX fFmpeg XXXXXXXXXX libavcodec 59. 37.100 / 59. 37.100
I/flutter ( 5432): XXXXXXXXXXXX fFmpeg XXXXXXXXXX libavformat 59. 27.100 / 59. 27.100
I/flutter ( 5432): XXXXXXXXXXXX fFmpeg XXXXXXXXXX libavdevice 59. 7.100 / 59. 7.100
I/flutter ( 5432): XXXXXXXXXXXX fFmpeg XXXXXXXXXX libavfilter 8. 44.100 / 8. 44.100
I/flutter ( 5432): XXXXXXXXXXXX fFmpeg XXXXXXXXXX libswscale 6. 7.100 / 6. 7.100
I/flutter ( 5432): XXXXXXXXXXXX fFmpeg XXXXXXXXXX libswresample 4. 7.100 / 4. 7.100
I/flutter ( 5432): XXXXXXXXXXXX fFmpeg XXXXXXXXXX [concat @ 0xb400007d62447910] Line 1: unknown keyword '/data/user/0/com.example.video_merger/cache/75f72300-1203-4e2c-93cf-65777152f1d16524788775537818173.mp4'
I/flutter ( 5432): XXXXXXXXXXXX fFmpeg XXXXXXXXXX /data/user/0/com.example.video_merger/app_flutter/my_file.txt: Invalid data found when processing input
I/flutter ( 5432): FFmpeg Process Exited With ReturnCode = 1