
Recherche avancée
Médias (1)
-
Rennes Emotion Map 2010-11
19 octobre 2011, par
Mis à jour : Juillet 2013
Langue : français
Type : Texte
Autres articles (48)
-
Creating farms of unique websites
13 avril 2011, parMediaSPIP platforms can be installed as a farm, with a single "core" hosted on a dedicated server and used by multiple websites.
This allows (among other things) : implementation costs to be shared between several different projects / individuals rapid deployment of multiple unique sites creation of groups of like-minded sites, making it possible to browse media in a more controlled and selective environment than the major "open" (...) -
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 -
HTML5 audio and video support
13 avril 2011, parMediaSPIP uses HTML5 video and audio tags to play multimedia files, taking advantage of the latest W3C innovations supported by modern browsers.
The MediaSPIP player used has been created specifically for MediaSPIP and can be easily adapted to fit in with a specific theme.
For older browsers the Flowplayer flash fallback is used.
MediaSPIP allows for media playback on major mobile platforms with the above (...)
Sur d’autres sites (10813)
-
FFMPEG SAR mismatch when concatenating videos
6 septembre 2020, par marcmanI'm trying to concatenate videos with different codecs using the
concat
filter. I'm also doing a bunch of processing to scale and pad the individual clips in this filter as well. However, I keep getting an error of this form :

[Parsed_concat_14 @ 0x556b918ed580] Input link in1:v0 parameters (size 960x1280, SAR 0:1) do not match the corresponding output link in0:v0 parameters (1280x720, SAR 1:1)



Here is my command :


ffmpeg \
 -y \
 -loglevel warning \
 -stats \
 -i videos/vid0.mp4 \
 -i videos/vid1.mp4 \
 -i videos/vid2.mov \
 -filter_complex \
"[0:v]setpts=PTS-STARTPTS, scale=1920:1080, setsar=1, drawtext=expansion=strftime: basetime=$(date +%s -d'2020-07-10 16:04:44')000000 : fontcolor=white : text='%^b %d, %Y%n%l\\:%M%p' : fontsize=36 : y=1080-4*lh : x=1920-text_w-2*max_glyph_w; \
[1:v]setpts=PTS-STARTPTS, scale=810:1080, pad=width=1920:height=1080:x=555:y=0:color=black, setsar=1, drawtext=expansion=strftime: basetime=$(date +%s -d'2020-08-20 21:12:27')000000 : fontcolor=white : text='%^b %d, %Y%n%l\\:%M%p' : fontsize=36 : y=1080-4*lh : x=1365-text_w-2*max_glyph_w; \
[2:v]setpts=PTS-STARTPTS, scale=607:1080, pad=width=1920:height=1080:x=656:y=0:color=black, setsar=1, drawtext=expansion=strftime: basetime=$(date +%s -d'2020-08-27 16:42:26')000000 : fontcolor=white : text='%^b %d, %Y%n%l\\:%M%p' : fontsize=36 : y=1080-4*lh : x=1263-text_w-2*max_glyph_w; \
[0:v][0:a][1:v][1:a][2:v][2:a]concat=n=3:v=1:a=1[v][a]" \
 -map "[v]" \
 -map "[a]" \
 videos.mp4



This gives the following error :


[Parsed_concat_14 @ 0x563ab9d840c0] Input link in1:v0 parameters (size 960x1280, SAR 0:1) do not match the corresponding output link in0:v0 parameters (1280x720, SAR 1:1)
[Parsed_concat_14 @ 0x563ab9d840c0] Input link in2:v0 parameters (size 1080x1920, SAR 0:1) do not match the corresponding output link in0:v0 parameters (1280x720, SAR 1:1)



The input videos have these resolutions :


- 

- vid0.mp4 : (1280x720)
- vid1.mp4 : (960x1280)
- vid2.mp4 : (1080x1920)








The output resolution of the concatenated output is to be 1920x1080.


I've added the
setsar=1
command after all my scaling and padding operations, as per this question and answer. I've also triedsetdar=16/9
as in this answer, but it made no difference.

What am I missing here ?


