
Recherche avancée
Médias (91)
-
GetID3 - Boutons supplémentaires
9 avril 2013, par
Mis à jour : Avril 2013
Langue : français
Type : Image
-
Core Media Video
4 avril 2013, par
Mis à jour : Juin 2013
Langue : français
Type : Video
-
The pirate bay depuis la Belgique
1er avril 2013, par
Mis à jour : Avril 2013
Langue : français
Type : Image
-
Bug de détection d’ogg
22 mars 2013, par
Mis à jour : Avril 2013
Langue : français
Type : Video
-
Exemple de boutons d’action pour une collection collaborative
27 février 2013, par
Mis à jour : Mars 2013
Langue : français
Type : Image
-
Exemple de boutons d’action pour une collection personnelle
27 février 2013, par
Mis à jour : Février 2013
Langue : English
Type : Image
Autres articles (15)
-
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 -
Organiser par catégorie
17 mai 2013, parDans MédiaSPIP, une rubrique a 2 noms : catégorie et rubrique.
Les différents documents stockés dans MédiaSPIP peuvent être rangés dans différentes catégories. On peut créer une catégorie en cliquant sur "publier une catégorie" dans le menu publier en haut à droite ( après authentification ). Une catégorie peut être rangée dans une autre catégorie aussi ce qui fait qu’on peut construire une arborescence de catégories.
Lors de la publication prochaine d’un document, la nouvelle catégorie créée sera proposée (...) -
Les thèmes de MediaSpip
4 juin 20133 thèmes sont proposés à l’origine par MédiaSPIP. L’utilisateur MédiaSPIP peut rajouter des thèmes selon ses besoins.
Thèmes MediaSPIP
3 thèmes ont été développés au départ pour MediaSPIP : * SPIPeo : thème par défaut de MédiaSPIP. Il met en avant la présentation du site et les documents média les plus récents ( le type de tri peut être modifié - titre, popularité, date) . * Arscenic : il s’agit du thème utilisé sur le site officiel du projet, constitué notamment d’un bandeau rouge en début de page. La structure (...)
Sur d’autres sites (4683)
-
YouTube isn't recieving any data from my FFmpeg stream to the RTMP server
9 novembre 2020, par Eniola OyewoleSo I have a python programming running on my computer that is sending the same image to an RTMP server every second. The python program is reading the image and then sending the data, from the console everything seems ok but youtube says that its not receiving any data. My code :


import subprocess
import cv2
rtmp_url = "rtmp://b.rtmp.youtube.com/live2/"

fps = 1.5

width = 600
height = 600

# command and params for ffmpeg
command = ['ffmpeg',
 '-y',
 '-f', 'rawvideo',
 '-vcodec', 'rawvideo',
 '-pix_fmt', 'bgr24',
 '-s', "{}x{}".format(width, height),
 '-r', str(fps),
 '-i', '-',
 '-c:v', 'libx264',
 '-pix_fmt', 'yuv420p',
 '-f', 'flv',
 rtmp_url]

# using subprocess and pipe to fetch frame data
p = subprocess.Popen(command, stdin=subprocess.PIPE)

while True:
 f = cv2.imread('assets/temporary.png')

 p.stdin.write(f.tobytes())



My console :


[rtmp @ 0x28d9940] Server response validating failed
<videocapture 0x7f60895dafb0="0x7f60895dafb0">
ffmpeg version 3.4.8-0ubuntu0.2 Copyright (c) 2000-2020 the FFmpeg developers
 built with gcc 7 (Ubuntu 7.5.0-3ubuntu1~18.04)
 configuration: --prefix=/usr --extra-version=0ubuntu0.2 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-librsvg --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared
 libavutil 55. 78.100 / 55. 78.100
 libavcodec 57.107.100 / 57.107.100
 libavformat 57. 83.100 / 57. 83.100
 libavdevice 57. 10.100 / 57. 10.100
 libavfilter 6.107.100 / 6.107.100
 libavresample 3. 7. 0 / 3. 7. 0
 libswscale 4. 8.100 / 4. 8.100
 libswresample 2. 9.100 / 2. 9.100
 libpostproc 54. 7.100 / 54. 7.100
