Recherche avancée

Médias (1)

Mot : - Tags -/artwork

Autres articles (99)

  • Publier sur MédiaSpip

    13 juin 2013

    Puis-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

  • Taille des images et des logos définissables

    9 février 2011, par

    Dans beaucoup d’endroits du site, logos et images sont redimensionnées pour correspondre aux emplacements définis par les thèmes. L’ensemble des ces tailles pouvant changer d’un thème à un autre peuvent être définies directement dans le thème et éviter ainsi à l’utilisateur de devoir les configurer manuellement après avoir changé l’apparence de son site.
    Ces tailles d’images sont également disponibles dans la configuration spécifique de MediaSPIP Core. La taille maximale du logo du site en pixels, on permet (...)

  • Contribute to a better visual interface

    13 avril 2011

    MediaSPIP is based on a system of themes and templates. Templates define the placement of information on the page, and can be adapted to a wide range of uses. Themes define the overall graphic appearance of the site.
    Anyone can submit a new graphic theme or template and make it available to the MediaSPIP community.

Sur d’autres sites (7220)

  • FFMPEG Optional Entries in -var_stream_map

    16 juillet 2022, par Baa

    I have a script that records an x11 display and outputs three HLS streams.

    



    ./ffmpeg -y \
    -f x11grab -framerate 60 -s 1920x1080 -i :1.0 \
    -c:v:0 libx264 -c:s:0 copy -c:a:0 aac -b:v:0 4000k -b:a:0 512k -s:v:0 1920x1080 -r:0 30 -g:0 90 -preset:0 superfast -tune:0 zerolatency -level:v:0 4 -f flv \
    -c:v:1 libx264 -c:s:1 copy -c:a:1 aac -b:v:1 2500k -b:a:1 256k -s:v:1 1280x720 -r:1 30 -g:1 90 -preset:1 superfast -tune:1 zerolatency -level:v:1 4 -f flv \
    -c:v:2 libx264 -c:s:2 copy -c:a:2 aac -b:v:2 800k -b:a:2 256k -s:v:2 960x540 -r:2 30 -g:2 90 -preset:2 superfast -tune:2 zerolatency -level:v:2 4 -f flv \
    -hls_time 6 \
    -hls_list_size 2 \
    -hls_flags delete_segments \
    -map 0:v -map 0:a? -map 0:s? -map 0:v -map 0:a? -map 0:s? -map 0:v -map 0:a? -map 0:s? \
    -var_stream_map "v:0,a:0 v:1,a:1 v:2,a:2" \
    -f hls -master_pl_name "${name}.m3u8" \
    -hls_segment_filename "/tmp/hls/${name}_%v-%d.ts" \
    -max_muxing_queue_size 1024 \
    "/tmp/hls/${name}_%v.m3u8"


    



    This line :

    



    -map 0:v -map 0:a? -map 0:s? -map 0:v -map 0:a? -map 0:s? -map 0:v -map 0:a? -map 0:s? \


    



    Has question marks after each 0:a, this is because the input does not always have audio, so it ignores the error when there is no audio present, and maps it when there is.

    



    However, the following switch :

    



    -var_stream_map "v:0,a:0 v:1,a:1 v:2,a:2" \


    



    Will only work if there is audio present, is there a way I can have -var_stream_map with entries that will ignore errors like -map does ?

    



    Here are the errors if I try to use this current script with no audio :

    



    [hls @ 0x6231800] Unable to map stream at a:0
[hls @ 0x6231800] Variant stream info update failed with status ffffffea
Could not write header for output file #0 (incorrect codec parameters ?): Invalid argument
Error initializing output stream 0:2 --


    



    If it's relevant, here is the entire output :

    



    ffmpeg version 4.0.3-static https://johnvansickle.com/ffmpeg/  Copyright (c) 2000-2018 the FFmpeg developers
  built with gcc 6.3.0 (Debian 6.3.0-18+deb9u1) 20170516
  configuration: --enable-gpl --enable-version3 --enable-static --disable-debug --disable-ffplay --disable-indev=sndio --disable-outdev=sndio --cc=gcc-6 --enable-fontconfig --enable-frei0r --enable-gnutls --enable-gray --enable-libaom --enable-libfribidi --enable-libass --enable-libvmaf --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librubberband --enable-libsoxr --enable-libspeex --enable-libvorbis --enable-libopus --enable-libtheora --enable-libvidstab --enable-libvo-amrwbenc --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzimg
  libavutil      56. 14.100 / 56. 14.100
  libavcodec     58. 18.100 / 58. 18.100
  libavformat    58. 12.100 / 58. 12.100
  libavdevice    58.  3.100 / 58.  3.100
  libavfilter     7. 16.100 /  7. 16.100
  libswscale      5.  1.100 /  5.  1.100
  libswresample   3.  1.100 /  3.  1.100
  libpostproc    55.  1.100 / 55.  1.100