-
FFmpeg merge two files from different sources with different bitrates
2 mars 2023, par FamousWollufI have created an intro video with Adobe Premiere Pro and I want to add the intro video to my downloaded Mixer stream videos before uploading them to YouTube, without reencoding the complete video through Adobe Premiere because that takes a long time because the videos are more then an hour.



I tried it with FFmpeg
ffmpeg -safe 0 -f concat -i list.txt -c copy output.mp4
.
The intro is normal but the video part from Mixer is running way to fast.

I think it has something todo with the bitrate but I can't figure it out.


Output of intro file :



Metadata:
 major_brand : mp42
 minor_version : 0
 compatible_brands: mp42mp41
 creation_time : 2020-05-12T11:12:11.000000Z
 Duration: 00:00:06.06, start: 0.000000, bitrate: 2408 kb/s
 Stream #0:0(eng): Video: h264 (Main) (avc1 / 0x31637661), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], 2086 kb/s, 29.97 fps, 29.97 tbr, 30k tbn, 59.94 tbc (default)
 Metadata:
 creation_time : 2020-05-12T11:12:11.000000Z
 handler_name : ?Mainconcept Video Media Handler
 encoder : AVC Coding
 Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 317 kb/s (default)
 Metadata:
 creation_time : 2020-05-12T11:12:11.000000Z
 handler_name : #Mainconcept MP4 Sound Media Handler




Output of Mixer file :



Metadata:
 major_brand : isom
 minor_version : 512
 compatible_brands: isomiso2avc1mp41
 encoder : Lavf58.12.100
 Duration: 01:02:00.58, start: 0.000000, bitrate: 1937 kb/s
 Stream #0:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p, 1280x720, 1800 kb/s, 29.41 fps, 29.97 tbr, 16k tbn, 32k tbc (default)
 Metadata:
 handler_name : VideoHandler
 Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 128 kb/s (default)
 Metadata:
 handler_name : SoundHandler




Output of the merged file :



Metadata:
 major_brand : isom
 minor_version : 512
 compatible_brands: isomiso2avc1mp41
 encoder : Lavf58.43.100
 Duration: 00:57:03.84, start: 0.000000, bitrate: 2109 kb/s
 Stream #0:0(eng): Video: h264 (Main) (avc1 / 0x31637661), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], 3377 kb/s, 55.14 fps, 29.97 tbr, 30k tbn, 59.94 tbc (default)
 Metadata:
 handler_name : ?Mainconcept Video Media Handler
 Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 140 kb/s (default)
 Metadata:
 handler_name : #Mainconcept MP4 Sound Media Handler




If I need to reencode something my preference would be the intro because it's only 6 seconds.


-
ffmpeg : xstack doesn't work when inputs are scaled to certain dimensions
4 juin 2020, par dfriend21I'm using ffmpeg to create a mosaic of videos using the
xstack
filter. The input videos may come in varying dimensions, so I'm using thescale
filter to scale them beforehand, and I'm using theforce_original_aspect_ratio
option and then thepad
filter to keep the original aspect ratios of each video and add black bars to the sides to make each video have the correct dimensions.


I have a command that's working - however, it's inconsistent. For some dimensions it works, while for others it doesn't.



I'm using the
fluent-ffmpeg
Node.js module to callffmpeg
from Node.js. To do this, I'm passing an array of strings to thecomplexFilter()
function.


The following strings for the complex filter works :



"[0:v]scale=400:250:force_original_aspect_ratio=decrease,pad=400:250:(ow-iw)/2:(oh-ih)/2 [s0]"
"[1:v]scale=400:250:force_original_aspect_ratio=decrease,pad=400:250:(ow-iw)/2:(oh-ih)/2 [s1]"
"[s0][s1]xstack=inputs=2:fill='black':layout=0_0|w0_0[v]"
"[0:a][1:a]amix=inputs=2[a]"




However, if I change the output dimensions of each video to be 400:225 instead of 400:250 it fails.



