
Recherche avancée
Autres articles (25)
-
Submit enhancements and plugins
13 avril 2011If you have developed a new extension to add one or more useful features to MediaSPIP, let us know and its integration into the core MedisSPIP functionality will be considered.
You can use the development discussion list to request for help with creating a plugin. As MediaSPIP is based on SPIP - or you can use the SPIP discussion list SPIP-Zone. -
Script d’installation automatique de MediaSPIP
25 avril 2011, parAfin de palier aux difficultés d’installation dues principalement aux dépendances logicielles coté serveur, un script d’installation "tout en un" en bash a été créé afin de faciliter cette étape sur un serveur doté d’une distribution Linux compatible.
Vous devez bénéficier d’un accès SSH à votre serveur et d’un compte "root" afin de l’utiliser, ce qui permettra d’installer les dépendances. Contactez votre hébergeur si vous ne disposez pas de cela.
La documentation de l’utilisation du script d’installation (...) -
Demande de création d’un canal
12 mars 2010, parEn fonction de la configuration de la plateforme, l’utilisateur peu avoir à sa disposition deux méthodes différentes de demande de création de canal. La première est au moment de son inscription, la seconde, après son inscription en remplissant un formulaire de demande.
Les deux manières demandent les mêmes choses fonctionnent à peu près de la même manière, le futur utilisateur doit remplir une série de champ de formulaire permettant tout d’abord aux administrateurs d’avoir des informations quant à (...)
Sur d’autres sites (5120)
-
ffmpeg weird x264 encoding behavior
1er février 2016, par JMorI have a captured a 720x480 video with a display aspect ratio of 16:9 which I want to crop, resize and pad, but just the x264 encoding command is giving me a headache.
(Screenshot of input.m2v) Here is my command :
ffmpeg -ss 1861 -i input.m2v -c:v libx264 -profile:v main -preset:v medium -level 3.1 -x264opts crf=21.228 -t 60 -y -f mp4 output.mp4
And here is the ffmpeg output :
Input #0, mpegvideo, from 'input.m2v':
Duration: N/A, bitrate: N/A
Stream #0:0: Video: mpeg2video (Main), yuv420p(tv), 720x480 [SAR 32:27 DAR 1
6:9], max. 6605 kb/s, 31.02 fps, 59.94 tbr, 1200k tbn, 59.94 tbc
[libx264 @ 02ba84c0] using SAR=32/27
[libx264 @ 02ba84c0] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX
[libx264 @ 02ba84c0] profile Main, level 3.1
[libx264 @ 02ba84c0] 264 - core 144 r2525 40bb568 - H.264/MPEG-4 AVC codec - Cop
yleft 2003-2014 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deb
lock=1:0:0 analyse=0x1:0x111 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 m
e_range=16 chroma_me=1 trellis=1 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=1 chro
ma_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 scene
cut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=21.2 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 : Lavf56.19.100
Stream #0:0: Video: h264 (libx264) ([33][0][0][0] / 0x0021), yuv420p, 720x48
0 [SAR 32:27 DAR 16:9], q=-1--1, 29.97 fps, 30k tbn, 29.97 tbc
Metadata:
encoder : Lavc56.21.102 libx264
Stream mapping:
Stream #0:0 -> #0:0 (mpeg2video (native) -> h264 (libx264))The output size is 720x480, displayed as 853x480, as expected.
But it looks like the frame has been vertically scaled by a factor of 1.18 and then cropped to a height of 480, so that I am losing the top and bottom of the frame. In fact, the behavior is equivalent to :-vf "scale=720:569,crop=720:480:0:0"
Although I assume the aspect ratio plays a part here (I think the 1.18 factor is really (16/9)/(720/480)) I am surprised that ffmpeg would do that out of the blue. May be someone more knowledgeable than me could explain it ?
-
ffmpeg weird x264 encoding behavior
1er février 2016, par JMorI have a captured a 720x480 video with a display aspect ratio of 16:9 which I want to crop, resize and pad, but just the x264 encoding command is giving me a headache.
(Screenshot of input.m2v) Here is my command :
ffmpeg -ss 1861 -i input.m2v -c:v libx264 -profile:v main -preset:v medium -level 3.1 -x264opts crf=21.228 -t 60 -y -f mp4 output.mp4
And here is the ffmpeg output :
Input #0, mpegvideo, from 'input.m2v':
Duration: N/A, bitrate: N/A
Stream #0:0: Video: mpeg2video (Main), yuv420p(tv), 720x480 [SAR 32:27 DAR 1
6:9], max. 6605 kb/s, 31.02 fps, 59.94 tbr, 1200k tbn, 59.94 tbc
[libx264 @ 02ba84c0] using SAR=32/27
[libx264 @ 02ba84c0] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX
[libx264 @ 02ba84c0] profile Main, level 3.1
[libx264 @ 02ba84c0] 264 - core 144 r2525 40bb568 - H.264/MPEG-4 AVC codec - Cop
yleft 2003-2014 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deb
lock=1:0:0 analyse=0x1:0x111 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 m
e_range=16 chroma_me=1 trellis=1 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=1 chro
ma_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 scene
cut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=21.2 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 : Lavf56.19.100
Stream #0:0: Video: h264 (libx264) ([33][0][0][0] / 0x0021), yuv420p, 720x48
0 [SAR 32:27 DAR 16:9], q=-1--1, 29.97 fps, 30k tbn, 29.97 tbc
Metadata:
encoder : Lavc56.21.102 libx264
Stream mapping:
Stream #0:0 -> #0:0 (mpeg2video (native) -> h264 (libx264))The output size is 720x480, displayed as 853x480, as expected.
But it looks like the frame has been vertically scaled by a factor of 1.18 and then cropped to a height of 480, so that I am losing the top and bottom of the frame. In fact, the behavior is equivalent to :-vf "scale=720:569,crop=720:480:0:0"
Although I assume the aspect ratio plays a part here (I think the 1.18 factor is really (16/9)/(720/480)) I am surprised that ffmpeg would do that out of the blue. May be someone more knowledgeable than me could explain it ?
-
How to add BGM when pipe opencv images to ffmpeg - python
23 mars 2020, par karobbenBasically, I know how to stream by Pipe opencv to ffmpeg using python.
But my problem is I can’t add an audio file (BGM) for it. Does anyone know how to make it with python ?my python code is :
import cv2 as cv
import subprocess as sp
# ffmpeg command
command = ['ffmpeg',
#'-re', '-stream_loop', '-1',
#'-i', '/home/pi/scrpt/Blive/StarBucks_BGN.mp3',
'-y',
'-f', 'rawvideo',
'-vcodec','rawvideo',
'-pix_fmt', 'bgr24',
'-s', "{}x{}".format(width, height),
'-r', str(fps),
'-i', '-',
'-c:v', 'libx264',
'-pix_fmt', 'yuv420p',
'-preset', 'ultrafast',
'-f', 'flv',
rtmpUrl]I know that I can achieve this by :
sudo raspivid -o - -t 0 -w 1280 -h 720 -fps 24 -b 1000000 |
ffmpeg -re -stream_loop -1 -i "/home/pi/scrpt/Blive/StarBucks_BGN.mp3" \
-f h264 -i - -vcodec copy -r 30 -acodec aac -b:a 100k -preset ultrafast \
-tune zerolatency -f flv "rtmp://"So, I tried to add
-re -stream_loop -1 -i "/home/pi/scrpt/Blive/StarBucks_BGN.mp3"
into the python pipe, but it crashed with :[libx264 @ 0x1952aa0] using cpu capabilities: ARMv6 NEON
[libx264 @ 0x1952aa0] profile Constrained Baseline, level 3.1
[libx264 @ 0x1952aa0] 264 - core 148 r2748 97eaef2 - H.264/MPEG-4 AVC codec - Copyleft 2003-2016 - http://www.videolan.org/x264.html - options: cabac=0 ref=1 deblock=0:0:0 analyse=0:0 me=dia subme=0 psy=1 psy_rd=1.00:0.00 mixed_ref=0 me_range=16 chroma_me=1 trellis=0 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=0 threads=6 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=0 weightp=0 keyint=250 keyint_min=25 scenecut=0 intra_refresh=0 rc=crf mbtree=0 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=0
[flv @ 0x1951d00] FLV does not support sample rate 48000, choose from (44100, 22050, 11025)
[flv @ 0x1951d00] Audio codec mp3 not compatible with flv
Could not write header for output file #0 (incorrect codec parameters ?): Function not implementedStream mapping:
Stream #1:0 -> #0:0 (rawvideo (native) -> h264 (libx264))
Stream #0:0 -> #0:1 (mp3 (native) -> mp3 (libmp3lame))
Last message repeated 1 times
Traceback (most recent call last):
File "With_BG.py", line 57, in <module>
p.stdin.write(BG.tostring())
BrokenPipeError: [Errno 32] Broken pipe
</module>