[x11grab @ 0x6229300] 16 bits per pixel screen is not implemented. Update your FFmpeg version to the newest one from Git. If the problem still occurs, it means that your file has a feature which has not been implemented.
[x11grab @ 0x6229300] Stream #0: not enough frames to estimate rate; consider increasing probesize
Input #0, x11grab, from ':1.0':
  Duration: N/A, start: 1546439595.240575, bitrate: N/A
    Stream #0:0: Video: rawvideo (RGB[16] / 0x10424752), rgb565le, 1920x1080, 60 fps, 1000k tbr, 1000k tbn, 1000k tbc
Stream mapping:
  Stream #0:0 -> #0:0 (rawvideo (native) -> h264 (libx264))
  Stream #0:0 -> #0:1 (rawvideo (native) -> h264 (libx264))
  Stream #0:0 -> #0:2 (rawvideo (native) -> h264 (libx264))
Press [q] to stop, [?] for help
[libx264 @ 0x62334c0] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX
[libx264 @ 0x62334c0] profile High 4:4:4 Predictive, level 4.0, 4:4:4, 8-bit
[libx264 @ 0x62334c0] 264 - core 157 r2935 545de2f - H.264/MPEG-4 AVC codec - Copyleft 2003-2018 - http://www.videolan.org/x264.html - options: cabac=1 ref=1 deblock=1:0:0 analyse=0x1:0x1 me=dia subme=1 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=6 threads=4 lookahead_threads=4 sliced_threads=1 slices=4 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=0 weightp=1 keyint=90 keyint_min=9 scenecut=40 intra_refresh=0 rc=abr mbtree=0 bitrate=4000 ratetol=1.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
[libx264 @ 0x6234840] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX
[libx264 @ 0x6234840] profile High 4:4:4 Predictive, level 4.0, 4:4:4, 8-bit
[libx264 @ 0x6234840] 264 - core 157 r2935 545de2f - H.264/MPEG-4 AVC codec - Copyleft 2003-2018 - http://www.videolan.org/x264.html - options: cabac=1 ref=1 deblock=1:0:0 analyse=0x1:0x1 me=dia subme=1 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=6 threads=4 lookahead_threads=4 sliced_threads=1 slices=4 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=0 weightp=1 keyint=90 keyint_min=9 scenecut=40 intra_refresh=0 rc=abr mbtree=0 bitrate=2500 ratetol=1.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
[libx264 @ 0x6235740] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX
[libx264 @ 0x6235740] profile High 4:4:4 Predictive, level 4.0, 4:4:4, 8-bit
[libx264 @ 0x6235740] 264 - core 157 r2935 545de2f - H.264/MPEG-4 AVC codec - Copyleft 2003-2018 - http://www.videolan.org/x264.html - options: cabac=1 ref=1 deblock=1:0:0 analyse=0x1:0x1 me=dia subme=1 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=6 threads=4 lookahead_threads=4 sliced_threads=1 slices=4 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=0 weightp=1 keyint=90 keyint_min=9 scenecut=40 intra_refresh=0 rc=abr mbtree=0 bitrate=800 ratetol=1.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
[hls @ 0x6231800] Unable to map stream at a:0
[hls @ 0x6231800] Variant stream info update failed with status ffffffea
Could not write header for output file #0 (incorrect codec parameters ?): Invalid argument
Error initializing output stream 0:2 -- 
[libx264 @ 0x62334c0] frame I:1     Avg QP:31.45  size: 91065
[libx264 @ 0x62334c0] mb I  I16..4: 56.4%  0.0% 43.6%
[libx264 @ 0x62334c0] final ratefactor: 36.79
[libx264 @ 0x62334c0] coded y,u,v intra: 42.4% 8.7% 11.4%
[libx264 @ 0x62334c0] i16 v,h,dc,p: 53% 32% 11%  5%
[libx264 @ 0x62334c0] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 28% 20% 14%  8%  6%  6%  6%  5%  6%
[libx264 @ 0x62334c0] kb/s:21855.60
[libx264 @ 0x6234840] frame I:1     Avg QP:30.27  size: 62907
[libx264 @ 0x6234840] mb I  I16..4: 48.6%  0.0% 51.4%
[libx264 @ 0x6234840] final ratefactor: 35.22
[libx264 @ 0x6234840] coded y,u,v intra: 53.9% 14.2% 17.2%
[libx264 @ 0x6234840] i16 v,h,dc,p: 49% 36% 11%  5%
[libx264 @ 0x6234840] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 26% 19% 15%  8%  7%  6%  6%  6%  6%
[libx264 @ 0x6234840] kb/s:15097.68
[libx264 @ 0x6235740] final ratefactor: 29.77
Conversion failed!


    


  • FFPLAY read mp4 file from HTTP sever : report error : stream 1, offset 0x1c33 : partial file

    25 mai 2018, par whmiao

    I use command line like :

    ffplay http://192.168.4.56:5656/files/video/failed_111.mp4

    output :
    ffplay version N-87130-g2b9fd15 Copyright (c) 2003-2017 the FFmpeg developers
    built with gcc 7.1.0 (GCC)
    configuration : —enable-gpl —enable-version3 —enable-cuda —enable-cuvid —enable-d3d11va —enable-dxva2 —enable-libmfx —enable-nvenc —enable-avisynth —enable-bzlib —enable-fontconfig —enable-frei0r —enable-gnutls —enable-iconv —enable-libass —enable-libbluray —enable-libbs2b —enable-libcaca —enable-libfreetype —enable-libgme —enable-libgsm —enable-libilbc —enable-libmodplug —enable-libmp3lame —enable-libopencore-amrnb —enable-libopencore-amrwb —enable-libopenh264 —enable-libopenjpeg —enable-libopus —enable-librtmp —enable-libsnappy —enable-libsoxr —enable-libspeex —enable-libtheora —enable-libtwolame —enable-libvidstab —enable-libvo-amrwbenc —enable-libvorbis —enable-libvpx —enable-libwavpack —enable-libwebp —enable-libx264 —enable-libx265 —enable-libxavs —enable-libxvid —enable-libzimg —enable-lzma —enable-zlib
    libavutil 55. 74.100 / 55. 74.100
    libavcodec 57.104.100 / 57.104.100
    libavformat 57. 79.100 / 57. 79.100
    libavdevice 57. 8.100 / 57. 8.100
    libavfilter 6.101.100 / 6.101.100
    libswscale 4. 7.103 / 4. 7.103
    libswresample 2. 8.100 / 2. 8.100
    libpostproc 54. 6.100 / 54. 6.100
    [mov,mp4,m4a,3gp,3g2,mj2 @ 00000000025048e0] stream 1, offset 0x1c33 : partial file
    [mov,mp4,m4a,3gp,3g2,mj2 @ 00000000025048e0] Could not find codec parameters for stream 0 (Video : h264 (avc1 / 0x31637661), none(tv, bt709), 544x960, 1140 kb/s) : unspecified pixel format
    Consider increasing the value for the ’analyzeduration’ and ’probesize’ options

    I download the file,Open local storage,It works well,like :

    ffplay e:\failed_111.mp4

    file can download from :
    https://pan.baidu.com/s/19H9cl3YAjG-AK60nIn0KzQ

  • ffmpeg API : handle frame loss in hevc encoding

    8 janvier 2024, par Mario

    Everything works fine until the introduction of frame->pts increment due to frame loss.

    


    Below is the regular progression without frame->pts increments :

    


    


    frame->pts=8 pkt->pts=512 pkt->dts=-512 pkt->flags=1
    
