
Recherche avancée
Médias (2)
-
SPIP - plugins - embed code - Exemple
2 septembre 2013, par
Mis à jour : Septembre 2013
Langue : français
Type : Image
-
Publier une image simplement
13 avril 2011, par ,
Mis à jour : Février 2012
Langue : français
Type : Video
Autres articles (36)
-
Personnaliser en ajoutant son logo, sa bannière ou son image de fond
5 septembre 2013, parCertains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;
-
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 -
Supporting all media types
13 avril 2011, parUnlike most software and media-sharing platforms, MediaSPIP aims to manage as many different media types as possible. The following are just a few examples from an ever-expanding list of supported formats : images : png, gif, jpg, bmp and more audio : MP3, Ogg, Wav and more video : AVI, MP4, OGV, mpg, mov, wmv and more text, code and other data : OpenOffice, Microsoft Office (Word, PowerPoint, Excel), web (html, CSS), LaTeX, Google Earth and (...)
Sur d’autres sites (4436)
-
How can we play 2 videos side by side as per the resolution we provide to the output video and adjust the two input videos position
1er décembre 2023, par Bhavya Nayak-> For playing two video side by side as per the output video resolution I provide :-


- 

- I want output video of resolution 1280x720 so for this.




a. First I have trimmed the two video using below command :-


ffmpeg -i input_viedo.mp4 -ss 00:00:10 -t 00:00:20 -vf "scale=1920:1080,pad=1920:1080:0:0:yellow" -c:v libx264 -c:a aac -strict -2 output_video_trimmed.mp4




b. Now to I want to play both the trimmed video into one output video file as per the position I provide , so for this I have tried below command which is not giving the correct output :


ffmpeg -i output_video_trimmed_1.mp4 -i output_trimmed_2.mp4 -filter_complex "[0:v]scale=634:360[pad1];[1:v]scale=640:360[pad2];[pad1]pad=1280:360:0:100[tl];[pad2]pad=1280:360:634.752:130.392[br];[tl][br]vstack,scale=1280:720[output]" -map "[output]" -c:v libx264 -preset ultrafast -crf 18 -c:a aac -b:a 1280x720 output_final_video.mp4



- 

- In above command I have provide the specific width,height,top,left of the input video I want ,




But it is not giving me correct output.


—> Output I am getting by running this command is attached below :-


Output video Image I am getting by running above command




—> The issue in above command is while adding top it is not working properly , like top is not affecting the video so I want the solution for that.


-
How to update this script to generate HLS video with different resolution streams ? [closed]
1er décembre 2023, par Andy ZI have the following FFmpeg script :


ffmpeg -i video.mp4 -i video.vtt \
 -map 0:v -map 0:a:0 -map 1 \
 -s:v:0 1080x1920 -c:v:0 h264 -b:v:0 500K \
 -c:a:0 copy -c:a:1 copy -c:a:2 copy -c:s webvtt \
 -f hls -hls_playlist_type vod -var_stream_map "v:0,a:0,s:0" \
 -master_pl_name video.m3u8 -hls_time 6 -hls_list_size 0 -hls_allow_cache 1 -start_number 1 \
 -hls_segment_filename "output/hls/%v/seg-%d.ts" output/hls/%v/index.m3u8



Currently it only produces one 1080x1920 stream, how do I produce more lower resolution ones so it can adjust based on client bandwidth ?


Also, I've noticed that it doesn't add the reference to the VTT file to the master HLS playlist ; I had to add this manually but is there a way to make FFmpeg do it for me ?


#EXT-X-MEDIA:TYPE=SUBTITLES,GROUP-ID="subs",NAME="English",DEFAULT=YES,AUTOSELECT=YES,FORCED=NO,LANGUAGE="en",CHARACTERISTICS="public.accessibility.transcribes-spoken-dialog",URI="0/index_vtt.m3u8"



I've tried this, but I get an argument error :


ffmpeg -i video.mp4 -i video.vtt \
 -map 0:v -map 0:a:0 -map 1 \
 -s:v:0 1080x1920 -c:v:0 h264 -b:v:0 500K \
 -s:v:1 720x1280 -c:v:1 h264 -b:v:1 300K \
 -s:v:2 480x854 -c:v:2 h264 -b:v:2 150K \
 -c:a:0 copy -c:a:1 copy -c:a:2 copy -c:s webvtt \
 -f hls -hls_playlist_type vod -var_stream_map "v:0,a:0,s:0 v:1,a:1 s:1 v:2,a:2 s:2" \
 -master_pl_name video.m3u8 -hls_time 6 -hls_list_size 0 -hls_allow_cache 1 -start_number 1 \
 -hls_segment_filename "output/hls/%v/seg-%d.ts" output/hls/%v/index.m3u8



-
FFMPEG concat 2 files of different resolution hangs
6 octobre 2023, par knagodeI am trying to concat 2 videos of different size and resize it to 426x240 :


