
Recherche avancée
Autres articles (5)
-
Pas question de marché, de cloud etc...
10 avril 2011Le vocabulaire utilisé sur ce site essaie d’éviter toute référence à la mode qui fleurit allègrement
sur le web 2.0 et dans les entreprises qui en vivent.
Vous êtes donc invité à bannir l’utilisation des termes "Brand", "Cloud", "Marché" etc...
Notre motivation est avant tout de créer un outil simple, accessible à pour tout le monde, favorisant
le partage de créations sur Internet et permettant aux auteurs de garder une autonomie optimale.
Aucun "contrat Gold ou Premium" n’est donc prévu, aucun (...) -
Selection of projects using MediaSPIP
2 mai 2011, parThe examples below are representative elements of MediaSPIP specific uses for specific projects.
MediaSPIP farm @ Infini
The non profit organizationInfini develops hospitality activities, internet access point, training, realizing innovative projects in the field of information and communication technologies and Communication, and hosting of websites. It plays a unique and prominent role in the Brest (France) area, at the national level, among the half-dozen such association. Its members (...) -
Ajouter notes et légendes aux images
7 février 2011, parPour pouvoir ajouter notes et légendes aux images, la première étape est d’installer le plugin "Légendes".
Une fois le plugin activé, vous pouvez le configurer dans l’espace de configuration afin de modifier les droits de création / modification et de suppression des notes. Par défaut seuls les administrateurs du site peuvent ajouter des notes aux images.
Modification lors de l’ajout d’un média
Lors de l’ajout d’un média de type "image" un nouveau bouton apparait au dessus de la prévisualisation (...)
Sur d’autres sites (3646)
-
FFmpeg - Overlay multiple layers of transparent webm files [closed]
27 octobre 2023, par JensI am trying to overlay multiple layers ( up to 8 layers ) of transparent webm files to an mp4 file.


If I do this for 2 layers, it works but ignores the alpha channel.


ffmpeg -i 1.webm -i 2.webm -c:a copy -filter_complex "[0:v][1:v] overlay=0:0:enable='between(t,0,20)'" output.mp4



I specify libvpx-vp9 to get the alpha channel as well


ffmpeg -c:v libvpx-vp9 -i 1.webm -c:v libvpx-vp9 -i 2.webm -c:a copy -filter_complex "[0:v][1:v] overlay=0:0:enable='between(t,0,20)'" output.mp4



Then I get an error.


[libvpx-vp9 @ 0x7f9bd8d04840] Failed to decode frame: Unspecified internal error
 Last message repeated 3 times
[libvpx-vp9 @ 0x7f9bd8d04840] Failed to decode frame: Bitstream not supported by this decoder
 Last message repeated 8 times
[matroska,webm @ 0x7f9bd8f04880] Could not find codec parameters for stream 0 (Video: vp9 (libvpx-vp9) (Profile 3), none, 1080x1080): unspecified pixel format
Consider increasing the value for the 'analyzeduration' (0) and 'probesize' (5000000) options
Input #0, matroska,webm, from '1.webm':
 Metadata:
 encoder : WS Matroska Muxer
 creation_time : 2023-09-11T14:55:34.000000Z
 Duration: 00:00:20.00, start: 0.000000, bitrate: 1775 kb/s
 Stream #0:0: Video: vp9 (Profile 3), none, 1080x1080, SAR 1:1 DAR 1:1, 30 fps, 30 tbr, 1k tbn (default)
 Metadata:
 alpha_mode : 1
 Stream #0:1: Audio: vorbis, 44100 Hz, stereo, fltp (default)

and

Failed to decode frame: Unspecified internal error
Error while decoding stream #0:0: Invalid data found when processing input
Cannot determine format of input stream 0:0 after EOF



I have tried to increasing the value for the 'analyzeduration' and 'probesize', but it makes no difference.


ffprobe of 1.webm


