
Recherche avancée
Médias (91)
-
Spitfire Parade - Crisis
15 mai 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Wired NextMusic
14 mai 2011, par
Mis à jour : Février 2012
Langue : English
Type : Video
-
Video d’abeille en portrait
14 mai 2011, par
Mis à jour : Février 2012
Langue : français
Type : Video
-
Sintel MP4 Surround 5.1 Full
13 mai 2011, par
Mis à jour : Février 2012
Langue : English
Type : Video
-
Carte de Schillerkiez
13 mai 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Texte
-
Publier une image simplement
13 avril 2011, par ,
Mis à jour : Février 2012
Langue : français
Type : Video
Autres articles (47)
-
La file d’attente de SPIPmotion
28 novembre 2010, parUne file d’attente stockée dans la base de donnée
Lors de son installation, SPIPmotion crée une nouvelle table dans la base de donnée intitulée spip_spipmotion_attentes.
Cette nouvelle table est constituée des champs suivants : id_spipmotion_attente, l’identifiant numérique unique de la tâche à traiter ; id_document, l’identifiant numérique du document original à encoder ; id_objet l’identifiant unique de l’objet auquel le document encodé devra être attaché automatiquement ; objet, le type d’objet auquel (...) -
MediaSPIP Init et Diogène : types de publications de MediaSPIP
11 novembre 2010, parÀ l’installation d’un site MediaSPIP, le plugin MediaSPIP Init réalise certaines opérations dont la principale consiste à créer quatre rubriques principales dans le site et de créer cinq templates de formulaire pour Diogène.
Ces quatre rubriques principales (aussi appelées secteurs) sont : Medias ; Sites ; Editos ; Actualités ;
Pour chacune de ces rubriques est créé un template de formulaire spécifique éponyme. Pour la rubrique "Medias" un second template "catégorie" est créé permettant d’ajouter (...) -
Changer son thème graphique
22 février 2011, parLe thème graphique ne touche pas à la disposition à proprement dite des éléments dans la page. Il ne fait que modifier l’apparence des éléments.
Le placement peut être modifié effectivement, mais cette modification n’est que visuelle et non pas au niveau de la représentation sémantique de la page.
Modifier le thème graphique utilisé
Pour modifier le thème graphique utilisé, il est nécessaire que le plugin zen-garden soit activé sur le site.
Il suffit ensuite de se rendre dans l’espace de configuration du (...)
Sur d’autres sites (5202)
-
Burning subtitles into video using ffmpeg overlay on react native
25 avril 2023, par YoussefI have managed to complete this task on node server but it's too slow I don't want to upgrade my instance so I decided to do the conversion on the front end, my app is on react native can please somebody help me convert the code and keep the same args and options


Server code


// Execute the ffmpeg command to burn the subtitles into the video
const ffmpeg = spawn("ffmpeg", [
 "-i",
 "pipe:0",
 "-vf",
 `subtitles=${subtitlePath}:force_style='Alignment=10,OutlineColour=&H100000000,BorderStyle=3,Outline=1,Shadow=0,Fontsize=10'`,
 "-c:a",
 "copy",
 "-progress", "pipe:1",
 outputPath,
]);

// Pipe the videoResponse array buffer to FFmpeg
ffmpeg.stdin.write(videoResponse.data);
ffmpeg.stdin.end();

// Send the output file as a response once the process is complete
ffmpeg.on("close", () => {
 fs.readFile(outputPath, (err, data) => {
 if (err) {
 console.error(err);
 } else {
 console.log(outputPath)
 }
 });
});



My try on react native but failed for several issues including, main ones are :




No such filter : 'subtitles' Failed to inject frame into filter






Invalid argument






Error initializing complex filters.




This is what I come up with so far


componentDidMount() {
 FFmpegKit.executeAsync(`-i ${inputFilePath} -i ${subtitleFilePath} -filter_complex "[0:v][1:s]overlay=10:main_h-overlay_h-10" -c:a copy ${outputFilePath}`)
 .then((session) => {
 FFmpegKit.cancel();
 
 const returnCode = session.getReturnCode();
 
 if (ReturnCode.isSuccess(returnCode)) {
 console.log('Video with subtitles was created successfully!');
 } else {
 console.log('Error creating video with subtitles');
 }
 })
 .catch((error) => {
 console.log('Error creating video with subtitles', error);
 });
 }



If you want to see the logs you can find them below


