
Recherche avancée
Médias (1)
-
Publier une image simplement
13 avril 2011, par ,
Mis à jour : Février 2012
Langue : français
Type : Video
Autres articles (108)
-
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 (...) -
Contribute to translation
13 avril 2011You can help us to improve the language used in the software interface to make MediaSPIP more accessible and user-friendly. You can also translate the interface into any language that allows it to spread to new linguistic communities.
To do this, we use the translation interface of SPIP where the all the language modules of MediaSPIP are available. Just subscribe to the mailing list and request further informantion on translation.
MediaSPIP is currently available in French and English (...) -
De l’upload à la vidéo finale [version standalone]
31 janvier 2010, parLe chemin d’un document audio ou vidéo dans SPIPMotion est divisé en trois étapes distinctes.
Upload et récupération d’informations de la vidéo source
Dans un premier temps, il est nécessaire de créer un article SPIP et de lui joindre le document vidéo "source".
Au moment où ce document est joint à l’article, deux actions supplémentaires au comportement normal sont exécutées : La récupération des informations techniques des flux audio et video du fichier ; La génération d’une vignette : extraction d’une (...)
Sur d’autres sites (11218)
-
Files gets corrupted after resizing with ffmpeg
26 octobre 2018, par LiamI’m making a bot that sends videos to instagram. However instagram only allows 1:1 aspect ratio videos, so I’m trying to use ffmpeg in python (ffmpy module) to resize the video (.mp4) file.
This is the ffmpeg code I’m using
-analyzeduration 20M -probesize 20M -y -i FILE.MP4 -vf "scale=1080:1080:force_original_aspect_ratio=decrease,pad=1080:1080:(ow-iw)/2:(oh-ih)/2:white NEW_FILE.MP4
However this corrupts the file ? The size of the file before resizing is 1.815305 MB but after the ffmpeg job it’s 0.058714 MB. So what gives ?
(I also tried using
-aspect 1:1
but that corrupts the file too)Ffmpy seems to work fine, because sometimes if the file is over 20 MB i run this to reduce the file size
-y -i FILE.MP4 -vcodec libx264 -crf 24 NEW_FILE.MP4
and that works fine.Here’s the full log if needed :
Oct 23 07:32:03 test-instabot app/worker.1: MP4 SIZE BEFORE ASPECT RESIZE IS: 1.815305 MB
Oct 23 07:32:03 test-instabot app/worker.1: ffmpeg version 4.0.2-static https://johnvansickle.com/ffmpeg/ Copyright (c) 2000-2018 the FFmpeg developers
Oct 23 07:32:03 test-instabot app/worker.1: built with gcc 6.3.0 (Debian 6.3.0-18+deb9u1) 20170516
Oct 23 07:32:03 test-instabot app/worker.1: configuration: --enable-gpl --enable-version3 --enable-static --disable-debug --disable-ffplay --disable-indev=sndio --disable-outdev=sndio --cc=gcc-6 --enable-fontconfig --enable-frei0r --enable-gnutls --enable-gray --enable-libaom --enable-libfribidi --enable-libass --enable-libvmaf --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librubberband --enable-libsoxr --enable-libspeex --enable-libvorbis --enable-libopus --enable-libtheora --enable-libvidstab --enable-libvo-amrwbenc --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzimg
Oct 23 07:32:03 test-instabot app/worker.1: libavutil 56. 14.100 / 56. 14.100
Oct 23 07:32:03 test-instabot app/worker.1: libavcodec 58. 18.100 / 58. 18.100
Oct 23 07:32:03 test-instabot app/worker.1: libavformat 58. 12.100 / 58. 12.100
Oct 23 07:32:03 test-instabot app/worker.1: libavdevice 58. 3.100 / 58. 3.100
Oct 23 07:32:03 test-instabot app/worker.1: libavfilter 7. 16.100 / 7. 16.100
Oct 23 07:32:03 test-instabot app/worker.1: libswscale 5. 1.100 / 5. 1.100
Oct 23 07:32:03 test-instabot app/worker.1: libswresample 3. 1.100 / 3. 1.100
Oct 23 07:32:03 test-instabot app/worker.1: libpostproc 55. 1.100 / 55. 1.100
Oct 23 07:32:03 test-instabot app/worker.1: Input #0, mov,mp4,m4a,3gp,3g2,mj2, from './media/t4nYbas.mp4':
Oct 23 07:32:03 test-instabot app/worker.1: Metadata:
Oct 23 07:32:03 test-instabot app/worker.1: major_brand : isom
Oct 23 07:32:03 test-instabot app/worker.1: minor_version : 512
Oct 23 07:32:03 test-instabot app/worker.1: compatible_brands: isomiso2avc1mp41
Oct 23 07:32:03 test-instabot app/worker.1: encoder : Lavf58.12.100
Oct 23 07:32:03 test-instabot app/worker.1: Duration: 00:00:06.04, start: 0.000000, bitrate: 2404 kb/s
Oct 23 07:32:03 test-instabot app/worker.1: Stream #0:0(und): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p, 480x854, 2402 kb/s, 29.98 fps, 29.98 tbr, 19184 tbn, 59.95 tbc (default)
Oct 23 07:32:03 test-instabot app/worker.1: Metadata:
Oct 23 07:32:03 test-instabot app/worker.1: handler_name : VideoHandler
Oct 23 07:32:03 test-instabot app/worker.1: Stream mapping:
Oct 23 07:32:03 test-instabot app/worker.1: Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
Oct 23 07:32:03 test-instabot app/worker.1: Press [q] to stop, [?] for help
Oct 23 07:32:03 test-instabot app/worker.1: [swscaler @ 0x6882200] Warning: data is not aligned! This can lead to a speed loss
Oct 23 07:32:03 test-instabot app/worker.1: [libx264 @ 0x66c99c0] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX
Oct 23 07:32:03 test-instabot app/worker.1: [libx264 @ 0x66c99c0] profile High, level 3.2
Oct 23 07:32:03 test-instabot app/worker.1: [libx264 @ 0x66c99c0] 264 - core 155 r2901 7d0ff22 - H.264/MPEG-4 AVC codec - Copyleft 2003-2018 - 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=12 lookahead_threads=2 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
Oct 23 07:32:03 test-instabot app/worker.1: Output #0, mp4, to './media/t4nYbas.mp4':
Oct 23 07:32:03 test-instabot app/worker.1: Metadata:
Oct 23 07:32:03 test-instabot app/worker.1: major_brand : isom
Oct 23 07:32:03 test-instabot app/worker.1: minor_version : 512
Oct 23 07:32:03 test-instabot app/worker.1: compatible_brands: isomiso2avc1mp41
Oct 23 07:32:03 test-instabot app/worker.1: encoder : Lavf58.12.100
Oct 23 07:32:03 test-instabot app/worker.1: Stream #0:0(und): Video: h264 (libx264) (avc1 / 0x31637661), yuv420p, 1080x1080, q=-1--1, 29.98 fps, 19184 tbn, 29.98 tbc (default)
Oct 23 07:32:03 test-instabot app/worker.1: Metadata:
Oct 23 07:32:03 test-instabot app/worker.1: handler_name : VideoHandler
Oct 23 07:32:03 test-instabot app/worker.1: encoder : Lavc58.18.100 libx264
Oct 23 07:32:03 test-instabot app/worker.1: Side data:
Oct 23 07:32:03 test-instabot app/worker.1: cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
Oct 23 07:32:03 test-instabot app/worker.1: frame= 1 fps=0.0 q=29.0 Lsize= 57kB time=00:00:00.00 bitrate=9032923.1kbits/s speed=7.89e-05x
Oct 23 07:32:03 test-instabot app/worker.1: video:57kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 1.383109%
Oct 23 07:32:03 test-instabot app/worker.1: [libx264 @ 0x66c99c0] frame I:1 Avg QP:29.91 size: 57223
Oct 23 07:32:03 test-instabot app/worker.1: [libx264 @ 0x66c99c0] mb I I16..4: 12.6% 74.9% 12.5%
Oct 23 07:32:03 test-instabot app/worker.1: [libx264 @ 0x66c99c0] 8x8 transform intra:74.9%
Oct 23 07:32:03 test-instabot app/worker.1: [libx264 @ 0x66c99c0] coded y,uvDC,uvAC intra: 52.6% 24.4% 1.0%
Oct 23 07:32:03 test-instabot app/worker.1: [libx264 @ 0x66c99c0] i16 v,h,dc,p: 94% 0% 5% 1%
Oct 23 07:32:03 test-instabot app/worker.1: [libx264 @ 0x66c99c0] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 29% 10% 28% 4% 6% 5% 7% 5% 7%
Oct 23 07:32:03 test-instabot app/worker.1: [libx264 @ 0x66c99c0] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 21% 17% 15% 7% 9% 7% 9% 7% 9%
Oct 23 07:32:03 test-instabot app/worker.1: [libx264 @ 0x66c99c0] i8c dc,h,v,p: 78% 9% 12% 2%
Oct 23 07:32:03 test-instabot app/worker.1: [libx264 @ 0x66c99c0] kb/s:13722.08
Oct 23 07:32:03 test-instabot app/worker.1: MP4 SIZE AFTER ASPECT RESIZE IS: 0.058714 MB -
crop, rearrange middle of video frame with ffmpeg
14 juin 2021, par GavrielI have a few hundred video files from a security camera. Let's say here's the full frame :



