Recherche avancée

Médias (0)

Mot : - Tags -/objet éditorial

Aucun média correspondant à vos critères n’est disponible sur le site.

Autres articles (97)

  • Diogene : création de masques spécifiques de formulaires d’édition de contenus

    26 octobre 2010, par

    Diogene est un des plugins ? SPIP activé par défaut (extension) lors de l’initialisation de MediaSPIP.
    A quoi sert ce plugin
    Création de masques de formulaires
    Le plugin Diogène permet de créer des masques de formulaires spécifiques par secteur sur les trois objets spécifiques SPIP que sont : les articles ; les rubriques ; les sites
    Il permet ainsi de définir en fonction d’un secteur particulier, un masque de formulaire par objet, ajoutant ou enlevant ainsi des champs afin de rendre le formulaire (...)

  • Organiser par catégorie

    17 mai 2013, par

    Dans 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 (...)

  • Utilisation et configuration du script

    19 janvier 2011, par

    Informations spécifiques à la distribution Debian
    Si vous utilisez cette distribution, vous devrez activer les dépôts "debian-multimedia" comme expliqué ici :
    Depuis la version 0.3.1 du script, le dépôt peut être automatiquement activé à la suite d’une question.
    Récupération du script
    Le script d’installation peut être récupéré de deux manières différentes.
    Via svn en utilisant la commande pour récupérer le code source à jour :
    svn co (...)

Sur d’autres sites (5567)

  • FFMPEG, How to stream video and audio into one file with volume adjustment and video cropping [closed]

    24 décembre 2024, par Unlock iPhone

    ffmpeg -i "1.mp4" -i "Knockout.mp3" -filter_complex "[0:a]volume=0.1,atempo=1.1[a] ;[1:a]volume=1[b] ;[a][b]amix=inputs=2[audio]" -filter_complex "setpts=PTS/1.1,crop='min(iw\,ih1/1)' :'min(ih\,iw1/1)" -c:v libx264 -preset ultrafast -tune fastdecode -crf 20 -c:a aac -b:a 128k -r 30 -strict experimental -shortest "Output_00001.mp4"

    


    ffmpeg -i "1.mp4" -i "Knockout.mp3" -filter_complex "[0:a]volume=0.1,atempo=1.1[a] ;[1:a]volume=1[b] ;[a][b]amix=inputs=2[audio]" -filter_complex "setpts=PTS/1.1,crop='min(iw\,ih1/1)' :'min(ih\,iw1/1)" -c:v libx264 -preset ultrafast -tune fastdecode -crf 20 -c:a aac -b:a 128k -r 30 -strict experimental -shortest "Output_00001.mp4"
