
Recherche avancée
Médias (1)
-
Bug de détection d’ogg
22 mars 2013, par
Mis à jour : Avril 2013
Langue : français
Type : Video
Autres articles (64)
-
Supporting all media types
13 avril 2011, parUnlike most software and media-sharing platforms, MediaSPIP aims to manage as many different media types as possible. The following are just a few examples from an ever-expanding list of supported formats : images : png, gif, jpg, bmp and more audio : MP3, Ogg, Wav and more video : AVI, MP4, OGV, mpg, mov, wmv and more text, code and other data : OpenOffice, Microsoft Office (Word, PowerPoint, Excel), web (html, CSS), LaTeX, Google Earth and (...)
-
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" ; -
L’utiliser, en parler, le critiquer
10 avril 2011La première attitude à adopter est d’en parler, soit directement avec les personnes impliquées dans son développement, soit autour de vous pour convaincre de nouvelles personnes à l’utiliser.
Plus la communauté sera nombreuse et plus les évolutions seront rapides ...
Une liste de discussion est disponible pour tout échange entre utilisateurs.
Sur d’autres sites (5876)
-
ffmpeg output parse in batch script
3 juillet 2016, par vlad2005I am totally unfamiliar with scripts in Windows, but are forced to use such a script. I would like someone to help me with the following problem. I want to process the output from ffmpeg command to save information about access an webcam to be used later.
More precisely command is following :ffmpeg -stats -hide_banner -list_devices true -f dshow -i dummy
and output is like this :
[dshow @ 02cec400] DirectShow video devices (some may be both video and audio devices)
[dshow @ 02cec400] "Microsoft LifeCam Studio"
[dshow @ 02cec400] Alternative name "@device_pnp_\\?\usb#vid_045e&pid_0772&mi_00#6&2a15e69b&0&0000#{65e8773d-8f56-11d0-a3b9-00a0c9223196}\global"
[dshow @ 02cec400] DirectShow audio devices
[dshow @ 02cec400] "Desktop Microphone (3- Studio -"
[dshow @ 02cec400] Alternative name "@device_cm_{33D9A762-90C8-11D0-BD43-00A0C911CE86}\Desktop Microphone (3- Studio -"
[dshow @ 02cec400] "Line In (High Definition Audio "
[dshow @ 02cec400] Alternative name "@device_cm_{33D9A762-90C8-11D0-BD43-00A0C911CE86}\Line In (High Definition Audio "
[dshow @ 02cec400] "Microphone (High Definition Aud"
[dshow @ 02cec400] Alternative name "@device_cm_{33D9A762-90C8-11D0-BD43-00A0C911CE86}\Microphone (High Definition Aud"Typically, the first two occurence for ”Alternative name” from DirectShow correspond to video and audio, so for simplicity I want these two information saved in two variables.
In this example is :@device_pnp_\\?\usb#vid_045e&pid_0772&mi_00#6&2a15e69b&0&0000#{65e8773d-8f56-11d0-a3b9-00a0c9223196}\global
and
@device_cm_{33D9A762-90C8-11D0-BD43-00A0C911CE86}\Desktop Microphone (3- Studio -
Can someone more experienced to help me with this task ?
Thanks in advance ! -
ffmpeg output parse in batch script
5 juin 2022, par vlad2005I am totally unfamiliar with scripts in Windows, but are forced to use such a script. I would like someone to help me with the following problem. I want to process the output from ffmpeg command to save information about access an webcam to be used later.
More precisely command is following :



ffmpeg -stats -hide_banner -list_devices true -f dshow -i dummy




and output is like this :



[dshow @ 02cec400] DirectShow video devices (some may be both video and audio devices)
[dshow @ 02cec400] "Microsoft LifeCam Studio"
[dshow @ 02cec400] Alternative name "@device_pnp_\\?\usb#vid_045e&pid_0772&mi_00#6&2a15e69b&0&0000#{65e8773d-8f56-11d0-a3b9-00a0c9223196}\global"
[dshow @ 02cec400] DirectShow audio devices
[dshow @ 02cec400] "Desktop Microphone (3- Studio -"
[dshow @ 02cec400] Alternative name "@device_cm_{33D9A762-90C8-11D0-BD43-00A0C911CE86}\Desktop Microphone (3- Studio -"
[dshow @ 02cec400] "Line In (High Definition Audio "
[dshow @ 02cec400] Alternative name "@device_cm_{33D9A762-90C8-11D0-BD43-00A0C911CE86}\Line In (High Definition Audio "
[dshow @ 02cec400] "Microphone (High Definition Aud"
[dshow @ 02cec400] Alternative name "@device_cm_{33D9A762-90C8-11D0-BD43-00A0C911CE86}\Microphone (High Definition Aud"




Typically, the first two occurence for ”Alternative name” from DirectShow correspond to video and audio, so for simplicity I want these two information saved in two variables.
In this example is :



@device_pnp_\\?\usb#vid_045e&pid_0772&mi_00#6&2a15e69b&0&0000#{65e8773d-8f56-11d0-a3b9-00a0c9223196}\global




and



@device_cm_{33D9A762-90C8-11D0-BD43-00A0C911CE86}\Desktop Microphone (3- Studio -




Can someone more experienced to help me with this task ?
Thanks in advance !


-
Recursively run ffprobe to get codec types
5 juin 2022, par Timothy MassingI modified @rojo code from here a little to look for h264/AC3 and to recursively run thru all the children folders. My only issue is that it always says the videos has h264 and AC3, but when I run the ffprobe command manually it states different. Am I missing something ?



@if (@CodeSection == @Batch) @then
@echo off & setlocal

for /R %%f in (*.mkv, *.mp4) do (
 echo Testing %%f

 set ffprobe=C:\ffmpeg-4.0.2-win64-static\bin\ffprobe -v quiet -show_entries "stream=codec_name,height" -of json "%%f"

 for /f "delims=" %%I in ('%ffprobe% ^| cscript /nologo /e:JScript "%~f0"') do set "%%~I"

 set "pre=-hide_banner -fflags +genpts+discardcorrupt+fastseek -analyzeduration 100M"
 set "pre=%pre% -probesize 50M -hwaccel dxva2 -y -threads 3 -v error -stats"
 set "global="
 set "video=-c:v h264_nvenc"
 set "audio=-c:a ac3"

 if defined h264 if defined ac3 (
 echo %%~nf already in x264 + AC3 format.
 )

 if not defined h264 if not defined ac3 (

 if not defined ac3 (
 echo Already has AC3 audio. Re-encoding video only.
 set "audio=-c:a copy"
 ) 

 if not defined h264 (
 echo Already has h264 video. Re-encoding audio only.
 set "video=-c:v copy"
 )

 echo output "%%~df%%~pf%%~nf.new.mkv"
 echo C:\ffmpeg-4.0.2-win64-static\bin\ffmpeg %pre% -i "%%f" %global% %video% %audio% "%%~df%%~pf%%~nf.new.mkv"

 pause

 echo del "%%f" /f /q
 echo ren "%%~df%%~pf%%~nf.new.mkv" "%%f"
 )

)
@end // end Batch / begin JScript

var stdin = WSH.CreateObject('Scripting.FileSystemObject').GetStandardStream(0),
 htmlfile = WSH.CreateObject('htmlfile'),
 JSON;

htmlfile.write('');
htmlfile.close(JSON = htmlfile.parentWindow.JSON);

var obj = JSON.parse(stdin.ReadAll());

for (var i = obj.streams.length; i--;) {
 if (/h264/i.test(obj.streams[i].codec_name)) WSH.Echo('h264=true');
 if (/ac3/i.test(obj.streams[i].codec_name)) WSH.Echo('ac3=true');
}




I had this working of a second then it stopped for not reason.



@if (@CodeSection == @Batch) @then
@echo off & setlocal & goto run

:run
for /R %%f in (*.mkv, *.mp4) do (
 echo Testing %%f

 set "file=%%f"
 set "drive=%%~df"
 set "dir=%%~pf"
 set "name=%%~nf"
 set "ext=%%~xf"

 for /f "delims=" %%I in ('C:\ffmpeg-4.0.2-win64-static\bin\ffprobe.exe -v quiet -show_entries "stream=codec_name,height" -of json "%%f" ^| cscript /nologo /e:JScript "%~f0"') do (set "%%~I")

 set "pre=-hide_banner -fflags +genpts+discardcorrupt+fastseek -analyzeduration 100M"
 set "pre=%pre% -probesize 50M -hwaccel dxva2 -y -threads 3 -v error -stats"
 set "global="
 set "video=-c:v h264_nvenc"
 set "audio=-c:a ac3"

 if defined ac3 if defined h264 call :both
 if not defined ac3 call :either
 if not defined h264 call :either
)

:both
echo %name% already in x264 + AC3 format.
goto :EOF

:either
if not defined h264 (
 echo Already has AC3 audio. Re-encoding video only.
 set "audio=-c:a copy"
) 

if not defined ac3 (
 echo Already has h264 video. Re-encoding audio only.
 set "video=-c:v copy"
)

echo "C:\ffmpeg-4.0.2-win64-static\bin\ffmpeg %pre% -i "%file%" %global% %video% %audio% "%drive%%dir%%name%.new.mkv""
echo del "%file%" /f /q
echo ren "%drive%%dir%%name%.new.mkv" "%name%%ext%"
goto :EOF

@end // end Batch / begin JScript

var stdin = WSH.CreateObject('Scripting.FileSystemObject').GetStandardStream(0),
 htmlfile = WSH.CreateObject('htmlfile'),
 JSON;

htmlfile.write('');
htmlfile.close(JSON = htmlfile.parentWindow.JSON);

var obj = JSON.parse(stdin.ReadAll());

for (var i = obj.streams.length; i--;) {
 if (/h264/i.test(obj.streams[i].codec_name)) WSH.Echo('h264=true');
 if (/ac3/i.test(obj.streams[i].codec_name)) WSH.Echo('ac3=true');
}




ffprobe Output for h264



{
 "programs": [

 ],
 "streams": [
 {
 "codec_name": "h264",
 "height": 528
 },
 {
 "codec_name": "aac"
 }
 ]
}




output for ac3



{
 "programs": [

 ],
 "streams": [
 {
 "codec_name": "h265",
 "height": 528
 },
 {
 "codec_name": "ac3"
 }
 ]
}




output for both ac3/h264



{
 "programs": [

 ],
 "streams": [
 {
 "codec_name": "h264",
 "height": 528
 },
 {
 "codec_name": "ac3"
 }
 ]
}