
Recherche avancée
Autres articles (106)
-
Les autorisations surchargées par les plugins
27 avril 2010, parMediaspip core
autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs -
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 (...) -
Taille des images et des logos définissables
9 février 2011, parDans beaucoup d’endroits du site, logos et images sont redimensionnées pour correspondre aux emplacements définis par les thèmes. L’ensemble des ces tailles pouvant changer d’un thème à un autre peuvent être définies directement dans le thème et éviter ainsi à l’utilisateur de devoir les configurer manuellement après avoir changé l’apparence de son site.
Ces tailles d’images sont également disponibles dans la configuration spécifique de MediaSPIP Core. La taille maximale du logo du site en pixels, on permet (...)
Sur d’autres sites (9298)
-
Using ffmpeg to watermark a folder of videos
25 août 2018, par user5947524I am using the code below to watermark individual videos one-by-one in a folder :
ffprobe -v quiet -show_entries stream=width,height -of default=noprint_wrappers=1 dave.mp4
ffmpeg -i logo.png -y -v quiet -vf scale=width*0.15:-1 scaled.png
ffmpeg -i dave.mp4 -i scaled.png -filter_complex "overlay=10:main_h-overlay_h-10" dave2.mp4The first line gets the width and the height of a video, second line scales the watermark for that video, third line creates a new video watermarked.
How can I make run for a full folder of 1000 videos ?
I tried the code below but it corrupted the videos :
for %%a in ("C:\Users\Work\Desktop\test2\*.mp4") do (
ffprobe -v quiet -show_entries stream=width,height -of default=noprint_wrappers=1 "%%a"
ffmpeg -i logo.png -y -v quiet -vf scale=width*0.15:-1 scaled.png
ffmpeg -i "%%a" -i scaled.png -filter_complex "overlay=10:main_h-overlay_h-10" "C:\Users\Work\Desktop\test2\%%~na.mp4"
)The error I get is :
[mov,mp4,m4a,3gp,3g2,mj2 @ 0000014545aaaa00] stream 0, offset 0x18039: partial file
[aac @ 0000014545b708c0] Input buffer exhausted before END element found
Error while decoding stream #0:1: Invalid data found when processing input
C:\Users\Work\Desktop\test2\dave.mp4: Invalid data found when processing input -
ffmpeg giving conversion failure when run on subclips
20 août 2018, par user2333839I have a main video clip and I am generating a subclip out of it using ffmpeg. The command i use to generate the subclip is :
ffmpeg -i {input_video} -ss {start_time} -to {end_time} {output_filename}
Once I have the subclip, I am doing the following things :
Step 1 : I am calculating the average Frame Rate using ffprobe :
ffprobe -v error -select_streams v:0 -show_entries stream=avg_frame_rate -of default=noprint_wrappers=1:nokey=1 <input file="file" />
Step 2 : I am extracting the raw video stream and storing it in a temp location and removing the existing PTS values using :
ffmpeg -i <input video="video" /> -c:v copy -an $TMP_STREAM 2>&1
Step 3 : I am remuxing the video to a container forcing the average FPS causing the PTS values to be rewritten :
ffmpeg-r <fps> -i $TMP_STREAM -c:v copy $OUTPUT_FILE 2>&1
</fps>When I do the above 3 steps on the main video clip, it works just fine. But when I do these steps on the subclip (which I generated using ffmpeg), then step 3 is giving me error :
Can't write packet with unknown timestamp
av_interleaved_write_frame(): Invalid argumentAny inputs on what might be happening ?
Below are my commands and the logs :
Command 1 :
ffprobe -v error -select_streams v:0 -show_entries stream=avg_frame_rate -of default=noprint_wrappers=1:nokey=1 abcd.mp4.---> Output : 287/12
Command 2 :
ffmpeg -i abcd.mp4 -c:v copy -an /tmp/tmp.h264 2>&1---> Output :
ffmpeg version 3.2.4 Copyright (c) 2000-2017 the FFmpeg developers
built with gcc 4.9.4 (GCC)
configuration: --prefix=/local/p4clients/pkgbuild-DlViY/workspace/src/FFmpeg/build/private/install --disable-static --enable-gpl --enable-libx264 --enable-shared --enable-encoder=vorbis --enable-libvorbis --enable-libmp3lame --enable-libopus --enable-libvpx --enable-libebur128
libavutil 55. 34.101 / 55. 34.101
libavcodec 57. 64.101 / 57. 64.101
libavformat 57. 56.101 / 57. 56.101
libavdevice 57. 1.100 / 57. 1.100
libavfilter 6. 65.100 / 6. 65.100
libswscale 4. 2.100 / 4. 2.100
libswresample 2. 3.100 / 2. 3.100
libpostproc 54. 1.100 / 54. 1.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'subclip_fv_1.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf57.56.101
Duration: 00:00:29.44, start: 0.000000, bitrate: 329 kb/s
Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 640x480 [SAR 1:1 DAR 4:3], 300 kb/s, 23.92 fps, 23.92 tbr, 18368 tbn, 47.83 tbc (default)
Metadata:
handler_name : VideoHandler
Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 8000 Hz, mono, fltp, 26 kb/s (default)
Metadata:
handler_name : SoundHandler
File '/tmp/tmp.h264' already exists. Overwrite ? [y/N] y
Output #0, h264, to '/tmp/tmp.h264':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf57.56.101
Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 640x480 [SAR 1:1 DAR 4:3], q=2-31, 300 kb/s, 23.92 fps, 23.92 tbr, 23.92 tbn, 23.92 tbc (default)
Metadata:
handler_name : VideoHandler
Stream mapping:
Stream #0:0 -> #0:0 (copy)
Press [q] to stop, [?] for help
frame= 703 fps=0.0 q=-1.0 Lsize= 1077kB time=00:00:29.31 bitrate= 301.1kbits/s speed=4.47e+03x
video:1077kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.010517%Command 3 :
ffmpeg-r 287/12 -i /tmp/tmp.h264 -c:v copy abcd.mp4_retimed.mkv 2>&1----> Ouput :
ffmpeg version 3.2.4 Copyright (c) 2000-2017 the FFmpeg developers
built with gcc 4.9.4 (GCC)
configuration: --prefix=/local/p4clients/pkgbuild-DlViY/workspace/src/FFmpeg/build/private/install --disable-static --enable-gpl --enable-libx264 --enable-shared --enable-encoder=vorbis --enable-libvorbis --enable-libmp3lame --enable-libopus --enable-libvpx --enable-libebur128
libavutil 55. 34.101 / 55. 34.101
libavcodec 57. 64.101 / 57. 64.101
libavformat 57. 56.101 / 57. 56.101
libavdevice 57. 1.100 / 57. 1.100
libavfilter 6. 65.100 / 6. 65.100
libswscale 4. 2.100 / 4. 2.100
libswresample 2. 3.100 / 2. 3.100
libpostproc 54. 1.100 / 54. 1.100
Input #0, h264, from '/tmp/tmp.h264':
Duration: N/A, bitrate: N/A
Stream #0:0: Video: h264 (High), yuv420p(progressive), 640x480 [SAR 1:1 DAR 4:3], 23.92 fps, 23.92 tbr, 1200k tbn, 47.83 tbc
Output #0, matroska, to 'subclip_fv_1.mp4_retimed.mkv':
Metadata:
encoder : Lavf57.56.101
Stream #0:0: Video: h264 (High) (H264 / 0x34363248), yuv420p(progressive), 640x480 [SAR 1:1 DAR 4:3], q=2-31, 23.92 fps, 23.92 tbr, 1k tbn, 23.92 tbc
Stream mapping:
Stream #0:0 -> #0:0 (copy)
Press [q] to stop, [?] for help
[matroska @ 0x43d880] Timestamps are unset in a packet for stream 0. This is deprecated and will stop working in the future. Fix your code to set the timestamps properly
[matroska @ 0x43d880] Can't write packet with unknown timestamp
av_interleaved_write_frame(): Invalid argument -
Anomalie #4157 : Support de TLSv1.2 dans recuperer_url()
3 juillet 2018, par cedric -Confirmé donc. Le patch suivant rétablit les connexions en TLSv1.1 et TLSv1.2 avec une negociation complete du bon protocole crypto :
# svn diff Index : distant.php ===================================================================
— - distant.php (révision 23960) +++ distant.php (copie de travail) @@ -1175,8 +1175,8 @@ $scheme = ’http’ ; $noproxy = ’’ ; elseif ($t[’scheme’] == ’https’)$scheme = ’tls’ ;
$noproxy = ’tls ://’ ; + $scheme = ’ssl’ ; + $noproxy = ’ssl ://’ ; if (!isset($t[’port’]) || !($port = $t[’port’])) $t[’port’] = 443 ; @@ -1275,13 +1275,13 @@
$connect = "" ;
if ($http_proxy)if (defined(’_PROXY_HTTPS_VIA_CONNECT’) and $scheme == "tls")
+ if (defined(’_PROXY_HTTPS_VIA_CONNECT’) and $scheme == "ssl")
$path_host = (!$user ? ’’ : "$user@") . $host . (($port != 80) ? " :$port" : "") ;
$connect = "CONNECT " . $path_host . " $vers\r\n"
. "Host : $path_host\r\n"
. "Proxy-Connection : Keep-Alive\r\n" ;
else$path = (($scheme == ’tls’) ? ’https://’ : "$scheme ://")
+ $path = (($scheme == ’ssl’) ? ’https://’ : "$scheme ://")
. (!$user ? ’’ : "$user@")
. "$host" . (($port != 80) ? " :$port" : "") . $path ;