Input #0, rawvideo, from 'pipe:':
 Duration: N/A, start: 0.000000, bitrate: 12960 kb/s
 Stream #0:0: Video: rawvideo (BGR[24] / 0x18524742), bgr24, 600x600, 12960 kb/s, 1.50 fps, 1.50 tbr, 1.50 tbn, 1.50 tbc
Stream mapping:
 Stream #0:0 -> #0:0 (rawvideo (native) -> h264 (libx264))
[libx264 @ 0x5613ba2e3d40] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
[libx264 @ 0x5613ba2e3d40] profile High, level 2.2
[libx264 @ 0x5613ba2e3d40] 264 - core 152 r2854 e9a5903 - 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=1 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, flv, to 'rtmp://b.rtmp.youtube.com/live2/<key>':
 Metadata:
 encoder : Lavf57.83.100
 Stream #0:0: Video: h264 (libx264) ([7][0][0][0] / 0x0007), yuv420p, 600x600, q=-1--1, 1.50 fps, 1k tbn, 1.50 tbc
 Metadata:
 encoder : Lavc57.107.100 libx264
 Side data:
 cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
frame= 55 fps=0.0 q=19.0 size= 20kB time=00:00:01.33 bit
</key></videocapture>


-
How to add black frames and keep the framerate ?
3 mars 2020, par PatrykI have a black image from which I generate videos filled with black color only for specified lengths that I can then concatenate with my destination videos. This is how I produce it :
ffmpeg -loop 1 -i black.png -t 00:00:00.066 \
-c:v libx264 -pix_fmt yuv420p -vf scale=840:480,fps=15 out66ms.mp4with the following
ffmpeg
output :Input #0, png_pipe, from 'black.png':
Duration: N/A, bitrate: N/A
Stream #0:0: Video: png, rgba(pc), 608x342 [SAR 5669:5669 DAR 16:9], 25 fps, 25 tbr, 25 tbn, 25 tbc
Stream mapping:
Stream #0:0 -> #0:0 (png (native) -> h264 (libx264))
Press [q] to stop, [?] for help
[libx264 @ 0x7fadf3826e00] using SAR=64/63
[libx264 @ 0x7fadf3826e00] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
[libx264 @ 0x7fadf3826e00] profile High, level 3.0
[libx264 @ 0x7fadf3826e00] 264 - core 155 r2917 0a84d98 - 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=15 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 'out66ms.mp4':
Metadata:
encoder : Lavf58.29.100
Stream #0:0: Video: h264 (libx264) (avc1 / 0x31637661), yuv420p, 840x480 [SAR 64:63 DAR 16:9], q=-1--1, 15 fps, 15360 tbn, 15 tbc
Metadata:
encoder : Lavc58.54.100 libx264
Side data:
cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
frame= 1 fps=0.0 q=27.0 Lsize= 2kB time=00:00:00.00 bitrate=201107.7kbits/s speed=0.0031x
video:1kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 100.984009%
[libx264 @ 0x7fadf3826e00] frame I:1 Avg QP:12.00 size: 123
[libx264 @ 0x7fadf3826e00] mb I I16..4: 100.0% 0.0% 0.0%
[libx264 @ 0x7fadf3826e00] 8x8 transform intra:0.0%
[libx264 @ 0x7fadf3826e00] coded y,uvDC,uvAC intra: 0.0% 0.0% 0.0%
[libx264 @ 0x7fadf3826e00] i16 v,h,dc,p: 97% 0% 3% 0%
[libx264 @ 0x7fadf3826e00] i8c dc,h,v,p: 100% 0% 0% 0%
[libx264 @ 0x7fadf3826e00] kb/s:14.76I’d like to then concatenate it with videos like this one :
ffprobe file.ts
Input #0, mpegts, from 'file.ts':
Duration: 00:00:06.67, start: 0.000000, bitrate: 1090 kb/s
Program 1
Metadata:
service_name : Service01
service_provider: FFmpeg
Stream #0:0[0x100]: Video: h264 (Baseline) ([27][0][0][0] / 0x001B), yuv420p(progressive), 864x480, 90k tbr, 90k tbn, 180k tbcbut as soon as I concatenate it using concat demuxer like that :
ffmpeg -y -hide_banner \
-f concat -safe 0 \
-i <(echo "file '$PWD/out66ms.mp4'"; for f in dir/*.ts; do echo "file '$PWD/$f'"; done) \
-c copy \
output.mpI get this :
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'output.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf58.29.100
Duration: 00:01:41.38, start: 0.000000, bitrate: 170 kb/s
Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 840x480 [SAR 64:63 DAR 16:9], 170 kb/s, 2.67 fps, 2.67 tbr, 15360 tbn, 30 tbc (default)
Metadata:
handler_name : VideoHandlerWhich has
2.67 fps
whereas not adding this empty black video to concatenation gives the following (desired15 fps
) :Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'output.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf58.29.100
Duration: 00:00:17.29, start: 0.000000, bitrate: 1001 kb/s
Stream #0:0(und): Video: h264 (Baseline) (avc1 / 0x31637661), yuv420p, 864x480, 999 kb/s, 15.62 fps, 15.58 tbr, 90k tbn, 180k tbc (default)
Metadata:
handler_name : VideoHandlerEDIT
I’ve tried reencoding instead of copying :
ffmpeg -y -hide_banner \
-f concat -safe 0 \
-i <(echo "file '$PWD/out66ms.mp4'"; for f in dir/*.ts; do echo "file '$PWD/$f'"; done) \
-c:v libx264 -vf scale=840:480,fps=15 \
output.mpBut I get a similar result :
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'output.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf58.29.100
Duration: 00:01:41.00, start: 0.000000, bitrate: 555 kb/s
Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1680x480 [SAR 64:63 DAR 32:9], 554 kb/s, 15 fps, 15 tbr, 15360 tbn, 30 tbc (default)
Metadata:
handler_name : VideoHandlereven though that the fps is set properly the video is too long and slowed down.
How to properly add those black filled videos to preserve fps or set it to desired value ?
-
Error using ffmpeg image2pipe with phantomjs to render video from webpage screenshots
14 novembre 2016, par user1690179I am trying to use phantomjs with ffmpeg to complie videos from screenshots of a webpage as described here :
https://groups.google.com/forum/# !msg/phantomjs/wluVGGjhL90/oGBXqh7QP44JI have the following test.js file :
var page = require('webpage').create();
page.clipRect = { top: 0, left: 0, width: 900, height: 800};
page.viewportSize = { width: 900, height: 800};
var url = 'http://dl.dropbox.com/u/621993/voronoi/voronoi.html';
var frames = 100;
page.open(url, function(){
setInterval(function(){
page.render('/dev/stdout');
if( frames == 0 ){
phantom.exit();
}
frames--;
}, 100);
});Then I run this command, taken from the link above :
$ phantomjs test.js |ffmpeg -c:v png -f image2pipe -r 10 -sameq -i - -y test.mp4
Including -sameq causes an error in ffmpeg, so I took it out and ran :
$ phantomjs test.js |ffmpeg -c:v png -f image2pipe -r 10 -i - -y test.mp4
I get the following output from ffmpeg :
ffmpeg version 2.0 Copyright (c) 2000-2013 the FFmpeg developers
built on Jul 22 2013 09:14:18 with llvm-gcc 4.2.1 (LLVM build 2336.11.00)
configuration: --prefix=/Volumes/Ramdisk/sw --enable-gpl --enable-pthreads --enable-version3 --enable-libspeex --enable-libvpx --disable-decoder=libvpx --enable-libmp3lame --enable-libtheora --enable-libvorbis --enable-libx264 --enable-avfilter --enable-libopencore_amrwb --enable-libopencore_amrnb --enable-filters --enable-libgsm --arch=x86_64 --enable-runtime-cpudetect
libavutil 52. 38.100 / 52. 38.100
libavcodec 55. 18.102 / 55. 18.102
libavformat 55. 12.100 / 55. 12.100
libavdevice 55. 3.100 / 55. 3.100
libavfilter 3. 79.101 / 3. 79.101
libswscale 2. 3.100 / 2. 3.100
libswresample 0. 17.102 / 0. 17.102
libpostproc 52. 3.100 / 52. 3.100
Input #0, image2pipe, from 'pipe:':
Duration: N/A, bitrate: N/A
Stream #0:0: Video: png, rgba, 900x800 [SAR 2835:2835 DAR 9:8], 10 fps, 10 tbr, 10 tbn, 10 tbc
No pixel format specified, yuv444p for H.264 encoding chosen.
Use -pix_fmt yuv420p for compatibility with outdated media players.
[libx264 @ 0x7f8973803800] using SAR=1/1
[libx264 @ 0x7f8973803800] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX
[libx264 @ 0x7f8973803800] profile High 4:4:4 Predictive, level 3.1, 4:4:4 8-bit
[libx264 @ 0x7f8973803800] 264 - core 133 - H.264/MPEG-4 AVC codec - Copyleft 2003-2013 - 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=4 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=10 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 'test.mp4':
Metadata:
encoder : Lavf55.12.100
Stream #0:0: Video: h264 (libx264) ([33][0][0][0] / 0x0021), yuv444p, 900x800 [SAR 1:1 DAR 9:8], q=-1--1, 10240 tbn, 10 tbc
Stream mapping:
Stream #0:0 -> #0:0 (png -> libx264)
pipe:: Input/output error0 size= 65kB time=00:00:04.10 bitrate= 130.5kbits/s
frame= 93 fps= 15 q=-1.0 Lsize= 71kB time=00:00:09.10 bitrate= 63.8kbits/s
video:69kB audio:0kB subtitle:0 global headers:0kB muxing overhead 2.696543%
[libx264 @ 0x7f8973803800] frame I:1 Avg QP:15.17 size: 50212
[libx264 @ 0x7f8973803800] frame P:24 Avg QP: 8.91 size: 575
[libx264 @ 0x7f8973803800] frame B:68 Avg QP: 9.69 size: 87
[libx264 @ 0x7f8973803800] consecutive B-frames: 2.2% 0.0% 3.2% 94.6%
[libx264 @ 0x7f8973803800] mb I I16..4: 64.2% 19.6% 16.1%
[libx264 @ 0x7f8973803800] mb P I16..4: 2.8% 0.2% 0.1% P16..4: 0.5% 0.0% 0.0% 0.0% 0.0% skip:96.3%
[libx264 @ 0x7f8973803800] mb B I16..4: 0.0% 0.0% 0.0% B16..8: 3.1% 0.0% 0.0% direct: 0.0% skip:96.9% L0:76.4% L1:23.6% BI: 0.0%
[libx264 @ 0x7f8973803800] 8x8 transform intra:13.9% inter:54.0%
[libx264 @ 0x7f8973803800] coded y,u,v intra: 7.4% 4.8% 5.2% inter: 0.1% 0.1% 0.1%
[libx264 @ 0x7f8973803800] i16 v,h,dc,p: 68% 31% 2% 0%
[libx264 @ 0x7f8973803800] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 48% 20% 32% 0% 0% 0% 0% 0% 0%
[libx264 @ 0x7f8973803800] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 30% 31% 20% 3% 3% 3% 5% 3% 4%
[libx264 @ 0x7f8973803800] Weighted P-Frames: Y:0.0% UV:0.0%
[libx264 @ 0x7f8973803800] ref P L0: 91.9% 0.0% 7.4% 0.7%
[libx264 @ 0x7f8973803800] ref B L0: 20.5% 79.5%
[libx264 @ 0x7f8973803800] ref B L1: 99.9% 0.1%
[libx264 @ 0x7f8973803800] kb/s:60.16The output test.mp4 file is a blank 10 second video - just a black screen. From what i can tell, I am getting a pipe: : Input/output error from ffmpeg.
I am pretty new to ffmpeg and I have tried changing some parameters and video codecs in the ffmpeg call, but have not found a solution yet. Can anyone advise ?