ffprobe version 6.0 Copyright (c) 2007-2023 the FFmpeg developers
 built with Apple clang version 14.0.3 (clang-1403.0.22.14.1)
 configuration: --prefix=/usr/local/Cellar/ffmpeg/6.0-with-options_4 --enable-shared --cc=clang --host-cflags= --host-ldflags= --enable-gpl --enable-libaom --enable-libdav1d --enable-libmp3lame --enable-libopus --enable-libsnappy --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-libfontconfig --enable-libfreetype --enable-frei0r --enable-libass --enable-demuxer=dash --enable-opencl --enable-audiotoolbox --enable-videotoolbox --disable-htmlpages --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libfdk-aac --enable-libgme --enable-libgsm --enable-libmodplug --enable-libopenh264 --enable-libopenjpeg --enable-libopenmpt --enable-librav1e --enable-libsvtav1 --enable-librist --enable-librsvg --enable-librtmp --enable-librubberband --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libtesseract --enable-libtwolame --enable-libvidstab --enable-libvmaf --enable-libwebp --enable-libxml2 --enable-libxvid --enable-libzimg --enable-libzmq --enable-openssl --enable-nonfree --enable-libjack --enable-indev=jack --enable-version3 --enable-libopencore-amrnb --enable-libopencore-amrwb
 libavutil 58. 2.100 / 58. 2.100
 libavcodec 60. 3.100 / 60. 3.100
 libavformat 60. 3.100 / 60. 3.100
 libavdevice 60. 1.100 / 60. 1.100
 libavfilter 9. 3.100 / 9. 3.100
 libswscale 7. 1.100 / 7. 1.100
 libswresample 4. 10.100 / 4. 10.100
 libpostproc 57. 1.100 / 57. 1.100
Input #0, matroska,webm, from '1.webm':
 Metadata:
 encoder : WS Matroska Muxer
 creation_time : 2023-09-11T14:55:34.000000Z
 Duration: 00:00:20.00, start: 0.000000, bitrate: 1775 kb/s
 Stream #0:0: Video: vp8, yuv420p(progressive), 1080x1080, SAR 1:1 DAR 1:1, 30 fps, 30 tbr, 1k tbn (default)
 Metadata:
 alpha_mode : 1
 Stream #0:1: Audio: vorbis, 44100 Hz, stereo, fltp (default)



Any ffmpeg wizards with an idea ?


-
Java shelling out to FFMPEG not running nor giving error
4 janvier, par ToddI'm writing a Podcast downloader where I want to be able to download one or more podcasts then run them through FFMPEG.


It does run when I run the program in Windows.

It does not run when I run the program in Linux - Meaning FFMPEG may or may not have been called. I have no way of knowing. I get a -1 back from process.waitfor() but no error in my Java logs and no entries at all in the ffmpeg.log file. And there is no file in the processed file directory that FFMPEG would have created.

It does run in Linux if I run the same command that fails in Java from the command line.

FFMPEG has the permissions : rwxr-xr-x , so it doesn't seem as if it'd be a permission error. The Java code looks like :


ProcessBuilder processBuilder = new ProcessBuilder( commands );
 processBuilder.redirectErrorStream( true );
 // Added the next line to see if I could log an error from ffmpeg
 processBuilder.redirectOutput( ProcessBuilder.Redirect.appendTo( new File( "./ffmpeg.log" ) ) );

 Process process = processBuilder.start();
 BufferedReader bufferedOutputReader = new BufferedReader( new InputStreamReader( process.getInputStream() ) );
 do {
 outputString = bufferedOutputReader.readLine();
 if ( outputString != null ) {
 LOGGER.trace( outputString );
 }
 } while ( outputString != null );
 results = process.waitFor();
 LOGGER.debug( "Exit value: " + results );



The commands are :


2023-10-25 16:21:52,452 224257 [pool-1-thread-4] DEBUG org.sperbolink.utils.CodecUtils - command string: /bin/ffmpeg 
2023-10-25 16:21:52,452 224257 [pool-1-thread-4] DEBUG org.sperbolink.utils.CodecUtils - command string: -y 
2023-10-25 16:21:52,452 224257 [pool-1-thread-4] DEBUG org.sperbolink.utils.CodecUtils - command string: -i 
2023-10-25 16:21:52,452 224257 [pool-1-thread-4] DEBUG org.sperbolink.utils.CodecUtils - command string: "/home/todd/aggregator/incoming/Downrange Radio/Downrange_Radio_2023-02-15_The_Avidity_PD-10_Delivers_.mp3" 
2023-10-25 16:21:52,452 224257 [pool-1-thread-4] DEBUG org.sperbolink.utils.CodecUtils - command string: -ac 
2023-10-25 16:21:52,452 224257 [pool-1-thread-4] DEBUG org.sperbolink.utils.CodecUtils - command string: 1 
2023-10-25 16:21:52,452 224257 [pool-1-thread-4] DEBUG org.sperbolink.utils.CodecUtils - command string: -af 
2023-10-25 16:21:52,452 224257 [pool-1-thread-4] DEBUG org.sperbolink.utils.CodecUtils - command string: "atempo=1.4,volume=1.4" 
2023-10-25 16:21:52,452 224257 [pool-1-thread-4] DEBUG org.sperbolink.utils.CodecUtils - command string: "/home/todd/aggregator/processed/Downrange Radio/Downrange_Radio_2023-02-15_The_Avidity_PD-10_Delivers_.mp3"