+---------------------+-------------------------+
| 2018-10-10 03:02:12 | |
+---------------------+ |
| +--------------+ |
| | IMPORTANT | |
| +--------------+ |
| |
+-----------------------------------------------+




I have 2 areas that I want to keep : the date and the inner box.
I know how to crop to either of them, for example :



ffmpeg -i in.mp4 -filter:v "crop=1120:320:40:60" -c:a copy out.mpg




However what I'd like to be able to do is to rearrange the frame to get this in the output :



+---------------------+
| 2018-10-10 03:02:12 |
+------+--------------+
| X X X| IMPORTANT |
+------+--------------+




(X X X would be just black, or if that's hard to do then it can be whatever part of the original video)
Any idea how can I do this ?


-
ffmpeg posting to nginx hangs after 90 minutes
22 octobre 2018, par Harnek GulatiI’m using a very simple program to push an ffmpeg stream from my raspberry pi camera to a nginx server. However, it fails after 90 minutes, with almost every single Raspberry Pi I use (I have this code on 12 Raspberry Pis).
Here is my ffmpeg command :raspivid -o - -t 0 -w 640 -h 480 -fps 25 | ffmpeg -re -i - -vcodec copy -hls_time 4 -f hls -hls_list_size 5 -hls_wrap 5 -threads 0 -timeout 5000 -max_reload 20000 -method PUT http://{}:{}/live/{}
And here is my configuration for nginx.conf :
#user nobody;
load_module /usr/lib/nginx/modules/ndk_http_module.so;
load_module /usr/lib/nginx/modules/ngx_http_lua_module.so;
worker_processes auto;
env CONTROL_SERVER_IP;
#error_log /var/log/nginx/error.log;
error_log /dev/stdout info;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
access_log /dev/stdout;
sendfile on;
keepalive_requests 100000;
keepalive_timeout 30;
client_max_body_size 10M;
server {
listen 80;
server_name localhost;
location /live {
root /var/static;
client_body_temp_path /var/static/client_temp;
dav_methods PUT;
create_full_put_path on;
dav_access user:rw group:r all:r;
types {
application/vnd.apple.mpegurl m3u8;
}
# Disable Cache
add_header Cache-Control no-cache;
include cors.conf;
}
}
}
daemon off;If anyone can help me, I would deeply appreciate it. I’ve been pulling my hair out trying to figure out this bug. On the raspberry pi, it hangs on this :
[hls @ 0x25a8c90] Opening 'http://192.168.8.1:80/live/c35d8935-0a31-4d22-b71a-ad3f4f1d47631.ts' for writing
frame=105609 fps= 25 q=-1.0 q=1.6 size=N/A time=01:11:40.00 bitrate=N/A dup=0 drop=105518 speed=1.02xframe=105623 fps= 25 q=-1.0 q=1.6 size=N/A time=01:11:40.00 bitrate=N/A dup=0 drop=105532 speed=1.02xframe=105636 fps= 25 q=-1.0 q=1.6 size=N/A time=01:11:40.00 bitrate=N/A dup=0 drop=105545 speed=1.02xframe=105648 fps= 25 q=-1.0 q=1.6 size=N/A time=01:11:40.00 bitrate=N/A dup=0 drop=105557 speed=1.02xframe=105662 fps= 25 q=-1.0 q=1.6 size=N/A time=01:11:40.00 bitrate=N/A dup=0 drop=105571 speed=1.02xframe=105674 fps= 25 q=-1.0 q=1.6 size=N/A time=01:11:40.00 bitrate=N/A dup=0 drop=105583 speed=1.02xframe=105688 fps= 25 q=-1.0 q=1.6 size=N/A time=01:11:40.00 bitrate=N/A dup=0 drop=105597 speed=1.02xframe=105700 fps= 25 q=-1.0 q=1.6 size=N/A time=01:11:40.00 bitrate=N/A dup=0 drop=105609 speed=1.02xframe=105714 fps= 25 q=-1.0 q=1.6 size=N/A time=01:11:40.00 bitrate=N/A dup=0 drop=105623 speed=1.02x[hls muxer @ 0x25a9200] Duplicated segment filename detected: c35d8935-0a31-4d22-b71a-ad3f4f1d47631.ts
[hls @ 0x25a8c90] Opening 'http://192.168.8.1:80/live/c35d8935-0a31-4d22-b71a-ad3f4f1d47632.ts' for writingAnd on the nginx logs, I get :
192.168.10.242 - - [21/Oct/2018:22:34:01 +0000] "PUT /live/c35d8935-0a31-4d22-b71a-ad3f4f1d4763.m3u8 HTTP/1.1" 204 0 "-" "Lavf/57.83.100"
192.168.10.242 - - [21/Oct/2018:22:35:04 +0000] "PUT /live/c35d8935-0a31-4d22-b71a-ad3f4f1d47633.ts HTTP/1.1" 408 0 "-" "Lavf/57.83.100"I need to set up a way to either a) keep consistent connections longer than 90 minutes or b) detect when the 408 error happens and stop it from hanging.
FFMPEG version : 3.4.1