
Recherche avancée
Autres articles (70)
-
Amélioration de la version de base
13 septembre 2013Jolie sélection multiple
Le plugin Chosen permet d’améliorer l’ergonomie des champs de sélection multiple. Voir les deux images suivantes pour comparer.
Il suffit pour cela d’activer le plugin Chosen (Configuration générale du site > Gestion des plugins), puis de configurer le plugin (Les squelettes > Chosen) en activant l’utilisation de Chosen dans le site public et en spécifiant les éléments de formulaires à améliorer, par exemple select[multiple] pour les listes à sélection multiple (...) -
Menus personnalisés
14 novembre 2010, parMediaSPIP utilise le plugin Menus pour gérer plusieurs menus configurables pour la navigation.
Cela permet de laisser aux administrateurs de canaux la possibilité de configurer finement ces menus.
Menus créés à l’initialisation du site
Par défaut trois menus sont créés automatiquement à l’initialisation du site : Le menu principal ; Identifiant : barrenav ; Ce menu s’insère en général en haut de la page après le bloc d’entête, son identifiant le rend compatible avec les squelettes basés sur Zpip ; (...) -
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
Sur d’autres sites (6692)
-
FFmpeg filter_complex to merge audio from two files fails without an error due to album cover PNG stream
13 décembre 2023, par kaushalWhen you run FFmpeg filter_complex command to process two mp3 files and merge them into one, the command runs successfully, the output mp3 file is generated. No errors are reported. But the output fails to run. The result log from FFmpeg looks something like this, which points to an PNG stream in one of the mp3.


[mp3 @ 00000215d251e7c0] Estimating duration from bitrate, this may be inaccurate
Input #0, mp3, from 'C:\\vid gen\\Track_ Outwild x She Is Jules - Golden [NCS Release].mp3':
 Metadata:
 artist : Outwild x She Is Jules
 album_artist : Outwild x She Is Jules
 TCM : Outwild, She Is Jules
 album : Golden [Single]
 title : Golden
 genre : Electronic
 date : 2021
 Duration: 00:04:09.60, 
start: 0.000000, bitrate: 378 kb/s
 Stream #0:0: Audio: mp3, 48000 Hz, stereo, fltp, 320 kb/s
 Stream #0:1: Video: mjpeg (Baseline), yuvj444p(pc, bt470bg/unknown/unknown), 3000x3000, 90k tbr, 90k tbn (attached pic)
 Metadata:
 comment : Other
[mp3 @ 00000215d253f380] Estimating duration from bitrate, this may be inaccurate
Input #1, mp3, from 'E:\voiceover.mp3':
 Duration: 00:00:51.96, start: 0.000000, bitrate: 32 kb/s
 Stream #1:0: Audio: mp3, 24000 Hz, mono, fltp, 32 kb/s
Stream mapping:
 Stream #0:0 (mp3float) -> volume:default (graph 0)
 Stream #1:0 (mp3float) -> adelay:default (graph 0)
 amerge:default (graph 0) -> Stream #0:0 (libmp3lame)
 Stream #0:1 -> #0:1 (mjpeg (native) -> png (native))
Press [q] to stop, [?] for help
[swscaler @ 00000215d46ff480] deprecated pixel format used, make sure you did set range correctly
 Last message repeated 3 times
[Parsed_amerge_6 @ 00000215d470d2c0] No channel layout for input 1
Output #0, mp3, to 'output_test.mp3':
 Metadata:
 TPE1 : Outwild x She Is Jules
 TPE2 : Outwild x She Is Jules
 TCM : Outwild, She Is Jules
 TALB : Golden [Single]
 TIT2 : Golden
 TCON : Electronic
 TDRC : 2021
 TSSE : Lavf60.18.100
 Stream #0:0: Audio: mp3, 48000 Hz, stereo, fltp\r\rame= 0 fps=0.0 q=0.0 size= 0kB time=-00:00:00.02 bitrate=N/A speed=N/A \rframe= 0 fps=0.0 q=0.0 size= 0kB time=-00:00:00.02 bitrate=N/A speed=N/A \r[out#0/mp3 @ 00000215d2537400] video:3696kB audio:2kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.011831%