And the manually constructed and run command line that DOES work is :


/bin/ffmpeg -y -i "/home/todd/aggregator/incoming/Downrange Radio/Downrange_Radio_2023-02-15_The_Avidity_PD-10_Delivers_.mp3" -ac 1 -af "atempo=1.4,volume=1.4" "/home/todd/aggregator/processed/Downrange Radio/Downrange_Radio_2023-02-15_The_Avidity_PD-10_Delivers_.mp3"



The ffmpeg.log file is empty, so I'm doubting whether FFMPEG is ever being reached.


What am I doing wrong ?


EDIT :
I changed the commands to be


"/bin/ffmpeg 2> foo.txt" 



and the execution code to :


ProcessBuilder processBuilder = new ProcessBuilder( commands );
// processBuilder.redirectErrorStream( true );
 // Added the next line to see if I could log an error from ffmpeg
// processBuilder.redirectOutput( ProcessBuilder.Redirect.appendTo( new File( "./ffmpeg.log" ) ) );
 Process process = processBuilder.start();
 results = process.waitFor();



Running that command from the command line displays a list of MMPEG commands that can be run within foo.txt. Upon running from within the Java app, the foo.txt file is empty, so it doesn't appear that FFMPEG ever gets reached. But, I'm clueless why not.


EDIT 2 :
I converted the /bin/ffmpeg path to uppercase to see if that would return an error and it did.


ERROR org.mrpc.utilities.ShellUtils - Cannot run program "/BIN/FFMPEG": error=2, No such file or directory



This seems to confirm that the Java Process object can locate ffmpeg successfully when it is properly cased (i.e. my original code) as I don't see an error message when the case is incorrect. Still not sure why nothing happens when it is called.


EDIT 3 :
I punted on this a year ago, but recently had to revisit. This time I found the answer. It is because I included double quotes around some of the command parameters. That caused the files to not be found. This link states that the Process class handles embedded spaces without any intervention required by you : ProcessBuilder adds extra quotes to command line


-
Cropping a video from Sony A7 Camera using ffmpeg
23 octobre 2023, par Mike SlinnI want to crop a video file created by a Sony A7iii camera, so only the portion from 0:51 through 2:45 is extracted.
The camera adds streams that need to be ignored.


ffprobe
shows the error on input stream 2, however the problem I am reporting deals with input stream 3, which is a data stream, and is not required. I want to exclude input stream 3, then deal with input stream 2.

$ ffprobe myfile.mp4
ffprobe version 3.0-static http://johnvansickle.com/ffmpeg/ Copyright (c) 2007-2016 the FFmpeg developers
 built with gcc 5.3.1 (Debian 5.3.1-8) 20160205
 configuration: --enable-gpl --enable-version3 --disable-shared --disable-debug --enable-runtime-cpudetect --enable-libmp3lame --enable-libx264 --enable-libx265 --enable-libwebp --enable-libspeex --enable-libvorbis --enable-libvpx --enable-libfreetype --enable-fontconfig --enable-libxvid --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable-libvo-amrwbenc --enable-gray --enable-libopenjpeg --enable-libopus --enable-libass --enable-gnutls --enable-libvidstab --enable-libsoxr --enable-frei0r --enable-libfribidi --disable-indev=sndio --disable-outdev=sndio --enable-librtmp --enable-libmfx --cc=gcc
 libavutil 55. 17.103 / 55. 17.103
 libavcodec 57. 24.102 / 57. 24.102
 libavformat 57. 25.100 / 57. 25.100
 libavdevice 57. 0.101 / 57. 0.101
 libavfilter 6. 31.100 / 6. 31.100
 libswscale 4. 0.100 / 4. 0.100
 libswresample 2. 0.101 / 2. 0.101
 libpostproc 54. 0.100 / 54. 0.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'myfile.mp4':
 Metadata:
 major_brand : XAVC
 minor_version : 16785407
 compatible_brands: XAVCmp42iso2
 creation_time : 2023-01-05 00:52:24
 Duration: 00:10:58.16, start: 0.000000, bitrate: 51445 kb/s
 Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709/bt709/iec61966-2-4), 1920x1080 [SAR 1:1 DAR 16:9], 49370 kb/s, 59.94 fps, 59.94 tbr, 60k tbn, 119.88 tbc (default)
 Metadata:
 creation_time : 2023-01-05 00:52:24
 handler_name : Video Media Handler
 encoder : AVC Coding
 Stream #0:1(und): Audio: pcm_s16be (twos / 0x736F7774), 48000 Hz, 2 channels, s16, 1536 kb/s (default)
 Metadata:
 creation_time : 2023-01-05 00:52:24
 handler_name : Sound Media Handler
 Stream #0:2(und): Data: none (rtmd / 0x646D7472), 491 kb/s (default)
 Metadata:
 creation_time : 2023-01-05 00:52:24
 handler_name : Timed Metadata Media Handler