ffmpeg version 2024-12-19-git-494c961379-full_build-www.gyan.dev Copyright (c) 2000-2024 the FFmpeg developers
built with gcc 14.2.0 (Rev1, Built by MSYS2 project)
configuration : —enable-gpl —enable-version3 —enable-static —disable-w32threads —disable-autodetect —enable-fontconfig —enable-iconv —enable-gnutls —enable-libxml2 —enable-gmp —enable-bzlib —enable-lzma —enable-libsnappy —enable-zlib —enable-librist —enable-libsrt —enable-libssh —enable-libzmq —enable-avisynth —enable-libbluray —enable-libcaca —enable-sdl2 —enable-libaribb24 —enable-libaribcaption —enable-libdav1d —enable-libdavs2 —enable-libopenjpeg —enable-libquirc —enable-libuavs3d —enable-libxevd —enable-libzvbi —enable-libqrencode —enable-librav1e —enable-libsvtav1 —enable-libwebp —enable-libx264 —enable-libx265 —enable-libxavs2 —enable-libxeve —enable-libxvid —enable-libaom —enable-libjxl —enable-libvpx —enable-mediafoundation —enable-libass —enable-frei0r —enable-libfreetype —enable-libfribidi —enable-libharfbuzz —enable-liblensfun —enable-libvidstab —enable-libvmaf —enable-libzimg —enable-amf —enable-cuda-llvm —enable-cuvid —enable-dxva2 —enable-d3d11va —enable-d3d12va —enable-ffnvcodec —enable-libvpl —enable-nvdec —enable-nvenc —enable-vaapi —enable-libshaderc —enable-vulkan —enable-libplacebo —enable-opencl —enable-libcdio —enable-libgme —enable-libmodplug —enable-libopenmpt —enable-libopencore-amrwb —enable-libmp3lame —enable-libshine —enable-libtheora —enable-libtwolame —enable-libvo-amrwbenc —enable-libcodec2 —enable-libilbc —enable-libgsm —enable-liblc3 —enable-libopencore-amrnb —enable-libopus —enable-libspeex —enable-libvorbis —enable-ladspa —enable-libbs2b —enable-libflite —enable-libmysofa —enable-librubberband —enable-libsoxr —enable-chromaprint
libavutil 59. 51.100 / 59. 51.100
libavcodec 61. 27.101 / 61. 27.101
libavformat 61. 9.101 / 61. 9.101
libavdevice 61. 4.100 / 61. 4.100
libavfilter 10. 6.101 / 10. 6.101
libswscale 8. 12.100 / 8. 12.100
libswresample 5. 4.100 / 5. 4.100
libpostproc 58. 4.100 / 58. 4.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '1.mp4' :
Metadata :
minor_version : 512
major_brand : isom
compatible_brands : isomiso2avc1mp41
metadata1 : TC1nO7kRGA2g5D7EvY6mVieKMGAICBrUodQ2askGrBS9jYT4Vj3PxKPaPJbSJiYW312zpE9OA+GfQsSmsg/l0YPpVbGHSS0k1WWlIhavn4vgaEjIiMMw5ES5FyQ6NBpt9K1YOSiIg6IEc4CgvXCVgyI5VVvX9u053QTky2KsdRNRA32Ui1XkoBTAB
metadata0 : ChtzZWN1cml0eS5rbGluZy5tZXRhX2VuY3J5cHQS8AGDblTacnE/fscfVL6m9on8gh3O9gP57LnH5Gi3m5WuoRauKnAkpgZgCqmDNvDCKcv7WjIn6u+WSNAu60xW9WLkiOodDgOO2LkcD3RQmNE435FJW7rzQGPQCWEORRjI73eTSQLHggb3O876An7Ho7eHOiOljlsdEkvPDRIGlAwfn5QZKj43rdvl4q6p0lL1Wjb6qGjdvX0e6QTI1dT9qdr
encoder : Lavf58.45.100
Duration : 00:00:10.04, start : 0.000000, bitrate : 16952 kb/s
Stream #0:00x1 : Video : h264 (High) (avc1 / 0x31637661), yuv420p(progressive), 1080x1920, 16948 kb/s, 24 fps, 24 tbr, 12288 tbn (default)
Metadata :
handler_name : VideoHandler
vendor_id : [0][0][0][0]
Input #1, mp3, from 'Knockout.mp3' :
Metadata :
encoder : Lavf61.5.101
Duration : 00:02:14.54, start : 0.023021, bitrate : 131 kb/s
Stream #1:0 : Audio : mp3 (mp3float), 48000 Hz, stereo, fltp, 131 kb/s
Metadata :
encoder : Lavc61.12
[fc#0 @ 0000025538b16280] Stream specifier ':a' in filtergraph description [0:a]volume=0.1,atempo=1.1[a] ;[1:a]volume=1[b] ;[a][b]amix=inputs=2[audio] matches no streams.
Error binding filtergraph inputs/outputs : Invalid argument

    


  • 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


    


  • ffprobe newer version detect audio codec incorrectly

    16 janvier, par alancc

    I find a strange problem.

    


    I have a test video with h264 video codec and aac audio codec. It is at https://drive.google.com/file/d/1YAyz5cO0kb9r0MgahCpISR4bZ_1_n8PL/view?usp=sharing

    


    I build a ffmpeg version by myself, its version is :

    


    ffprobe version 7.0.2 Copyright (c) 2007-2024 the FFmpeg developers
  built with gcc 14.1.0 (Rev3, Built by MSYS2 project)
  configuration: --enable-shared
  libavutil      59.  8.100 / 59.  8.100
  libavcodec     61.  3.100 / 61.  3.100
  libavformat    61.  1.100 / 61.  1.100
  libavdevice    61.  1.100 / 61.  1.100
  libavfilter    10.  1.100 / 10.  1.100
  libswscale      8.  1.100 /  8.  1.100
  libswresample   5.  1.100 /  5.  1.100


    


    I then use ffprobe to get its info :

    


    ffprobe -v quiet -print_format ini -show_streams -show_packets test_h264.mp4 > test_h264.ini


    


    Then I get an ini file which shows the audio codec as MP2 :

    


    [streams.stream.0]
index=0
codec_name=mp2
codec_long_name=MP2 (MPEG audio layer 2)
profile=unknown
codec_type=audio
codec_tag_string=mp4a
codec_tag=0x6134706d
sample_fmt=fltp
sample_rate=44100
channels=2
channel_layout=stereo
bits_per_sample=0
initial_padding=0
id=0x1
r_frame_rate=0/0
avg_frame_rate=0/0
time_base=1/44100
start_pts=2788
start_time=0.063220
duration_ts=435455
duration=9.874263
bit_rate=127706
max_bit_rate=N/A
bits_per_raw_sample=N/A
nb_frames=378
nb_read_frames=N/A
nb_read_packets=378


    


    Another developer he uses his version of ffprobe :

    


    ffprobe version 2023-02-22-git-d5cc7acff1-full_build-www.gyan.dev Copyright (c) 2007-2023 the FFmpeg developers  


    


    Based on the year, my version(2024) should be newer than his(2023), but his version of ffprobe can get the audio codec properly :

    


    [streams.stream.1]
index=1
codec_name=aac
codec_long_name=AAC (Advanced Audio Coding)
profile=LC
codec_type=audio
codec_tag_string=mp4a
codec_tag=0x6134706d
sample_fmt=fltp
sample_rate=44100
channels=2
channel_layout=stereo
bits_per_sample=0
initial_padding=0
id=0x2
r_frame_rate=0/0
avg_frame_rate=0/0
time_base=1/44100
start_pts=1764
start_time=0.040000
duration_ts=436480
duration=9.897506
bit_rate=111733
max_bit_rate=N/A
bits_per_raw_sample=N/A
nb_frames=427
nb_read_frames=N/A
nb_read_packets=427
extradata_size=5


    


    Why ?

    


    I also tried a ffprobe version on ubuntu with the following version :

    


    ffprobe version 6.1.1-3ubuntu5 Copyright (c) 2007-2023 the FFmpeg developers
  built with gcc 13 (Ubuntu 13.2.0-23ubuntu3)
  configuration: --prefix=/usr --extra-version=3ubuntu5 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --disable-omx --enable-gnutls --enable-libaom --enable-libass --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libdav1d --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libglslang --enable-libgme --enable-libgsm --enable-libharfbuzz --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzimg --enable-openal --enable-opencl --enable-opengl --disable-sndio --enable-libvpl --disable-libmfx --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-ladspa --enable-libbluray --enable-libjack --enable-libpulse --enable-librabbitmq --enable-librist --enable-libsrt --enable-libssh --enable-libsvtav1 --enable-libx264 --enable-libzmq --enable-libzvbi --enable-lv2 --enable-sdl2 --enable-libplacebo --enable-librav1e --enable-pocketsphinx --enable-librsvg --enable-libjxl --enable-shared
  libavutil      58. 29.100 / 58. 29.100
  libavcodec     60. 31.102 / 60. 31.102
  libavformat    60. 16.100 / 60. 16.100
  libavdevice    60.  3.100 / 60.  3.100
  libavfilter     9. 12.100 /  9. 12.100
  libswscale      7.  5.100 /  7.  5.100
  libswresample   4. 12.100 /  4. 12.100
  libpostproc    57.  3.100 / 57.  3.100


    


    It will detect the audio as aac properly, but with different parameters, for example, bit_rate is 111733(developer) but 110399(ubuntu). But this parameter comes from the same file so should be the same.

    


    [streams.stream.1]
index=1
codec_name=aac
codec_long_name=AAC (Advanced Audio Coding)
profile=LC
codec_type=audio
codec_tag_string=mp4a
codec_tag=0x6134706d
sample_fmt=fltp
sample_rate=44100
channels=2
channel_layout=stereo
bits_per_sample=0
initial_padding=0
id=0x2
r_frame_rate=0/0
avg_frame_rate=0/0
time_base=1/44100
start_pts=0
start_time=0.000000
duration_ts=441353
duration=10.008005
bit_rate=110399
max_bit_rate=N/A
bits_per_raw_sample=N/A
nb_frames=432
nb_read_frames=N/A
nb_read_packets=432
extradata_size=5