Recherche avancée

Médias (1)

Mot : - Tags -/MediaSPIP

Autres articles (7)

  • L’espace de configuration de MediaSPIP

    29 novembre 2010, par

    L’espace de configuration de MediaSPIP est réservé aux administrateurs. Un lien de menu "administrer" est généralement affiché en haut de la page [1].
    Il permet de configurer finement votre site.
    La navigation de cet espace de configuration est divisé en trois parties : la configuration générale du site qui permet notamment de modifier : les informations principales concernant le site (...)

  • Déploiements possibles

    31 janvier 2010, par

    Deux types de déploiements sont envisageable dépendant de deux aspects : La méthode d’installation envisagée (en standalone ou en ferme) ; Le nombre d’encodages journaliers et la fréquentation envisagés ;
    L’encodage de vidéos est un processus lourd consommant énormément de ressources système (CPU et RAM), il est nécessaire de prendre tout cela en considération. Ce système n’est donc possible que sur un ou plusieurs serveurs dédiés.
    Version mono serveur
    La version mono serveur consiste à n’utiliser qu’une (...)

  • Submit bugs and patches

    13 avril 2011

    Unfortunately a software is never perfect.
    If you think you have found a bug, report it using our ticket system. Please to help us to fix it by providing the following information : the browser you are using, including the exact version as precise an explanation as possible of the problem if possible, the steps taken resulting in the problem a link to the site / page in question
    If you think you have solved the bug, fill in a ticket and attach to it a corrective patch.
    You may also (...)