ffmpeg -y -i video_1.mp4 -i video_2.mp4 -filter_complex '[0]scale=426:240:force_original_aspect_ratio=decrease,pad=426:240:(ow-iw)/2:(oh-ih)/2,setsar=1[v0];[1]scale=426:240:force_original_aspect_ratio=decrease,pad=426:240:(ow-iw)/2:(oh-ih)/2,setsar=1[v1];[v0][0:a:0][v1][1:a:0]concat=n=2:v=1:a=1[v][a]' -map '[v]' -map '[a]' concatenated_video.mp4



In the output I see :


ffmpeg version 6.0 Copyright (c) 2000-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_1 --enable-shared --enable-pthreads --enable-version3 --cc=clang --host-cflags= --host-ldflags= --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libaribb24 --enable-libbluray --enable-libdav1d --enable-libjxl --enable-libmp3lame --enable-libopus --enable-librav1e --enable-librist --enable-librubberband --enable-libsnappy --enable-libsrt --enable-libsvtav1 --enable-libtesseract --enable-libtheora --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libxvid --enable-lzma --enable-libfontconfig --enable-libfreetype --enable-frei0r --enable-libass --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libspeex --enable-libsoxr --enable-libzmq --enable-libzimg --disable-libjack --disable-indev=jack --enable-videotoolbox --enable-audiotoolbox
 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, mov,mp4,m4a,3gp,3g2,mj2, from 'video_1.mp4':
 Metadata:
 major_brand : isom
 minor_version : 512
 compatible_brands: isomiso2avc1mp41
 encoder : Lavf60.3.100
 Duration: 00:00:05.76, start: 0.000000, bitrate: 1582 kb/s
 Stream #0:0[0x1](und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(progressive), 640x360 [SAR 1:1 DAR 16:9], 1473 kb/s, 30 fps, 30 tbr, 15360 tbn (default)
 Metadata:
 handler_name : ISO Media file produced by Google Inc. Created on: 08/17/2020.
 vendor_id : [0][0][0][0]
 encoder : Lavc60.3.100 libx264
 Stream #0:1[0x2](eng): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 112 kb/s (default)
 Metadata:
 handler_name : ISO Media file produced by Google Inc. Created on: 08/17/2020.
 vendor_id : [0][0][0][0]
Input #1, mov,mp4,m4a,3gp,3g2,mj2, from 'video_2.mp4':
 Metadata:
 major_brand : isom
 minor_version : 512
 compatible_brands: isomiso2avc1mp41
 encoder : Lavf60.3.100
 Duration: 00:00:16.40, start: 0.000000, bitrate: 383 kb/s
 Stream #1:0[0x1](und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709, progressive), 426x240 [SAR 640:639 DAR 16:9], 245 kb/s, 29.97 fps, 29.97 tbr, 30k tbn (default)
 Metadata:
 handler_name : Core Media Video
 vendor_id : [0][0][0][0]
 encoder : Lavc60.3.100 libx264
 Stream #1:1[0x2](eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 128 kb/s (default)
 Metadata:
 handler_name : Core Media Audio
 vendor_id : [0][0][0][0]
Stream mapping:
 Stream #0:0 (h264) -> scale:default
 Stream #0:1 (aac) -> concat
 Stream #1:0 (h264) -> scale:default
 Stream #1:1 (aac) -> concat
 concat -> Stream #0:0 (libx264)
 concat -> Stream #0:1 (aac)
Press [q] to stop, [?] for help
[vost#0:0/libx264 @ 0x7fc777006280] Frame rate very high for a muxer not efficiently supporting it.
Please consider specifying a lower framerate, a different muxer or setting vsync/fps_mode to vfr
[libx264 @ 0x7fc777006580] using SAR=1/1
[libx264 @ 0x7fc777006580] MB rate (405000000) > level limit (16711680)
[libx264 @ 0x7fc777006580] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
[libx264 @ 0x7fc777006580] profile High, level 6.2, 4:2:0, 8-bit
[libx264 @ 0x7fc777006580] 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=7 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=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
Output #0, mp4, to 'concatenated_video.mp4':
 Metadata:
 major_brand : isom
 minor_version : 512
 compatible_brands: isomiso2avc1mp41
 encoder : Lavf60.3.100
 Stream #0:0: Video: h264 (avc1 / 0x31637661), yuv420p(tv, progressive), 426x240 [SAR 1:1 DAR 71:40], q=2-31, 1000k tbn
 Metadata:
 encoder : Lavc60.3.100 libx264
 Side data:
 cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: N/A
 Stream #0:1: Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 128 kb/s
 Metadata:
 encoder : Lavc60.3.100 aac
[vost#0:0/libx264 @ 0x7fc777006280] More than 1000 frames duplicated 1.1kbits/s speed=4.94x



Process hangs and I see that ffmpeg uses 500% of the CPU. Any idea how to fix (deal with) this ?


I can open both videos on my computer and play them.