frame= 1 fps=0.8 q=-0.0 Lsize= 3698kB time=00:00:00.07 bitrate=415140.5kbits/s speed=0.0601x



-
Wrong duration of the result video when using ffmpeg filter complex concat [closed]
9 décembre 2023, par Igor ChubinI am trying to do a trivial task of concatenating
several segments of the original video/audio
into a new file (and dropping the rest) :


ffmpeg -i bdt.mkv -filter_complex '
 [0:v]trim=start=10.0:end=15.0,setpts=PTS-STARTPTS[0v];
 [0:a]atrim=start=10.0:end=15.0,asetpts=PTS-STARTPTS[0a];
 [0:v]trim=start=65.0:end=70.0,setpts=PTS-STARTPTS[1v];
 [0:a]atrim=start=65.0:end=70.0,asetpts=PTS-STARTPTS[1a];[0v][0a][1v]
 [1a]concat=n=2:v=1:a=1[outv][outa]' -map [outv] -map [outa] out.mp4



When I am trying to watch
out.mp4
after that, it has the original duration ofbdt.mkv
(70 minutes) and not 10 seconds, as I would expect.

What am I doing wrong ?


Update 1.


(exactly as Scott Codez suggested)


The problem is related to the formats. If the output format is
mkv
too, the problem disappears. But when I use mp4, that I need, the problem persists.

-
How to tell ffmpeg that /tmp/phpFm6H79 is a safe file name ?
28 août 2023, par hanshenrikHow do I tell ffmpeg that
/tmp/phpFm6H79
is a safe filename ?

When I do


ffmpeg -y -f concat -i '/tmp/phpFm6H79' -c:v:libx264 -vsync vfr '/home/hans/projects/test/output2.mp4'



I get (*only the last 2 lines are interesting)


ffmpeg version 4.4.2-0ubuntu0.22.04.1 Copyright (c) 2000-2021 the FFmpeg developers
 built with gcc 11 (Ubuntu 11.2.0-19ubuntu1)
 configuration: --prefix=/usr --extra-version=0ubuntu0.22.04.1 --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-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librabbitmq --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --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 --enable-pocketsphinx --enable-librsvg --enable-libmfx --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared
 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
 libswscale 5. 9.100 / 5. 9.100
 libswresample 3. 9.100 / 3. 9.100
 libpostproc 55. 9.100 / 55. 9.100
[concat @ 0x55b070e9ff40] Unsafe file name '/tmp/phpbshsmF'
/tmp/phpFm6H79: Operation not permitted



The filepath is generated with PHP's
tmpfile()
like

$ffmpegInputTxtFileHandle = tmpfile();
$ffmpegInputTxtFilePath = stream_get_meta_data($ffmpegInputTxtFileHandle)['uri'];



The code should be threadsafe, so using hardcoded paths is not really viable, and using
tmpfile()
is very convenient, it takes care of automatically deleting the file when the script exit, even if php crashes, so I'd rather tell ffmpeg that it is safe, than change it to something other thantmpfile()
, is it possible ? how ?

I tried using this fugly workaround to get it to end with ".txt"


$ffmpegInputTxtFileHandle = tmpfile();
 $ffmpegInputTxtFilePath = stream_get_meta_data($ffmpegInputTxtFileHandle)['uri'] . ".txt";
 fclose($ffmpegInputTxtFileHandle);
 $ffmpegInputTxtFileHandle = fopen($ffmpegInputTxtFilePath, 'w+b');
 register_shutdown_function(function () use ($ffmpegInputTxtFileHandle, $ffmpegInputTxtFilePath) {
 @fclose($ffmpegInputTxtFileHandle);
 @unlink($ffmpegInputTxtFilePath);
 });



but it even says that
/tmp/phpFm6H79.txt
is an unsafe filename :'(