
Recherche avancée
Médias (3)
-
The Slip - Artworks
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Texte
-
Podcasting Legal guide
16 mai 2011, par
Mis à jour : Mai 2011
Langue : English
Type : Texte
-
Creativecommons informational flyer
16 mai 2011, par
Mis à jour : Juillet 2013
Langue : English
Type : Texte
Autres articles (45)
-
Gestion générale des documents
13 mai 2011, parMédiaSPIP ne modifie jamais le document original mis en ligne.
Pour chaque document mis en ligne il effectue deux opérations successives : la création d’une version supplémentaire qui peut être facilement consultée en ligne tout en laissant l’original téléchargeable dans le cas où le document original ne peut être lu dans un navigateur Internet ; la récupération des métadonnées du document original pour illustrer textuellement le fichier ;
Les tableaux ci-dessous expliquent ce que peut faire MédiaSPIP (...) -
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 -
Des sites réalisés avec MediaSPIP
2 mai 2011, parCette page présente quelques-uns des sites fonctionnant sous MediaSPIP.
Vous pouvez bien entendu ajouter le votre grâce au formulaire en bas de page.
Sur d’autres sites (6107)
-
Scaling videos for device that doesn't support aspect ratio metadata
18 juillet 2017, par forthrinI have hundreds of videos which are all approximately 4:3 format, but with different resolutions and various cropping (eg. videos may be 640x480, 640x470, 630x480, etc.).
I converted the videos into a fixed screen size (160x128) for a primitive device. When playing the videos on the device, some appear "thin", while in VLC on my computer, the aspect ratio is correct.
I assume the reason for this is that the video player on the primitive device doesn’t honour the aspect ratio metadata in the video file. Here are two examples of metadata :
- 320x240 SAR=1:1 DAR=4:3 (Displays correctly on device and desktop)
- 480x480 SAR=4:3 DAR=4:3 (Displays thin on device, correct on desktop)
How can I create a general command line that will give all videos correct playback on my primitive device, regardless of their original size and aspect ratio ?
The best would be to somehow ask
ffmpeg
to remove the metadata, and compensate for it when scaling. Another possible option would be to add black bars so the video is always 160x128 pixels.I’m open to any solution. Below is my current version :
for f in *; do ffmpeg -i $f -vcodec mpeg4 -vf scale=160:-1 out/$f; done
-
ffmpeg : aspect ratio of image in a slideshow
26 juin 2020, par worovI have a bunch of images PNG files. I'm trying to make a slideshow with these using ffmpeg. The images are 3000*4000. These images don't have all the same aspect ratio.



Some are like these :






Some are like this :






I used the command :



ffmpeg -loop 1 -framerate 1/10 -i img%3d.png -i audio.wav -vf scale=w=3840:h=-1 -vcodec libx264 -crf 14 -r 60 -pix_fmt yuv420p -shortest output.mp4




It returns me this :



ffmpeg version 3.3.2 Copyright (c) 2000-2017 the FFmpeg developers
 built with gcc 6.3.0 (Debian 6.3.0-18) 20170516
 configuration: --disable-decoder=amrnb --disable-decoder=libopenjpeg --disable-mips32r2 --disable-mips32r6 --disable-mips64r6 --disable-mipsdsp --disable-mipsdspr2 --disable-mipsfpu --disable-msa --disable-libopencv --disable-podpages --disable-stripping --enable-avfilter --enable-avresample --enable-gcrypt --enable-gnutls --enable-gpl --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libfdk-aac --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libilbc --enable-libkvazaar --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtesseract --enable-libtheora --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libx265 --enable-libxvid --enable-libzvbi --enable-nonfree --enable-opengl --enable-openssl --enable-postproc --enable-pthreads --enable-shared --enable-version3 --incdir=/usr/include/x86_64-linux-gnu --libdir=/usr/lib/x86_64-linux-gnu --prefix=/usr --toolchain=hardened --enable-frei0r --enable-chromaprint --enable-libx264 --enable-libiec61883 --enable-libdc1394 --enable-vaapi --disable-opencl --enable-libmfx --disable-altivec --shlibdir=/usr/lib/x86_64-linux-gnu
 libavutil 55. 58.100 / 55. 58.100
 libavcodec 57. 89.100 / 57. 89.100
 libavformat 57. 71.100 / 57. 71.100
 libavdevice 57. 6.100 / 57. 6.100
 libavfilter 6. 82.100 / 6. 82.100
 libavresample 3. 5. 0 / 3. 5. 0
 libswscale 4. 6.100 / 4. 6.100
 libswresample 2. 7.100 / 2. 7.100
 libpostproc 54. 5.100 / 54. 5.100
Input #0, image2, from 'img%3d.png':
 Duration: 00:02:30.00, start: 0.000000, bitrate: N/A
 Stream #0:0: Video: png, rgb24(pc), 4000x3000 [SAR 7087:7087 DAR 4:3], 0.10 tbr, 0.10 tbn, 0.10 tbc
Guessed Channel Layout for Input Stream #1.0 : stereo
Input #1, wav, from 'audio.wav':
 Duration: 01:54:44.14, bitrate: 1536 kb/s
 Stream #1:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 48000 Hz, stereo, s16, 1536 kb/s