Sur d’autres sites (5680)

  • How to add black frames and keep the framerate ?

    3 mars 2020, par Patryk

    I 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.mp4

    with 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.76

    I’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 tbc

    but 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.mp

    I 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    : VideoHandler

    Which has 2.67 fps whereas not adding this empty black video to concatenation gives the following (desired 15 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    : VideoHandler

    EDIT

    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.mp

    But 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    : VideoHandler

    even 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 ?

  • YouTube isn't recieving any data from my FFmpeg stream to the RTMP server

    9 novembre 2020, par Eniola Oyewole

    So 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&#xA;<videocapture 0x7f60895dafb0="0x7f60895dafb0">&#xA;ffmpeg version 3.4.8-0ubuntu0.2 Copyright (c) 2000-2020 the FFmpeg developers&#xA;  built with gcc 7 (Ubuntu 7.5.0-3ubuntu1~18.04)&#xA;  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&#xA;  libavutil      55. 78.100 / 55. 78.100&#xA;  libavcodec     57.107.100 / 57.107.100&#xA;  libavformat    57. 83.100 / 57. 83.100&#xA;  libavdevice    57. 10.100 / 57. 10.100&#xA;  libavfilter     6.107.100 /  6.107.100&#xA;  libavresample   3.  7.  0 /  3.  7.  0&#xA;  libswscale      4.  8.100 /  4.  8.100&#xA;  libswresample   2.  9.100 /  2.  9.100&#xA;  libpostproc    54.  7.100 / 54.  7.100&#xA;Input #0, rawvideo, from &#x27;pipe:&#x27;:&#xA;  Duration: N/A, start: 0.000000, bitrate: 12960 kb/s&#xA;    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&#xA;Stream mapping:&#xA;  Stream #0:0 -> #0:0 (rawvideo (native) -> h264 (libx264))&#xA;[libx264 @ 0x5613ba2e3d40] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2&#xA;[libx264 @ 0x5613ba2e3d40] profile High, level 2.2&#xA;[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&#xA;Output #0, flv, to &#x27;rtmp://b.rtmp.youtube.com/live2/<key>&#x27;:&#xA;  Metadata:&#xA;    encoder         : Lavf57.83.100&#xA;    Stream #0:0: Video: h264 (libx264) ([7][0][0][0] / 0x0007), yuv420p, 600x600, q=-1--1, 1.50 fps, 1k tbn, 1.50 tbc&#xA;    Metadata:&#xA;      encoder         : Lavc57.107.100 libx264&#xA;    Side data:&#xA;      cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1&#xA;frame=   55 fps=0.0 q=19.0 size=      20kB time=00:00:01.33 bit&#xA;</key></videocapture>

    &#xA;

  • YouTube isn't receiving any data from my FFmpeg stream to the RTMP server

    9 novembre 2020, par Eniola Oyewole

    So I have a Python program running on my computer that is sending the same image to an RTMP server every second : it is reading the image and then sending the data. From the console everything seems OK, but YouTube says that its not receiving any data.

    &#xA;

    Here is my code :

    &#xA;

    import subprocess&#xA;import cv2&#xA;rtmp_url = "rtmp://b.rtmp.youtube.com/live2/"&#xA;&#xA;fps = 1.5&#xA;&#xA;width = 600&#xA;height = 600&#xA;&#xA;# command and params for ffmpeg&#xA;command = [&#x27;ffmpeg&#x27;,&#xA;           &#x27;-y&#x27;,&#xA;           &#x27;-f&#x27;, &#x27;rawvideo&#x27;,&#xA;           &#x27;-vcodec&#x27;, &#x27;rawvideo&#x27;,&#xA;           &#x27;-pix_fmt&#x27;, &#x27;bgr24&#x27;,&#xA;           &#x27;-s&#x27;, "{}x{}".format(width, height),&#xA;           &#x27;-r&#x27;, str(fps),&#xA;           &#x27;-i&#x27;, &#x27;-&#x27;,&#xA;           &#x27;-c:v&#x27;, &#x27;libx264&#x27;,&#xA;           &#x27;-pix_fmt&#x27;, &#x27;yuv420p&#x27;,&#xA;           &#x27;-f&#x27;, &#x27;flv&#x27;,&#xA;           rtmp_url]&#xA;&#xA;# using subprocess and pipe to fetch frame data&#xA;p = subprocess.Popen(command, stdin=subprocess.PIPE)&#xA;&#xA;while True:&#xA;  f = cv2.imread(&#x27;assets/temporary.png&#x27;)&#xA;&#xA;  p.stdin.write(f.tobytes())&#xA;

    &#xA;

    My console's output is :

    &#xA;

    [rtmp @ 0x28d9940] Server response validating failed&#xA;<videocapture 0x7f60895dafb0="0x7f60895dafb0">&#xA;ffmpeg version 3.4.8-0ubuntu0.2 Copyright (c) 2000-2020 the FFmpeg developers&#xA;  built with gcc 7 (Ubuntu 7.5.0-3ubuntu1~18.04)&#xA;  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&#xA;  libavutil      55. 78.100 / 55. 78.100&#xA;  libavcodec     57.107.100 / 57.107.100&#xA;  libavformat    57. 83.100 / 57. 83.100&#xA;  libavdevice    57. 10.100 / 57. 10.100&#xA;  libavfilter     6.107.100 /  6.107.100&#xA;  libavresample   3.  7.  0 /  3.  7.  0&#xA;  libswscale      4.  8.100 /  4.  8.100&#xA;  libswresample   2.  9.100 /  2.  9.100&#xA;  libpostproc    54.  7.100 / 54.  7.100&#xA;Input #0, rawvideo, from &#x27;pipe:&#x27;:&#xA;  Duration: N/A, start: 0.000000, bitrate: 12960 kb/s&#xA;    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&#xA;Stream mapping:&#xA;  Stream #0:0 -> #0:0 (rawvideo (native) -> h264 (libx264))&#xA;[libx264 @ 0x5613ba2e3d40] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2&#xA;[libx264 @ 0x5613ba2e3d40] profile High, level 2.2&#xA;[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&#xA;Output #0, flv, to &#x27;rtmp://b.rtmp.youtube.com/live2/<key>&#x27;:&#xA;  Metadata:&#xA;    encoder         : Lavf57.83.100&#xA;    Stream #0:0: Video: h264 (libx264) ([7][0][0][0] / 0x0007), yuv420p, 600x600, q=-1--1, 1.50 fps, 1k tbn, 1.50 tbc&#xA;    Metadata:&#xA;      encoder         : Lavc57.107.100 libx264&#xA;    Side data:&#xA;      cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1&#xA;frame=   55 fps=0.0 q=19.0 size=      20kB time=00:00:01.33 bit&#xA;</key></videocapture>

    &#xA;