frame->pts=9 pkt->pts=2560 pkt->dts=0 pkt->flags=0
    
frame->pts=10 pkt->pts=1536 pkt->dts=512 pkt->flags=0
    
frame->pts=11 pkt->pts=1024 pkt->dts=1024 pkt->flags=0
    
frame->pts=12 pkt->pts=2048 pkt->dts=1536 pkt->flags=0
    
frame->pts=13 pkt->pts=4608 pkt->dts=2048 pkt->flags=0
    
frame->pts=14 pkt->pts=3584 pkt->dts=2560 pkt->flags=0
    
frame->pts=15 pkt->pts=3072 pkt->dts=3072 pkt->flags=0
    
frame->pts=16 pkt->pts=4096 pkt->dts=3584 pkt->flags=0
    
frame->pts=17 pkt->pts=6656 pkt->dts=4096 pkt->flags=0
    
frame->pts=18 pkt->pts=5632 pkt->dts=4608 pkt->flags=0

    


    


    When I introduce the frame->pts increment it happens :

    


    


    frame->pts=15 pkt->pts=512 pkt->dts=-512 pkt->flags=1
    
frame->pts=17 pkt->pts=4608 pkt->dts=2048 pkt->flags=0
    
frame->pts=19 pkt->pts=2560 pkt->dts=1536 pkt->flags=0
    
