Recherche avancée

Médias (1)

Mot : - Tags -/Rennes

Autres articles (80)

  • Ajouter notes et légendes aux images

    7 février 2011, par

    Pour pouvoir ajouter notes et légendes aux images, la première étape est d’installer le plugin "Légendes".
    Une fois le plugin activé, vous pouvez le configurer dans l’espace de configuration afin de modifier les droits de création / modification et de suppression des notes. Par défaut seuls les administrateurs du site peuvent ajouter des notes aux images.
    Modification lors de l’ajout d’un média
    Lors de l’ajout d’un média de type "image" un nouveau bouton apparait au dessus de la prévisualisation (...)

  • Mediabox : ouvrir les images dans l’espace maximal pour l’utilisateur

    8 février 2011, par

    La visualisation des images est restreinte par la largeur accordée par le design du site (dépendant du thème utilisé). Elles sont donc visibles sous un format réduit. Afin de profiter de l’ensemble de la place disponible sur l’écran de l’utilisateur, il est possible d’ajouter une fonctionnalité d’affichage de l’image dans une boite multimedia apparaissant au dessus du reste du contenu.
    Pour ce faire il est nécessaire d’installer le plugin "Mediabox".
    Configuration de la boite multimédia
    Dès (...)

  • 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 (6516)

  • h.265 encoding with ffmpeg, video not playing correctly

    5 mars 2020, par DanielRieken

    I got a h.264 video I would like to encode to h.265 using FFmpeg :

    ffmpeg.exe -i h264source.mkv -vcodec libx265 -preset slower -threads 0 -crf 24 -an h265output.mkv

    The source h.264 video is a recording of a RTMP-stream. At some point the video stops moving for 3 seconds. This is because of connection-issues of the original RTMP-stream.
    Of course the resulting h.265 video also stops moving for 3 seconds at the same point. But other than the h.264 video, the picture of the h.265 video is not frozen for only 3 seconds, it is frozen until the end of the video.

    I am using VLCplayer 3.0.8 for playback and it shows the following messages for the h.265 video :

    avcodec: Using D3D11VA (NVIDIA GeForce GT 1030, vendor 10de(NVIDIA), device 1d01, revision a1) for hardware decoding
    avcodec error: hardware acceleration picture allocation failed
    avcodec error: hardware acceleration picture allocation failed
    avcodec error: hardware acceleration picture allocation failed
    avcodec error: avcodec_send_packet critical error

    When I disable hardware acceleration in VLCplayer the playback of the h.265 video works fine.

    Next I encoded the h.264 to h.265 using HandBrake 1.3.0 and the resulting h.265 video also works fine in VLCplayer with hardware acceleration enabled.

    So my question is :
    Why is the playback of the h.264 and the h.265-handbrake-videos working fine in VLCplayer but not the h.265-ffmpeg video ?

    When I encode the h.264 to huffyuv and then to h.265 using FFmpeg, the resulting h.265-video also works fine :

    ffmpeg.exe -i h264source.mkv -vcodec huffyuv -an huffyuv.mkv
    ffmpeg.exe -i huffyuv.mkv -vcodec libx265 -preset slower -threads 0 -crf 24 -an h265output.mkv

    I am using the windows build by Zeranoe, ffmpeg-4.2.2-win64-static.

    Any advices ?

    edit :

    C:\ffmpeg>ffmpeg.exe -loglevel verbose -i h264source.mkv -vcodec libx265 -preset slower -threads 0 -crf 24 -an h265output.mkv
    ffmpeg version 4.2.2 Copyright (c) 2000-2019 the FFmpeg developers
     built with gcc 9.2.1 (GCC) 20200122
     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-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-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx --enable-amf --enable-ffnvcodec --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth --enable-libopenmpt
     libavutil      56. 31.100 / 56. 31.100
     libavcodec     58. 54.100 / 58. 54.100
     libavformat    58. 29.100 / 58. 29.100
     libavdevice    58.  8.100 / 58.  8.100
     libavfilter     7. 57.100 /  7. 57.100
     libswscale      5.  5.100 /  5.  5.100
     libswresample   3.  5.100 /  3.  5.100
     libpostproc    55.  5.100 / 55.  5.100
    [h264 @ 000001e8dc09d6c0] Reinit context to 864x480, pix_fmt: yuv420p
    Input #0, matroska,webm, from 'h264source.mkv':
     Metadata:
       COMPATIBLE_BRANDS: isomiso2avc1mp41
       MAJOR_BRAND     : isom
       MINOR_VERSION   : 512
       ENCODER         : Lavf58.29.100
     Duration: 00:01:55.67, start: 0.000000, bitrate: 958 kb/s
       Stream #0:0: Video: h264 (Constrained Baseline), 1 reference frame, yuv420p(progressive, left), 852x480 (864x480) [SAR 1:1 DAR 71:40], 30 fps, 30 tbr, 1k tbn, 60 tbc (default)
       Metadata:
         ENCODER         : Lavc58.54.100 libx264
         DURATION        : 00:01:55.666000000
    Stream mapping:
     Stream #0:0 -> #0:0 (h264 (native) -> hevc (libx265))
    Press [q] to stop, [?] for help
    [h264 @ 000001e8dc77b080] Reinit context to 864x480, pix_fmt: yuv420p
    [graph 0 input from stream 0:0 @ 000001e8dd38ee40] w:852 h:480 pixfmt:yuv420p tb:1/1000 fr:30/1 sar:1/1 sws_param:flags=2
    x265 [info]: HEVC encoder version 3.2ßacc5d16999e2
    x265 [info]: build info [Windows][GCC 9.2.1][64 bit] 8bit+10bit
    x265 [info]: using cpu capabilities: MMX2 SSE2Fast LZCNT SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
    x265 [info]: Main profile, Level-3 (Main tier)
    x265 [info]: Thread pool created using 16 threads
    x265 [info]: Slices                              : 1
    x265 [info]: frame threads / pool features       : 4 / wpp(8 rows)
    x265 [info]: Coding QT: max CU size, min CU size : 64 / 8
    x265 [info]: Residual QT: max TU size, max depth : 32 / 3 inter / 3 intra
    x265 [info]: ME / range / subpel / merge         : star / 57 / 4 / 4
    x265 [info]: Keyframe min / max / scenecut / bias  : 25 / 250 / 40 / 5.00
    x265 [info]: Lookahead / bframes / badapt        : 40 / 8 / 2
    x265 [info]: b-pyramid / weightp / weightb       : 1 / 1 / 1
    x265 [info]: References / ref-limit  cu / depth  : 5 / off / on
    x265 [info]: AQ: mode / str / qg-size / cu-tree  : 2 / 1.0 / 32 / 1
    x265 [info]: Rate Control / qCompress            : CRF-24.0 / 0.60
    x265 [info]: tools: rect amp limit-modes rd=6 psy-rd=2.00 rdoq=2 psy-rdoq=1.00
    x265 [info]: tools: rskip limit-tu=4 signhide tmvp b-intra
    x265 [info]: tools: strong-intra-smoothing deblock sao
    Output #0, matroska, to 'h265output.mkv':
     Metadata:
       COMPATIBLE_BRANDS: isomiso2avc1mp41
       MAJOR_BRAND     : isom
       MINOR_VERSION   : 512
       encoder         : Lavf58.29.100
       Stream #0:0: Video: hevc (libx265), 1 reference frame, yuv420p(left), 852x480 [SAR 1:1 DAR 71:40], q=2-31, 30 fps, 1k tbn, 30 tbc (default)
       Metadata:
         DURATION        : 00:01:55.666000000
         encoder         : Lavc58.54.100 libx265
       Side data:
         cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
    No more output streams to write to, finishing
    frame= 3178 fps= 14 q=-0.0 Lsize=    5105kB time=00:01:55.56 bitrate= 361.9kbits/s speed=0.506x
    video:5080kB audio:0kB subtitle:0kB other streams:0kB global headers:2kB muxing overhead: 0.492293%
    Input file #0 (h264source.mkv):
     Input stream #0:0 (video): 3178 packets read (13837009 bytes); 3178 frames decoded;
     Total: 3178 packets (13837009 bytes) demuxed
    Output file #0 (h265output.mkv):
     Output stream #0:0 (video): 3178 frames encoded; 3178 packets muxed (5201780 bytes);
     Total: 3178 packets (5201780 bytes) muxed
    [AVIOContext @ 000001e8dc77af40] Statistics: 8 seeks, 40 writeouts
    x265 [info]: frame I:     13, Avg QP:18.10  kb/s: 6779.10
    x265 [info]: frame P:   1754, Avg QP:22.52  kb/s: 619.00
    x265 [info]: frame B:   1411, Avg QP:31.19  kb/s: 50.69
    x265 [info]: Weighted P-Frames: Y:0.0% UV:0.0%
    x265 [info]: Weighted B-Frames: Y:0.0% UV:0.0%
    x265 [info]: consecutive B-frames: 67.4% 8.3% 8.6% 10.9% 2.7% 2.0% 0.2% 0.0% 0.0%

    encoded 3178 frames in 228.50s (13.91 fps), 391.87 kb/s, Avg QP:26.35
    [AVIOContext @ 000001e8dc0936c0] Statistics: 13860805 bytes read, 0 seeks
  • How can I capture real time command line output of x265.exe with Python ?

    29 février 2020, par LeeRoermond

    I would like to write a GUI for x265.exe which presents a better (more humanized) real time progress .

    Here’s the code I used to capture subprocess’s output :

    import subprocess

    cmd = r'ping www.baidu.com -n 4'
    popen = subprocess.Popen(cmd, stdout = subprocess.PIPE ,stderr=subprocess.STDOUT ,shell=True)
    while True:
       next_line = popen.stdout.readline()
       if next_line == b'' and popen.poll() != None:
           break
       else:
           print(next_line.decode('ascii').replace('\r\n','\n') , end='')

    It performs perfectly with ’ping’.

    However ,when I swiched to ’x265’ command ,thing goes to wired.

    For example, If I replaced string variable 'cmd' into "x265 --y4m --crf 21 --output output.hevc input.y4m" in the preceding code.Theoretically , it should gives out the following output in lines arranged in order of time :

    y4m  [info]: 1920x1080 fps 24000/1001 i420p10 frames 0 - 100 of 101
    x265 [info]: Using preset ultrafast & tune none
    raw  [info]: output file: C:\temp\output.hevc
    x265 [info]: Main 10 profile, Level-4 (Main tier)
    x265 [info]: Thread pool created using 16 threads
    x265 [info]: Slices                              : 1
    x265 [info]: frame threads / pool features       : 4 / wpp(34 rows)
    x265 [info]: Coding QT: max CU size, min CU size : 32 / 16
    x265 [info]: Residual QT: max TU size, max depth : 32 / 1 inter / 1 intra
    x265 [info]: ME / range / subpel / merge         : dia / 57 / 0 / 2
    x265 [info]: Keyframe min / max / scenecut / bias: 23 / 250 / 0 / 5.00
    x265 [info]: Lookahead / bframes / badapt        : 5 / 3 / 0
    x265 [info]: AQ: mode / str / qg-size / cu-tree  : 1 / 0.0 / 32 / 1
    x265 [info]: Rate Control / qCompress            : CRF-21.0 / 0.60
    x265 [info]: tools: strong-intra-smoothing lslices=6 deblock

    [1.0%] 1/101 frames, 6.289 fps, 7217.8 kb/s
    [25.7%] 26/101 frames, 59.23 fps, 299.23 kb/s
    [45.5%] 46/101 frames, 66.76 fps, 322.81 kb/s  
    [69.3%] 70/101 frames, 73.30 fps, 224.53 kb/s
    [93.1%] 94/101 frames, 77.05 fps, 173.67 kb/s  

    x265 [info]: frame I:      1, Avg QP:23.45  kb/s: 7098.44
    x265 [info]: frame P:     25, Avg QP:25.71  kb/s: 311.24  
    x265 [info]: frame B:     75, Avg QP:28.33  kb/s: 23.89  
    x265 [info]: consecutive B-frames: 3.8% 0.0% 0.0% 96.2%

    encoded 101 frames in 1.22s (82.58 fps), 165.06 kb/s, Avg QP:27.64

    But the truth is, those output block in the middle part which indicates the real time progress will not be captured every specific it updated . popen.stdout.readline() command will be blocked until progress goes to 100% and then output altogether. Obviously that’s not what I want.

    ( ↓ I mean by this part)

    [1.0%] 1/101 frames, 6.289 fps, 7217.8 kb/s
    [25.7%] 26/101 frames, 59.23 fps, 299.23 kb/s
    [45.5%] 46/101 frames, 66.76 fps, 322.81 kb/s  
    [69.3%] 70/101 frames, 73.30 fps, 224.53 kb/s
    [93.1%] 94/101 frames, 77.05 fps, 173.67 kb/s  

    Could anyone help me fiture out what’s going on and how to fix it to achieve my goal ?

    Thanks a lot.

  • "Pixel format 'yuvj420p' is not supported" when converting image to video using CUDA hardware acceleration

    11 février 2020, par laurent

    I’m trying to convert an image to a video using CUDA hardware acceleration but I can’t get it to work.

    The basic command I have is this one :

    ffmpeg -y -hwaccel cuvid -i tests/MediaSamples/portrait_0.jpg -t 10 out.mp4

    And I’m getting this error :

    [AVHWFramesContext @ 0x32d3f00] Pixel format 'yuvj420p' is not supported
    [mjpeg @ 0x2d18480] Error initializing a CUDA frame pool
    cuvid hwaccel requested for input stream #0:0, but cannot be initialized.
    Error while decoding stream #0:0: Invalid argument

    I’ve tried setting the pixel format like so, but that didn’t help :

    ffmpeg -y -hwaccel cuvid -pix_fmt yuv420p -i tests/MediaSamples/portrait_0.jpg -t 10 out.mp4

    I’ve also tried many other flags but can’t get anything to work. Any idea what the issue might be ?

    For information this is the full log :

    ffmpeg version N-96615-gc35382a Copyright (c) 2000-2020 the FFmpeg developers
     built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.12) 20160609
     configuration: --enable-nonfree --disable-shared --enable-gpl --enable-openssl --enable-libx264 --enable-cuda-sdk --enable-nvenc --enable-cuda --enable-cuvid --enable-libnpp --extra-cflags='-I/usr/local/ssl/include -I/usr/local/cuda/include -I/usr/local/include -L/usr/local/ssl/lib -Wl,-rpath=/usr/local/ssl/lib' --extra-ldflags=-L/usr/local/cuda/lib64
     libavutil      56. 38.100 / 56. 38.100
     libavcodec     58. 67.101 / 58. 67.101
     libavformat    58. 37.100 / 58. 37.100
     libavdevice    58.  9.103 / 58.  9.103
     libavfilter     7. 73.100 /  7. 73.100
     libswscale      5.  6.100 /  5.  6.100
     libswresample   3.  6.100 /  3.  6.100
     libpostproc    55.  6.100 / 55.  6.100
    Input #0, image2, from 'tests/MediaSamples/portrait_0.jpg':
     Duration: 00:00:00.04, start: 0.000000, bitrate: 40237 kb/s
       Stream #0:0: Video: mjpeg (Progressive), yuvj420p(pc, bt470bg/unknown/unknown), 1600x900 [SAR 72:72 DAR 16:9], 25 tbr, 25 tbn, 25 tbc
    Stream mapping:
     Stream #0:0 -> #0:0 (mjpeg (native) -> h264 (libx264))
    Press [q] to stop, [?] for help
    [AVHWFramesContext @ 0x32d3f00] Pixel format 'yuvj420p' is not supported
    [mjpeg @ 0x2d18480] Error initializing a CUDA frame pool
    cuvid hwaccel requested for input stream #0:0, but cannot be initialized.
    Error while decoding stream #0:0: Invalid argument
    [libx264 @ 0x2d1e840] using SAR=1/1
    [libx264 @ 0x2d1e840] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 AVX2 LZCNT BMI2
    [libx264 @ 0x2d1e840] profile High, level 4.0
    [libx264 @ 0x2d1e840] 264 - core 148 r2643 5c65704 - H.264/MPEG-4 AVC codec - Copyleft 2003-2015 - 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=24 lookahead_threads=4 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 'out.mp4':
     Metadata:
       encoder         : Lavf58.37.100
       Stream #0:0: Video: h264 (libx264) (avc1 / 0x31637661), yuvj420p(pc), 1600x900 [SAR 72:72 DAR 16:9], q=-1--1, 25 fps, 12800 tbn, 25 tbc
       Metadata:
         encoder         : Lavc58.67.101 libx264
       Side data:
         cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: N/A
    frame=    0 fps=0.0 q=0.0 Lsize=       0kB time=00:00:00.00 bitrate=N/A speed=   0x
    video:0kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
    Conversion failed!