"[0:v]scale=400:225:force_original_aspect_ratio=decrease,pad=400:225:(ow-iw)/2:(oh-ih)/2 [s0]"
"[1:v]scale=400:225:force_original_aspect_ratio=decrease,pad=400:225:(ow-iw)/2:(oh-ih)/2 [s1]"
"[s0][s1]xstack=inputs=2:fill='black':layout=0_0|w0_0[v]"
"[0:a][1:a]amix=inputs=2[a]"




The following error is given :



An error occurred: ffmpeg exited with code 1: Error reinitializing filters!
Failed to inject frame into filter network: Invalid argument
Error while processing the decoded data for stream #1:1
Conversion failed!




If it's relevant, the first video has dimensions of 1280x720 while the second video has dimensions of 320x240.



Anyone know why one set of dimensions works while the other doesn't ?



EDIT : Here is the full ffmpeg log for when it fails :



ffmpeg version git-2020-05-13-b12b053 Copyright (c) 2000-2020 the FFmpeg developers
 built with gcc 9.3.1 (GCC) 20200513
 configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libdav1d --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libsrt --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --disable-w32threads --enable-libmfx --enable-ffnvcodec --enable-cuda-llvm --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth --enable-libopenmpt --enable-amf
 libavutil 56. 45.100 / 56. 45.100
 libavcodec 58. 84.100 / 58. 84.100
 libavformat 58. 43.100 / 58. 43.100
 libavdevice 58. 9.103 / 58. 9.103
 libavfilter 7. 80.100 / 7. 80.100
 libswscale 5. 6.101 / 5. 6.101
 libswresample 3. 6.100 / 3. 6.100
 libpostproc 55. 6.100 / 55. 6.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'C:/Users/user_name/Desktop/vids/vid1.mp4':
 Metadata:
 major_brand : mp42
 minor_version : 0
 compatible_brands: mp41isom
 creation_time : 2020-05-21T15:52:20.000000Z
 Duration: 00:00:10.76, start: 0.000000, bitrate: 8385 kb/s
 Stream #0:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuvj420p(pc), 1280x720 [SAR 1:1 DAR 16:9], 8237 kb/s, 29.99 fps, 30 tbr, 30k tbn, 60 tbc (default)
 Metadata:
 creation_time : 2020-05-21T15:52:20.000000Z
 handler_name : VideoHandler
 encoder : AVC Coding
 Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 165 kb/s (default)
 Metadata:
 creation_time : 2020-05-21T15:52:20.000000Z
 handler_name : SoundHandler
Input #1, mov,mp4,m4a,3gp,3g2,mj2, from 'C:/Users/user_name/Desktop/vids/vid2.mp4':
 Metadata:
 major_brand : mp42
 minor_version : 0
 compatible_brands: mp41isom
 creation_time : 2020-05-21T15:54:37.000000Z
 Duration: 00:00:11.01, start: 0.000000, bitrate: 836 kb/s
 Stream #1:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuvj420p(pc), 320x240 [SAR 1:1 DAR 4:3], 669 kb/s, 29.88 fps, 30 tbr, 30k tbn, 60 tbc (default)
 Metadata:
 creation_time : 2020-05-21T15:54:37.000000Z
 handler_name : VideoHandler
 encoder : AVC Coding
 Stream #1:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 163 kb/s (default)
 Metadata:
 creation_time : 2020-05-21T15:54:37.000000Z
 handler_name : SoundHandler
Stream mapping:
 Stream #0:0 (h264) -> scale
 Stream #0:1 (aac) -> amix:input0
 Stream #1:0 (h264) -> scale
 Stream #1:1 (aac) -> amix:input1
 xstack -> Stream #0:0 (libx264)
 amix -> Stream #0:1 (aac)
Press [q] to stop, [?] for help
[swscaler @ 000001343fefc200] deprecated pixel format used, make sure you did set range correctly
[Parsed_pad_1 @ 000001343f8dc3c0] Padded dimensions cannot be smaller than input dimensions.
[Parsed_pad_1 @ 000001343f8dc3c0] Failed to configure input pad on Parsed_pad_1
Error reinitializing filters!
Failed to inject frame into filter network: Invalid argument
Error while processing the decoded data for stream #1:1
Conversion failed!

Done in 0.66s.