[mp4 @ 0x7eff842222c0] Application provided invalid, non monotonically increasing dts to muxer in stream 0 : 2048 >= 1536

    


    


    So I wrote the following code as a "quick" solution (between av_packet_rescale_ts() and av_interleaved_write_frame()) :

    


       av_packet_rescale_ts(pkt, c->time_base, st->time_base);  
   ...
   if (pkt->dts<=previous_dts)  
     {  
      if (pkt->pts<=previous_pts)  
        {  
         pkt->pts=previous_dts+1+pkt->pts-pkt->dts;  
        }  
       pkt->dts=previous_dts+1;  
     }  
   previous_dts=pkt->dts;  
   previous_pts=pkt->pts;  
   ...
   ret = av_interleaved_write_frame(fmt_ctx, pkt);  


    


    Now I no longer have the error, but the values are :

    


    


    frame->pts=15 pkt->pts=512 pkt->dts=-512 pkt->flags=1
    
changed frame->pts=15 pkt->pts=512 pkt->dts=1 pkt->flags=1
    
frame->pts=17 pkt->pts=4608 pkt->dts=2048 pkt->flags=0
    
frame->pts=19 pkt->pts=2560 pkt->dts=1536 pkt->flags=0
    
changed frame->pts=19 pkt->pts=3073 pkt->dts=2049 pkt->flags=0
    
frame->pts=21 pkt->pts=1536 pkt->dts=1536 pkt->flags=0
    
changed frame->pts=21 pkt->pts=2050 pkt->dts=2050 pkt->flags=0
    
frame->pts=23 pkt->pts=4096 pkt->dts=3584 pkt->flags=0
    
frame->pts=25 pkt->pts=8704 pkt->dts=6144 pkt->flags=0
    
frame->pts=27 pkt->pts=6656 pkt->dts=5632 pkt->flags=0
    
changed frame->pts=27 pkt->pts=7169 pkt->dts=6145 pkt->flags=0
    
frame->pts=29 pkt->pts=5632 pkt->dts=5632 pkt->flags=0
    
changed frame->pts=29 pkt->pts=6146 pkt->dts=6146 pkt->flags=0
    
frame->pts=31 pkt->pts=7680 pkt->dts=7168 pkt->flags=0
    
frame->pts=33 pkt->pts=12800 pkt->dts=10240 pkt->flags=0
    
frame->pts=35 pkt->pts=10752 pkt->dts=9728 pkt->flags=0
    
changed frame->pts=35 pkt->pts=11265 pkt->dts=10241 pkt->flags=0
    
frame->pts=37 pkt->pts=9728 pkt->dts=9728 pkt->flags=0
    
changed frame->pts=37 pkt->pts=10242 pkt->dts=10242 pkt->flags=0

    


    


    What is the correct way to handle frame loss scenario ?
Is there a way to inform the encoder about frame loss ?

    


    The encoder is "hevc_qsv" and the output format is mov (.mp4).