LOG init firebase : videocap-71b4a
 LOG Running "videocap" with {"rootTag":11,"initialProps":{}}
 LOG Loading ffmpeg-kit-react-native.
 LOG Loaded ffmpeg-kit-react-native-ios-https-x86_64-5.1.0.
 LOG Error creating video with subtitles [TypeError: undefined is not a function]
 LOG ffmpeg version n5.1.2
 LOG Copyright (c) 2000-2022 the FFmpeg developers
 LOG 
 LOG built with Apple clang version 14.0.0 (clang-1400.0.29.102)
 LOG configuration: --cross-prefix=x86_64-ios-darwin- --sysroot=/Applications/Xcode-v13.4.1.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.0.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-v13.4.1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ar --cc=clang --cxx=clang++ --as='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=20220929 -isysroot /Applications/Xcode-v13.4.1.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.0.sdk -O2 -mios-simulator-version-min=12.1 -I/Applications/Xcode-v13.4.1.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.0.sdk/usr/include' --ranlib=/Applications/Xcode-v13.4.1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib --strip=/Applications/Xcode-v13.4.1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/strip --nm=/Applications/Xcode-v13.4.1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/nm --extra-ldflags='-mios-simulator-version-min=12.1' --disable-autodetect --enable-cross-compile --enable-pic --enable-inline-asm --enable-optimizations --enable-swscale --enable-shared --disable-static --install-name-dir='@rpath' --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
 LOG libavutil 57. 28.100 / 57. 28.100
 LOG libavcodec 59. 37.100 / 59. 37.100
 LOG libavformat 59. 27.100 / 59. 27.100
 LOG libavdevice 59. 7.100 / 59. 7.100
 LOG libavfilter 8. 44.100 / 8. 44.100
 LOG libswscale 6. 7.100 / 6. 7.100
 LOG libswresample 4. 7.100 / 4. 7.100
 LOG Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/Users/master/Documents/Code/videocap-mobile/media.mp4':
 LOG Metadata:
 LOG major_brand :
 LOG isom
 LOG 
 LOG minor_version :
 LOG 512
 LOG 
 LOG compatible_brands:
 LOG isomiso2avc1mp41
 LOG 
 LOG encoder :
 LOG Lavf58.76.100
 LOG 
 LOG Duration:
 LOG 00:00:11.82
 LOG , start:
 LOG 0.000000
 LOG , bitrate:
 LOG 813 kb/s
 LOG 
 LOG Stream #0:0
 LOG [0x1]
 LOG (und)
 LOG : Video: h264 (avc1 / 0x31637661), yuv420p(tv, bt470bg/bt470bg/smpte170m, progressive), 480x608, 682 kb/s
 LOG , SAR 32757:32326 DAR 491355:614194
 LOG ,
 LOG 24.15 fps,
 LOG 24 tbr,
 LOG 1000k tbn
 LOG (default)
 LOG 
 LOG Metadata:
 LOG handler_name :
 LOG VideoHandler
 LOG 
 LOG vendor_id :
 LOG [0][0][0][0]
 LOG 
 LOG Stream #0:1
 LOG [0x2]
 LOG (und)
 LOG : Audio: aac (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 126 kb/s
 LOG (default)
 LOG 
 LOG Metadata:
 LOG handler_name :
 LOG SoundHandler
 LOG 
 LOG vendor_id :
 LOG [0][0][0][0]
 LOG 
 LOG /Users/master/Documents/Code/videocap-mobile/transcription.srt: Immediate exit requested
 LOG Exiting normally, received signal 2.



Please help


-
FFmpeg unable to save file on Android : Output file #0 does not contain any stream
16 mai 2022, par John M.I'm having difficulty when saving a RTSP stream into internal storage using
ffmpeg-kit -i rtsp://192.168.100.60:554/stream1 -c:v copy -c:a copy -t 5 /data/user/0/com.arthenica.ffmpegkit.test/files/test.mp4
. The command is called usingFFmpegKit.executeAsync(command, ...)
. There're issues with thecircular_buffer_size
option, but I read that the warnings could be ignored. The command runs fine on desktop usingffmpeg
. Please find below the log.

Any advice would be appreciated.


ffmpeg started on 2022-05-16 at 15:27:54
Report written to "/data/user/0/com.arthenica.ffmpegkit.test/cache/ffreport.txt"
Log level: 48
Command line:
ffmpeg-kit -i rtsp://192.168.100.60:554/stream1 -c:v copy -c:a copy -t 5 /data/user/0/com.arthenica.ffmpegkit.test/files/test.mp4
ffmpeg version v4.5-dev-3393-g30322ebe3c Copyright (c) 2000-2021 the FFmpeg developers
 built with Android (7155654, based on r399163b1) clang version 11.0.5 (https://android.googlesource.com/toolchain/llvm-project 87f1315dfbea7c137aa2e6d362dbb457e388158d)
 configuration: --cross-prefix=i686-linux-android- --sysroot=/files/android-sdk/ndk/22.1.7171670/toolchains/llvm/prebuilt/linux-x86_64/sysroot --prefix=/storage/light/projects/ffmpeg-kit/prebuilt/android-x86-lts/ffmpeg --pkg-config=/usr/bin/pkg-config --enable-version3 --arch=i686 --cpu=i686 --target-os=android --disable-neon --disable-asm --disable-inline-asm --ar=i686-linux-android-ar --cc=i686-linux-android16-clang --cxx=i686-linux-android16-clang++ --ranlib=i686-linux-android-ranlib --strip=i686-linux-android-strip --nm=i686-linux-android-nm --extra-libs='-L/storage/light/projects/ffmpeg-kit/prebuilt/android-x86-lts/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-test --disable-programs --disable-postproc -- libavutil 57. 13.100 / 57. 13.100
 libavcodec 59. 15.102 / 59. 15.102
 libavformat 59. 10.100 / 59. 10.100
 libavdevice 59. 1.100 / 59. 1.100
 libavfilter 8. 21.100 / 8. 21.100
 libswscale 6. 1.102 / 6. 1.102
 libswresample 4. 0.100 / 4. 0.100
Splitting the commandline.
Reading option '-i' ... matched as input url with argument 'rtsp://192.168.100.60:554/stream1'.
Reading option '-c:v' ... matched as option 'c' (codec name) with argument 'copy'.
Reading option '-c:a' ... matched as option 'c' (codec name) with argument 'copy'.
Reading option '-t' ... matched as option 't' (record or transcode "duration" seconds of audio/video) with argument '5'.
Reading option '/data/user/0/com.arthenica.ffmpegkit.test/files/test.mp4' ... matched as output url.
Finished splitting the commandline.
Parsing a group of options: global .
Successfully parsed a group of options.
Parsing a group of options: input url rtsp://192.168.100.60:554/stream1.
Successfully parsed a group of options.
Opening an input file: rtsp://192.168.100.60:554/stream1.
[tcp @ 0xa21d3a80] No default whitelist set
[tcp @ 0xa21d3a80] Original list of addresses:
[tcp @ 0xa21d3a80] Address 192.168.100.60 port 554
[tcp @ 0xa21d3a80] Interleaved list of addresses:
[tcp @ 0xa21d3a80] Address 192.168.100.60 port 554
[tcp @ 0xa21d3a80] Starting connection attempt to 192.168.100.60 port 554
[tcp @ 0xa21d3a80] Successfully connected to 192.168.100.60 port 554
[rtsp @ 0xb25b5a00] SDP:
v=0
o=- 14665860 31787219 1 IN IP4 192.168.100.60
s=Session streamed by "MERCURY RTSP Server"
t=0 0
a=smart_encoder:virtualIFrame=1
m=video 0 RTP/AVP 96
c=IN IP4 0.0.0.0
b=AS:4096
a=range:npt=0-
a=control:track1
a=rtpmap:96 H264/90000
a=fmtp:96 packetization-mode=1; profile-level-id=4D4020; sprop-parameter-sets=Z01AIJWgFAF34maIAAADAAgAAAMBlCA=,aO48gA==

Failed to parse interval end specification ''
[rtsp @ 0xb25b5a00] video codec set to: h264
[rtsp @ 0xb25b5a00] RTP Packetization Mode: 1
[rtsp @ 0xb25b5a00] RTP Profile IDC: 4d Profile IOP: 40 Level: 20
[rtsp @ 0xb25b5a00] Extradata set to 0xb25abdf0 (size: 35)
[rtp @ 0xb25abe60] No default whitelist set
[udp @ 0xb25abed0] No default whitelist set
[udp @ 0xb25abed0] 'circular_buffer_size' option was set but it is not supported on this build (pthread support is required)
[udp @ 0xb25abed0] end receive buffer size reported is 524288
[udp @ 0xb25abf40] No default whitelist set
[udp @ 0xb25abf40] 'circular_buffer_size' option was set but it is not supported on this build (pthread support is required)
[udp @ 0xb25abf40] end receive buffer size reported is 524288
[rtsp @ 0xb25b5a00] setting jitter buffer size to 500
[rtsp @ 0xb25b5a00] hello state=0
Failed to parse interval end specification ''
[h264 @ 0x907e5b00] nal_unit_type: 7(SPS), nal_ref_idc: 3
[h264 @ 0x907e5b00] nal_unit_type: 8(PPS), nal_ref_idc: 3
[h264 @ 0x907e5b00] nal_unit_type: 7(SPS), nal_ref_idc: 3
[h264 @ 0x907e5b00] nal_unit_type: 8(PPS), nal_ref_idc: 3
[rtsp @ 0xb25b5a00] Could not find codec parameters for stream 0 (Video: h264, none): unspecified size
Consider increasing the value for the 'analyzeduration' (0) and 'probesize' (5000000) options
Input #0, rtsp, from 'rtsp://192.168.100.60:554/stream1':
 Metadata:
 title : Session streamed by "MERCURY RTSP Server"
 Duration: N/A, start: 0.000000, bitrate: N/A
 Stream #0:0, 0, 1/90000: Video: h264, none, 90k tbr, 90k tbn
Successfully opened the file.
Parsing a group of options: output url /data/user/0/com.arthenica.ffmpegkit.test/files/test.mp4.
Applying option c:v (codec name) with argument copy.
Applying option c:a (codec name) with argument copy.
Applying option t (record or transcode "duration" seconds of audio/video) with argument 5.
Successfully parsed a group of options.
Opening an output file: /data/user/0/com.arthenica.ffmpegkit.test/files/test.mp4.
Output #0, mp4, to '/data/user/0/com.arthenica.ffmpegkit.test/files/test.mp4':
Output file #0 does not contain any stream



-
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