Stream mapping:
 Stream #0:0 -> #0:0 (png (native) -> h264 (libx264))
 Stream #1:0 -> #0:1 (pcm_s16le (native) -> aac (native))
Press [q] to stop, [?] for help
[libx264 @ 0x55c1be935420] using SAR=1/1
[libx264 @ 0x55c1be935420] frame MB size (240x180) > level limit (36864)
[libx264 @ 0x55c1be935420] MB rate (2592000) > level limit (2073600)
[libx264 @ 0x55c1be935420] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
[libx264 @ 0x55c1be935420] profile High, level 5.2
[libx264 @ 0x55c1be935420] 264 - core 150 - H.264/MPEG-4 AVC codec - Copyleft 2003-2017 - 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=6 lookahead_threads=1 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=14.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
Output #0, mp4, to 'output.mp4':
 Metadata:
 encoder : Lavf57.71.100
 Stream #0:0: Video: h264 (libx264) ([33][0][0][0] / 0x0021), yuv420p(progressive), 3840x2880 [SAR 1:1 DAR 4:3], q=-1--1, 60 fps, 15360 tbn, 60 tbc
 Metadata:
 encoder : Lavc57.89.100 libx264
 Side data:
 cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
 Stream #0:1: Audio: aac (LC) ([64][0][0][0] / 0x0040), 48000 Hz, stereo, fltp, 128 kb/s
 Metadata:
 encoder : Lavc57.89.100 aac
[image2 @ 0x55c1be8edde0] Thread message queue blocking; consider raising the thread_queue_size option (current value: 8)
More than 1000 frames duplicated 5309kB time=00:00:09.13 bitrate=4762.0kbits/s dup=599 drop=0 speed=0.164x 
More than 10000 frames duplicated 137722kB time=00:02:39.13 bitrate=7089.8kbits/s dup=9584 drop=0 speed=0.174x 
More than 100000 frames duplicated429964kB time=00:27:39.13 bitrate=7060.5kbits/s dup=99434 drop=0 speed=0.173x 
frame=413401 fps= 10 q=-1.0 Lsize= 5962186kB time=01:54:49.96 bitrate=7088.9kbits/s dup=413310 drop=0 speed=0.173x 
video:5831116kB audio:117825kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.222641%
[libx264 @ 0x55c1be935420] frame I:2068 Avg QP: 6.65 size:2816521
[libx264 @ 0x55c1be935420] frame P:104040 Avg QP:10.85 size: 470
[libx264 @ 0x55c1be935420] frame B:307293 Avg QP:16.51 size: 318
[libx264 @ 0x55c1be935420] consecutive B-frames: 0.8% 0.0% 0.5% 98.7%
[libx264 @ 0x55c1be935420] mb I I16..4: 7.3% 54.6% 38.1%
[libx264 @ 0x55c1be935420] mb P I16..4: 0.0% 0.0% 0.0% P16..4: 0.2% 0.0% 0.0% 0.0% 0.0% skip:99.8%
[libx264 @ 0x55c1be935420] mb B I16..4: 0.0% 0.0% 0.0% B16..8: 0.0% 0.0% 0.0% direct: 0.0% skip:100.0% L0:49.5% L1:50.5% BI: 0.0%
[libx264 @ 0x55c1be935420] 8x8 transform intra:54.6% inter:97.9%
[libx264 @ 0x55c1be935420] coded y,uvDC,uvAC intra: 98.2% 92.7% 92.2% inter: 0.0% 0.0% 0.0%
[libx264 @ 0x55c1be935420] i16 v,h,dc,p: 17% 12% 36% 35%
[libx264 @ 0x55c1be935420] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 18% 26% 13% 5% 6% 6% 9% 6% 11%
[libx264 @ 0x55c1be935420] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 15% 24% 11% 7% 9% 7% 10% 7% 11%
[libx264 @ 0x55c1be935420] i8c dc,h,v,p: 40% 33% 18% 10%
[libx264 @ 0x55c1be935420] Weighted P-Frames: Y:0.0% UV:0.0%
[libx264 @ 0x55c1be935420] ref P L0: 99.6% 0.0% 0.4% 0.0%
[libx264 @ 0x55c1be935420] ref B L0: 21.9% 78.1% 0.0%
[libx264 @ 0x55c1be935420] ref B L1: 99.5% 0.5%
[libx264 @ 0x55c1be935420] kb/s:6933.00
[aac @ 0x55c1be938aa0] Qavg: 640.546




But the second image is distorted in the video (I can't show you because I don't have enough reputation to post more links).



So I would like to preserve the aspect ratio of each picture : the images shouldn't be distorted. What command should I use for this ?



Thanks in advance.


-
Extend + scale a portrait video so the aspect ratio stays and the black borders become a blurry version of the video
24 avril 2017, par P. DeeI have a 720 x 1280 pixels video. How do I extend and scale it to 1920 x 1080 such that the aspect ratio is being kept and the black borders are a blurry version of the video, so you don’t really notice that it’s just a small vertical stripe.
Example
I started with
ffmpeg -i video720x1280.mp4 -vf "scale=608:1080,pad=width=1920:height=1080:x=656:y=0:color=black" video1920x1080.mp4