Recherche avancée

Médias (1)

Mot : - Tags -/Christian Nold

Autres articles (35)

  • Personnaliser en ajoutant son logo, sa bannière ou son image de fond

    5 septembre 2013, par

    Certains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;

  • 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

  • Le plugin : Podcasts.

    14 juillet 2010, par

    Le problème du podcasting est à nouveau un problème révélateur de la normalisation des transports de données sur Internet.
    Deux formats intéressants existent : Celui développé par Apple, très axé sur l’utilisation d’iTunes dont la SPEC est ici ; Le format "Media RSS Module" qui est plus "libre" notamment soutenu par Yahoo et le logiciel Miro ;
    Types de fichiers supportés dans les flux
    Le format d’Apple n’autorise que les formats suivants dans ses flux : .mp3 audio/mpeg .m4a audio/x-m4a .mp4 (...)

Sur d’autres sites (3129)

  • Improved "can play" detection (canPlayURL() + canPlayMIME()) for HTML5 + flash cases. Increased "getting impatient, waiting for flash" message to 1 second.

    26 juin 2011

    m script/soundmanager2-jsmin.js m script/soundmanager2-nodebug-jsmin.js m script/soundmanager2-nodebug.js m script/soundmanager2.js Improved "can play" detection (canPlayURL() + canPlayMIME()) for HTML5 + flash cases. Increased "getting impatient, waiting for flash" message to 1 (...)

  • Increased File Size When Converting MP4 to WebM using FFmpeg

    23 décembre 2024, par kimgijeong

    I am using FFmpeg to convert MP4 to WebM with the following command :

    


    ffmpeg -y -hide_banner -nostats \
-f mov,mp4,m4a,3gp,3g2,mj2 -i "http://127.0.0.1:80/lotteon-low-bitrate.mp4" \
-threads auto -f webm -acodec libopus -b:a 96.059k -vcodec libsvtav1 -preset 11 -pix_fmt yuv420p \
-vf "scale='min(-1, iw)':'min(-1,ih)':force_original_aspect_ratio=decrease,crop=trunc(iw/2)*2:trunc(ih/2)*2" \
"/usr/local/m2/m2temp/xcdrtmp/2052_1.webm"


    


    However, the output webm file size is larger than the source MP4 file. For example :

    


      

    • Source MP4 : 4.6 MB (bit rate : 994,053 bps)

      


    • 


    • Output WebM : 16 MB (bit rate : 3,902,037 bps)

      


    • 


    


    I know SVT-AV1 encoder defaults to CRF mode. Due to not specifying the bitrate explicitly, the SVT-AV1 encoder automatically sets the bit_rate. It appears that the encoder is setting it to a much higher value (3,323,104 bps), causing the increase in file size compared to the source MP4 (994,053 bps). Here are the methods i tried to reduce the WebM file size compared to the source MP4 :

    


      

    1. -b:v 994k
    2. 


    


    I tried to match the target bitrate with the source MP4's bitrate to reduce the output size, but encountered the following error :

    


    Svt[error]: Instance 1: Force key frames is not supported for VBR mode Last message r
epeated 2 times [libsvtav1 @ 0x239dd100] Error setting encoder parameters: bad parameter (0x80001005)


    


    Looking at the official documentation, this mode change (from CRF to VBR when setting a target bitrate) appears to be expected behavior. However, the error is puzzling since I haven't set any force keyframe parameters in the FFmpeg command.

    


      

    1. svtav1-params "mbr=994k"
    2. 


    


    The second method i tried was using the svtav1-params "mbr=994k" option to set the maxrate while maintaining CRF mode This method showed some improvement, but the output file size was still larger than the source MP4.

    


      

    • Output WebM : 5MB (bit rate : 1,209,877 bps)
    • 


    


    The more critical reason why we can't adopt the second method (using svtav1-params "mbr=994k") is that even for the same MP4 source file, the output file size varies slightly with each encoding.

    


      

    1. -b:v 994k -svtav1-params “rc=2:pred-struct=1”(CBR, low delay)
    2. 


    


    The final method I tried was setting the target bitrate while using CBR (Constant Bit Rate) and low-delay mode The default value for pred-structure is 2(random access), but I had to use low-delay mode due to the following error :

    


    Svt[error]: CBR Rate control is currently not supported for SVT_AV1_PRED_RANDOM_ACCESS, use VBR mode


    


    This way was the only approach among those i tried that successfully reduced the output size.

    


      

    • Output WebM : 4.3MB (bit rate : 1,032,373 bps)
    • 


    


    In summary, I have three questions about this MP4 to WebM conversion issue :

    


      

    1. When setting the target bitrate with -b:v 994k, the switch to VBR mode is expected behavior. However, why does the force keyframe error occur when we haven't explicitly set any force keyframe parameters ?

      


    2. 


    3. Why does the output WebM file size fluctuate when setting maxrate either through -maxrate or svtav1-params "mbr=994k", even when using the same MP4 source file ?

      


    4. 


    5. Besides using -b:v 994k -svtav1-params "rc=2:pred-struct=1" (CBR with low delay), are there any other methods that can guarantee a WebM output size smaller than the source MP4 when converting from MP4 to WebM ?

      


    6. 


    


    I am using a recent version of the SVT-AV1 codec :

    


    Svt[info]: SVT [version]:       SVT-AV1 Encoder Lib 58146ca