Unsupported codec with id 0 for input stream 2



Predictably,
ffmpeg
fails becauseffprobe
failed.

$ ffmpeg -y -i 'myfile.mp4' -ss 51 -to 2:45 -acodec copy 'myfile.crop.mp4'
ffmpeg version 5.1.2-3ubuntu1 Copyright (c) 2000-2022 the FFmpeg developers
 built with gcc 12 (Ubuntu 12.2.0-14ubuntu2)
 configuration: --prefix=/usr --extra-version=3ubuntu1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libdav1d --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libglslang --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librabbitmq --enable-librist --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libsvtav1 --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzimg --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --disable-sndio --enable-libjxl --enable-pocketsphinx --enable-librsvg --enable-libmfx --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-libplacebo --enable-librav1e --enable-shared
 libavutil 57. 28.100 / 57. 28.100
 libavcodec 59. 37.100 / 59. 37.100
 libavformat 59. 27.100 / 59. 27.100
 libavdevice 59. 7.100 / 59. 7.100
 libavfilter 8. 44.100 / 8. 44.100
 libswscale 6. 7.100 / 6. 7.100
 libswresample 4. 7.100 / 4. 7.100
 libpostproc 56. 6.100 / 56. 6.100
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x55d61a97fc80] st: 0 edit list: 1 Missing key frame while searching for timestamp: 1001
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x55d61a97fc80] st: 0 edit list 1 Cannot find an index entry before timestamp: 1001.
Guessed Channel Layout for Input Stream #0.1 : stereo
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'myfile.mp4':
 Metadata:
 major_brand : XAVC
 minor_version : 16785407
 compatible_brands: XAVCmp42iso2
 creation_time : 2023-01-05T00:52:24.000000Z
 Duration: 00:10:58.16, start: 0.000000, bitrate: 51445 kb/s
 Stream #0:0[0x1](und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709/bt709/iec61966-2-4, progressive), 1920x1080 [SAR 1:1 DAR 16:9], 49370 kb/s, 59.94 fps, 59.94 tbr, 60k tbn (default)
 Metadata:
 creation_time : 2023-01-05T00:52:24.000000Z
 handler_name : Video Media Handler
 vendor_id : [0][0][0][0]
 encoder : AVC Coding
 Stream #0:1[0x2](und): Audio: pcm_s16be (twos / 0x736F7774), 48000 Hz, stereo, s16, 1536 kb/s (default)
 Metadata:
 creation_time : 2023-01-05T00:52:24.000000Z
 handler_name : Sound Media Handler
 vendor_id : [0][0][0][0]
 Stream #0:2[0x3](und): Data: none (rtmd / 0x646D7472), 491 kb/s (default)
 Metadata:
 creation_time : 2023-01-05T00:52:24.000000Z
 handler_name : Timed Metadata Media Handler
 timecode : 03:52:30:26
Stream mapping:
 Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
 Stream #0:1 -> #0:1 (copy)
Press [q] to stop, [?] for help
[libx264 @ 0x55d61aa58a80] using SAR=1/1
[libx264 @ 0x55d61aa58a80] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
[libx264 @ 0x55d61aa58a80] profile High, level 4.2, 4:2:0, 8-bit
[libx264 @ 0x55d61aa58a80] 264 - core 164 r3095 baee400 - H.264/MPEG-4 AVC codec - Copyleft 2003-2022 - 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=34 lookahead_threads=5 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
[mp4 @ 0x55d61aa57cc0] Could not find tag for codec pcm_s16be 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 --
Conversion failed!



I tried various incantations that specified permutations of
-map
options, but only dug myself a deeper hole.

How might I perform the extraction ? I am not interested in preserving extra streams, I just want the main video and stereo audio streams.