
Recherche avancée
Médias (2)
-
GetID3 - Bloc informations de fichiers
9 avril 2013, par
Mis à jour : Mai 2013
Langue : français
Type : Image
-
GetID3 - Boutons supplémentaires
9 avril 2013, par
Mis à jour : Avril 2013
Langue : français
Type : Image
Autres articles (94)
-
Les vidéos
21 avril 2011, parComme les documents de type "audio", Mediaspip affiche dans la mesure du possible les vidéos grâce à la balise html5 .
Un des inconvénients de cette balise est qu’elle n’est pas reconnue correctement par certains navigateurs (Internet Explorer pour ne pas le nommer) et que chaque navigateur ne gère en natif que certains formats de vidéos.
Son avantage principal quant à lui est de bénéficier de la prise en charge native de vidéos dans les navigateur et donc de se passer de l’utilisation de Flash et (...) -
Publier sur MédiaSpip
13 juin 2013Puis-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 -
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" ;
Sur d’autres sites (7118)
-
Problem with ffmpeg syntax in a for loop in batch file [duplicate]
24 février 2019, par user1738673This question already has an answer here :
-
Batch character escaping
4 answers
My goal is to loop through my music folders, read the bitrate of each file, and if greater than 192k, convert it to 192k, then delete the original. I have working batch files that will do each task. The problem comes when I try to combine the lines from the working code. Depending on where I put the quotation marks, I get varying errors about filenames. So, I need someone who really knows how to read this code to solve the issue.
Here are each of the working batch files. They do everything exactly as they should.
First : Loop through files and get the bitrate
@echo off & setlocal
FOR /r %%i in (*.mp3) DO (
ffprobe -v error -show_entries stream=bit_rate -of default=noprint_wrappers=1:nokey=1 "%%~fi"
)
ECHO Completed %~n0
PAUSEHere is the output :
320000
320000
192000
320000
320000
320000
320000
320000
320000
320000
320000
320000
Completed BrTestLoop6
Press any key to continue . . .Next, the batch file for converting all MP3 files to 192k, then deleting the orginal :
@echo off & setlocal
FOR /r %%i in (*.mp3) DO (
ffmpeg -i "%%~fi" -ab 192k -map_metadata 0 -id3v2_version 3 "%%~dpni_192.mp3"
if not errorlevel 1 if exist "%%~fi" del /q "%%~fi"
)
ECHO Completed %~n0
PAUSEI get perfect conversions at 192k and all of the originals are deleted.
Now, the combined version :
@echo off & setlocal
FOR /R %%i in (*.mp3) DO (
FOR /F "TOKENS=1 DELIMS==" %%H IN ('ffprobe -v error -show_entries stream=bit_rate -of default=noprint_wrappers=1:nokey=1 "%%i"') DO (
IF %%H GTR 192000 ffmpeg -i "%%i" -ab 192k -map_metadata 0 -id3v2_version 3 "%%~dpni_192.mp3"
)
)
PAUSEI get the following output :
Argument 'noprint_wrappers' provided as input filename, but 'bit_rate' was already specified.
Argument 'noprint_wrappers' provided as input filename, but 'bit_rate' was already specified.
Argument 'noprint_wrappers' provided as input filename, but 'bit_rate' was already specified.
Argument 'noprint_wrappers' provided as input filename, but 'bit_rate' was already specified.
Argument 'noprint_wrappers' provided as input filename, but 'bit_rate' was already specified.
Argument 'noprint_wrappers' provided as input filename, but 'bit_rate' was already specified.
Argument 'noprint_wrappers' provided as input filename, but 'bit_rate' was already specified.
Argument 'noprint_wrappers' provided as input filename, but 'bit_rate' was already specified.
Argument 'noprint_wrappers' provided as input filename, but 'bit_rate' was already specified.
Argument 'noprint_wrappers' provided as input filename, but 'bit_rate' was already specified.
Argument 'noprint_wrappers' provided as input filename, but 'bit_rate' was already specified.
Argument 'noprint_wrappers' provided as input filename, but 'bit_rate' was already specified.
Press any key to continue . . . -
Batch character escaping
-
Video modifications using ffmpeg and bash command
26 février 2019, par macenikeI have a series of 8 videos which have different number of frames, some of them lose a couple of them at the beginning. I was trying to concatenate at the beginning of the videos with less frame a copy of their first frame. Unfortunately my code either crash while comparing the length of the videos or fail to accomplish the task required. Here I add the code that I’m using.
@ECHO off
SETLOCAL EnableDelayedExpansion
MKDIR COMPRESSED\
MKDIR RAW\
SET j=0
SET jj=1
SET max=1
FOR %%a IN (*.avi) DO (
SET /A j=j+1
FOR /F "delims=" %%V IN ('ffprobe.exe -v error -count_frames -select_streams v:0 -show_entries stream^=nb_read_frames -of default^=noprint_wrappers^=1:nokey^=1 ".\%%~nxa" 2^>^&1') DO SET elem[!j!]=%%V
SET elem[!j!]
)
FOR %%a IN (*.avi) DO (
IF !elem[%jj%]! GTR !elem[%max%]!(
SET max=!jj!
)
SET /A jj=jj+1
)
SET max
SET /A x=1
FOR %%a IN (*.avi) DO (
IF "!elem[!x!]!" LSS "!elem[!max!]!" (
ffmpeg -i ".\%%~nxa" -vf "select=eq(n\,0)" -q:v 3 output_image.jpg
ffmpeg -y -i ".\%%~nxa" -loop 1 -i output_image.jpg -t 0.01 -s 1936x1216 ".\%%~nxa"
SET elem[!x!]=elem[!x!]+1
SET elem[!x!]
)
SET /A x=x+1
)
FOR %%a IN (*.avi) DO (
ffprobe -v error -count_frames -select_streams v:0 -show_entries stream=nb_read_frames ".\%%~nxa"
ffmpeg -i ".\%%~nxa" -c:v libxvid -vtag xvid -qscale:v 2 -force_key_frames 1 -s 968x400 -r 100 ".\COMPRESSED\%%a"
SET mystr=%%~na
SET mystr=!mystr:~-1!
IF !mystr! == 3 (
ffmpeg -i ".\%%~nxa" -c:v mpeg4 -b:v 4M -c:a libfdk_aac -b:a 192k ".\COMPRESSED\%%~na.mp4"
)
IF !mystr! == 5 (
ffmpeg -i ".\%%~nxa" -c:v mpeg4 -b:v 4M -c:a libfdk_aac -b:a 192k ".\COMPRESSED\%%~na.mp4"
)
) -
Problem with ffmpeg syntax in a looping batch file. Windows, not Ubuntu
24 février 2019, par user1738673My goal is to loop through my music folders, read the bitrate of each file, and if greater than 192k, convert it to 192k, then delete the original. I have working batch files that will do each task. The problem comes when I try to combine the lines from the working code. Depending on where I put the quotation marks, I get varying errors about filenames. So, I need someone who really knows how to read this code to solve the issue.
Here are each of the working batch files. They do everything exactly as they should.
First : Loop through files and get the bitrate
@echo off & setlocal
FOR /r %%i in (*.mp3) DO (
ffprobe -v error -show_entries stream=bit_rate -of default=noprint_wrappers=1:nokey=1 "%%~fi"
)
ECHO Completed %~n0
PAUSEHere is the output :
320000
320000
192000
320000
320000
320000
320000
320000
320000
320000
320000
320000
Completed BrTestLoop6
Press any key to continue . . .Next, the batch file for converting all mp3 files to 192k, then deleting the orginal :
@echo off & setlocal
FOR /r %%i in (*.mp3) DO (
ffmpeg -i "%%~fi" -ab 192k -map_metadata 0 -id3v2_version 3 "%%~dpni_192.mp3"
if not errorlevel 1 if exist "%%~fi" del /q "%%~fi"
)
ECHO Completed %~n0
PAUSEI get perfect conversions at 192k and all of the originals are deleted.
Now, the combined version :
@echo off & setlocal
FOR /R %%i in (*.mp3) DO (
FOR /F "TOKENS=1 DELIMS==" %%H IN ('ffprobe -v error -show_entries stream=bit_rate -of default=noprint_wrappers=1:nokey=1 "%%i"') DO (
IF %%H GTR 192000 ffmpeg -i "%%i" -ab 192k -map_metadata 0 -id3v2_version 3 "%%~dpni_192.mp3"
)
)
PAUSEI get the following output :
Argument 'noprint_wrappers' provided as input filename, but 'bit_rate' was already specified.
Argument 'noprint_wrappers' provided as input filename, but 'bit_rate' was already specified.
Argument 'noprint_wrappers' provided as input filename, but 'bit_rate' was already specified.
Argument 'noprint_wrappers' provided as input filename, but 'bit_rate' was already specified.
Argument 'noprint_wrappers' provided as input filename, but 'bit_rate' was already specified.
Argument 'noprint_wrappers' provided as input filename, but 'bit_rate' was already specified.
Argument 'noprint_wrappers' provided as input filename, but 'bit_rate' was already specified.
Argument 'noprint_wrappers' provided as input filename, but 'bit_rate' was already specified.
Argument 'noprint_wrappers' provided as input filename, but 'bit_rate' was already specified.
Argument 'noprint_wrappers' provided as input filename, but 'bit_rate' was already specified.
Argument 'noprint_wrappers' provided as input filename, but 'bit_rate' was already specified.
Argument 'noprint_wrappers' provided as input filename, but 'bit_rate' was already specified.
Press any key to continue . . .Can anyone help, please ?