Svt[info]: SVT [build]  :       GCC 11.5.0 20240719 (Red Hat 11.5.0-2)   64 bit
Svt[info]: LIB Build date: Oct 28 2024 07:40:59
ffmpeg video svt-av1


    


  • FFMPEG:merging Image and Audio duration getting increased [migrated]

    21 juin 2016, par Saikat Dey

    I am trying to create a video using a still image(.png) with audio(.wav) file using FFMPEG with video duration equal to audio duration but even keeping ’-shortest’ & ’-loop 1’ as flag, pegstill video duration is always 2 seconds more than audio duration.

    This is causing problem because, after the video creation i am merging several videos together to create a final video. Now what is happening is that in that 2 seconds extra time, the next video’s audio comes which is causing video-audio unsync. Even if I delay the audio stream, there is a blank sound while transition from one video to another.

    So i wanted to ask why there is extra 2 seconds and how can i remove it.
    My ffmpeg command :

    ffmpeg -loop 1 -i imgPath -i audioPath -c:v libx264 -c:a aac -strict experimental -pix_fmt yuv420p -vf resolution -b:a 192k -shortest videoPath

    Console Output :

    ffmpeg version N-78598-g98a0053 Copyright (c) 2000-2016 the FFmpeg developers
    built with gcc 5.3.0 (GCC)
    configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libdcadec --enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --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-decklink --enable-zlib
    libavutil      55. 18.100 / 55. 18.100
    libavcodec     57. 24.103 / 57. 24.103
    libavformat    57. 25.101 / 57. 25.101
    libavdevice    57.  0.101 / 57.  0.101
    libavfilter     6. 34.100 /  6. 34.100
    libswscale      4.  0.100 /  4.  0.100
    libswresample   2.  0.101 /  2.  0.101
    libpostproc    54.  0.100 / 54.  0.100
    Input #0, png_pipe, from 'image.png':
    Duration: N/A, bitrate: N/A
     Stream #0:0: Video: png, rgb24(pc), 1058x794 [SAR 3779:3781 DAR 621141:466396], 25 fps, 25 tbr, 25 tbn, 25 tbc
    Guessed Channel Layout for  Input Stream #1.0 : stereo
    Input #1, wav, from 'audio.wav':
    Duration: 00:00:15.25, bitrate: 1411 kb/s
    Stream #1:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 44100 Hz, 2 channels, s16, 1411 kb/s
    [libx264 @ 0068f820] using SAR=2587/2590
    [libx264 @ 0068f820] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX
    [libx264 @ 0068f820] profile High, level 3.1
    [libx264 @ 0068f820] 264 - core 148 r2665 a01e339 - H.264/MPEG-4 AVC codec - Copyleft 2003-2016 - 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=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 'video.mp4':
    Metadata:
    encoder         : Lavf57.25.101
    Stream #0:0: Video: h264 (libx264) ([33][0][0][0] / 0x0021), yuv420p, 800x600 [SAR 5997273:6004228 DAR 621141:466396], q=-1--1, 25 fps, 12800 tbn, 25 tbc
    Metadata:
     encoder         : Lavc57.24.103 libx264
    Side data:
     cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
    Stream #0:1: Audio: aac (LC) ([64][0][0][0] / 0x0040), 44100 Hz, stereo, fltp, 192 kb/s
    Metadata:
     encoder         : Lavc57.24.103 aac
    Stream mapping:
    Stream #0:0 -> #0:0 (png (native) -> h264 (libx264))
    Stream #1:0 -> #0:1 (pcm_s16le (native) -> aac (native))
    Press [q] to stop, [?] for help
    frame=   47 fps=0.0 q=0.0 size=       0kB time=00:00:00.00 bitrate=N/A speed=   0x    
    frame=   66 fps= 66 q=28.0 size=      16kB time=00:00:00.56 bitrate= 234.8kbits/s speed=0.559x    
    frame=   91 fps= 60 q=28.0 size=      40kB time=00:00:01.56 bitrate= 211.2kbits/s speed=1.04x    
    frame=  123 fps= 61 q=28.0 size=      72kB time=00:00:02.84 bitrate= 206.6kbits/s speed=1.41x    
    frame=  160 fps= 64 q=28.0 size=     108kB time=00:00:04.32 bitrate= 203.9kbits/s speed=1.72x    
    frame=  197 fps= 65 q=28.0 size=     143kB time=00:00:05.80 bitrate= 201.8kbits/s speed=1.92x    
    frame=  231 fps= 66 q=28.0 size=     176kB time=00:00:07.16 bitrate= 201.3kbits/s speed=2.03x    
    frame=  270 fps= 67 q=28.0 size=     214kB time=00:00:08.72 bitrate= 200.6kbits/s speed=2.17x    
    frame=  307 fps= 68 q=28.0 size=     252kB time=00:00:10.20 bitrate= 202.6kbits/s speed=2.25x    
    frame=  343 fps= 68 q=28.0 size=     286kB time=00:00:11.64 bitrate= 201.6kbits/s speed=2.31x    
    frame=  380 fps= 69 q=28.0 size=     323kB time=00:00:13.12 bitrate= 201.6kbits/s speed=2.37x    
    frame=  416 fps= 69 q=28.0 size=     357kB time=00:00:14.56 bitrate= 200.9kbits/s speed=2.41x    
    frame=  433 fps= 68 q=-1.0 Lsize=     391kB time=00:00:17.24 bitrate= 185.6kbits/s speed= 2.7x    
    video:18kB audio:358kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 3.837568%
    [libx264 @ 0068f820] frame I:2     Avg QP: 7.83  size:  2710
    [libx264 @ 0068f820] frame P:109   Avg QP: 9.51  size:    35
    [libx264 @ 0068f820] frame B:322   Avg QP:12.67  size:    27
    [libx264 @ 0068f820] consecutive B-frames:  0.7%  0.5%  0.0% 98.8%
    [libx264 @ 0068f820] mb I  I16..4: 97.9%  0.1%  2.1%
    [libx264 @ 0068f820] mb P  I16..4:  0.0%  0.0%  0.0%  P16..4:  0.0%  0.0%  0.0%  0.0%  0.0%    skip:100.0%
    [libx264 @ 0068f820] mb B  I16..4:  0.0%  0.0%  0.0%  B16..8:  0.1%  0.0%  0.0%  direct: 0.0%  skip:99.9%  L0:65.9% L1:34.1% BI: 0.0%
    [libx264 @ 0068f820] 8x8 transform intra:0.1% inter:28.6%
    [libx264 @ 0068f820] coded y,uvDC,uvAC intra: 1.6% 2.1% 2.1% inter: 0.0% 0.0% 0.0%
    [libx264 @ 0068f820] i16 v,h,dc,p: 97%  0%  3%  0%
    [libx264 @ 0068f820] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 50%  0% 50%  0%  0%  0%  0%  0%  0%
    [libx264 @ 0068f820] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 37% 18% 19%  3%  6%  4%  6%  2%  5%
    [libx264 @ 0068f820] i8c dc,h,v,p: 98%  1%  1%  0%
    [libx264 @ 0068f820] Weighted P-Frames: Y:0.0% UV:0.0%
    [libx264 @ 0068f820] ref P L0: 70.5% 11.4%  9.1%  9.1%
    [libx264 @ 0068f820] ref B L0: 50.2% 49.8%
    [libx264 @ 0068f820] ref B L1: 99.2%  0.8%
    [libx264 @ 0068f820] kb/s:8.23
    [aac @ 0067e4c0] Qavg: 439.702

    You can see here that my audio.wav Duration : 00:00:15.25, but output video.mp4 is 00:00:17.24.