
Recherche avancée
Médias (91)
-
Chuck D with Fine Arts Militia - No Meaning No
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Paul Westerberg - Looking Up in Heaven
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Le Tigre - Fake French
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Thievery Corporation - DC 3000
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Dan the Automator - Relaxation Spa Treatment
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Gilberto Gil - Oslodum
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
Autres articles (80)
-
Amélioration de la version de base
13 septembre 2013Jolie sélection multiple
Le plugin Chosen permet d’améliorer l’ergonomie des champs de sélection multiple. Voir les deux images suivantes pour comparer.
Il suffit pour cela d’activer le plugin Chosen (Configuration générale du site > Gestion des plugins), puis de configurer le plugin (Les squelettes > Chosen) en activant l’utilisation de Chosen dans le site public et en spécifiant les éléments de formulaires à améliorer, par exemple select[multiple] pour les listes à sélection multiple (...) -
Emballe médias : à quoi cela sert ?
4 février 2011, parCe plugin vise à gérer des sites de mise en ligne de documents de tous types.
Il crée des "médias", à savoir : un "média" est un article au sens SPIP créé automatiquement lors du téléversement d’un document qu’il soit audio, vidéo, image ou textuel ; un seul document ne peut être lié à un article dit "média" ; -
Menus personnalisés
14 novembre 2010, parMediaSPIP utilise le plugin Menus pour gérer plusieurs menus configurables pour la navigation.
Cela permet de laisser aux administrateurs de canaux la possibilité de configurer finement ces menus.
Menus créés à l’initialisation du site
Par défaut trois menus sont créés automatiquement à l’initialisation du site : Le menu principal ; Identifiant : barrenav ; Ce menu s’insère en général en haut de la page après le bloc d’entête, son identifiant le rend compatible avec les squelettes basés sur Zpip ; (...)
Sur d’autres sites (7035)
-
Increased File Size When Converting MP4 to WebM using FFmpeg
23 décembre 2024, par kimgijeongI 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 :


- 

-b:v 994k




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.


- 

svtav1-params "mbr=994k"




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.

- 

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




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 :


- 

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


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


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










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, How to stream video and audio into one file with volume adjustment and video cropping [closed]
24 décembre 2024, par Unlock iPhoneffmpeg -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


-
FFMPEG convert videos using Automator [closed]
8 janvier, par FilipProI'm trying to use Apple Automator (v2.10, Sonoma 14.7.1, Apple M1) to select a folder and convert all MP4 files to WMV files using FFMPEG. The user is supposed to export files from Final Cut Pro in MP4, put them in a folder of their choice and then start the automation by having to select the folder where MP4 files are saved.


FFMPEG is installed via Homebrew and the installation folder was found via "which ffmpeg" ( /opt/homebrew/bin/ffmpeg ).


This is the worklow I currently have : Full Automator Workflow


- 

-
Run AppleScript


- 

- 

on run {input, parameters}

 tell application "System Events"
 activate
 return text returned of (display dialog "Enter administrator password" default answer "" with hidden answer)
 end tell

 return input
end run







- 

-
Run Shell script (/bin/zsh, no input required)


- 

- 

sudo -S id -u







- 

-
Ask for Finder elements


- 

- Select folder, starting from "Downloads" folder, no multiple selection




-
Run Shell script (/bin/zsh, input as arguments)


- 

- 

cd "$1"

for f in *.mp4; do
 osascript -e "display notification \"Converting file: $f \" with title \"Video Conversion\""
 sudo /opt/homebrew/bin/ffmpeg -i "$f" -c:v wmv2 -b:v 3000k -c:a wmav2 -b:c 192k "${f%.*}.wmv"
 if [ $? -eq 0 ]; then
 osascript -e "display notification \"Converted file: $f \" with title \"Video Conversion\""
 else
 osascript -e "display notification \"Error converting file: $f \" with title \"Video Conversion\""
 fi
done







- 











The actual script (step 4) works perfectly if handtyped in Terminal but FFMPEG return "Error opening output files : Invalid argument" when run within the Automator workflow.


This is the output of step 4 (I added *REDACTED FOR PRIVACY* instead of actual filenames) :


ffmpeg version 7.1 Copyright (c) 2000-2024 the FFmpeg developers
built with Apple clang version 16.0.0 (clang-1600.0.26.4)
configuration: --prefix=/opt/homebrew/Cellar/ffmpeg/7.1_3 --enable-shared --enable-pthreads --enable-version3 --cc=clang --host-cflags= --host-ldflags='-Wl,-ld_classic' --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libaribb24 --enable-libbluray --enable-libdav1d --enable-libharfbuzz --enable-libjxl --enable-libmp3lame --enable-libopus --enable-librav1e --enable-librist --enable-librubberband --enable-libsnappy --enable-libsrt --enable-libssh --enable-libsvtav1 --enable-libtesseract --enable-libtheora --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libxvid --enable-lzma --enable-libfontconfig --enable-libfreetype --enable-frei0r --enable-libass --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libspeex --enable-libsoxr --enable-libzmq --enable-libzimg --disable-libjack --disable-indev=jack --enable-videotoolbox --enable-audiotoolbox --enable-neon
libavutil 59. 39.100 / 59. 39.100
libavcodec 61. 19.100 / 61. 19.100
libavformat 61. 7.100 / 61. 7.100
libavdevice 61. 3.100 / 61. 3.100
libavfilter 10. 4.100 / 10. 4.100
libswscale 8. 3.100 / 8. 3.100
libswresample 5. 3.100 / 5. 3.100
libpostproc 58. 3.100 / 58. 3.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '*REDACTED FOR PRIVACY*':
Metadata:
major_brand : mp42
minor_version : 1
compatible_brands: isommp41mp42
creation_time : 2024-12-30T17:06:35.000000Z
Duration: 00:00:15.00, start: 0.000000, bitrate: 5122 kb/s
Stream #0:0[0x1](und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p(tv, bt709, progressive), 1920x1080, 5119 kb/s, SAR 1:1 DAR 16:9, 24 fps, 24 tbr, 24k tbn (default)
Metadata:
creation_time : 2024-12-30T17:06:35.000000Z
handler_name : Core Media Video
vendor_id : [0][0][0][0]
Trailing garbage at the end of a stream specifier: c
Error opening output file *REDACTED FOR PRIVACY*.
Error opening output files: Invalid argument”



-