
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 (92)
-
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" ; -
XMP PHP
13 mai 2011, parDixit Wikipedia, XMP signifie :
Extensible Metadata Platform ou XMP est un format de métadonnées basé sur XML utilisé dans les applications PDF, de photographie et de graphisme. Il a été lancé par Adobe Systems en avril 2001 en étant intégré à la version 5.0 d’Adobe Acrobat.
Étant basé sur XML, il gère un ensemble de tags dynamiques pour l’utilisation dans le cadre du Web sémantique.
XMP permet d’enregistrer sous forme d’un document XML des informations relatives à un fichier : titre, auteur, historique (...)
Sur d’autres sites (17998)
-
x86 : replace explicit REP_RETs with RETs
1er février 2023, par Lynnex86 : replace explicit REP_RETs with RETs
From x86inc :
> On AMD cpus <=K10, an ordinary ret is slow if it immediately follows either
> a branch or a branch target. So switch to a 2-byte form of ret in that case.
> We can automatically detect "follows a branch", but not a branch target.
> (SSSE3 is a sufficient condition to know that your cpu doesn't have this problem.)x86inc can automatically determine whether to use REP_RET rather than
REP in most of these cases, so impact is minimal. Additionally, a few
REP_RETs were used unnecessary, despite the return being nowhere near a
branch.The only CPUs affected were AMD K10s, made between 2007 and 2011, 16
years ago and 12 years ago, respectively.In the future, everyone involved with x86inc should consider dropping
REP_RETs altogether.- [DH] libavcodec/x86/aacpsdsp.asm
- [DH] libavcodec/x86/ac3dsp.asm
- [DH] libavcodec/x86/alacdsp.asm
- [DH] libavcodec/x86/audiodsp.asm
- [DH] libavcodec/x86/dirac_dwt.asm
- [DH] libavcodec/x86/fft.asm
- [DH] libavcodec/x86/flacdsp.asm
- [DH] libavcodec/x86/h264_chromamc.asm
- [DH] libavcodec/x86/h264_chromamc_10bit.asm
- [DH] libavcodec/x86/h264_deblock_10bit.asm
- [DH] libavcodec/x86/h264_idct.asm
- [DH] libavcodec/x86/h264_idct_10bit.asm
- [DH] libavcodec/x86/h264_intrapred.asm
- [DH] libavcodec/x86/h264_intrapred_10bit.asm
- [DH] libavcodec/x86/h264_qpel_10bit.asm
- [DH] libavcodec/x86/h264_qpel_8bit.asm
- [DH] libavcodec/x86/h264_weight.asm
- [DH] libavcodec/x86/h264_weight_10bit.asm
- [DH] libavcodec/x86/hevc_sao.asm
- [DH] libavcodec/x86/hevc_sao_10bit.asm
- [DH] libavcodec/x86/hpeldsp.asm
- [DH] libavcodec/x86/hpeldsp_vp3.asm
- [DH] libavcodec/x86/huffyuvdsp.asm
- [DH] libavcodec/x86/jpeg2000dsp.asm
- [DH] libavcodec/x86/lossless_videodsp.asm
- [DH] libavcodec/x86/lossless_videoencdsp.asm
- [DH] libavcodec/x86/me_cmp.asm
- [DH] libavcodec/x86/pngdsp.asm
- [DH] libavcodec/x86/qpel.asm
- [DH] libavcodec/x86/qpeldsp.asm
- [DH] libavcodec/x86/rv34dsp.asm
- [DH] libavcodec/x86/rv40dsp.asm
- [DH] libavcodec/x86/sbrdsp.asm
- [DH] libavcodec/x86/takdsp.asm
- [DH] libavcodec/x86/utvideodsp.asm
- [DH] libavcodec/x86/v210.asm
- [DH] libavcodec/x86/vc1dsp_mc.asm
- [DH] libavcodec/x86/videodsp.asm
- [DH] libavcodec/x86/vp8dsp.asm
- [DH] libavfilter/x86/af_volume.asm
- [DH] libavfilter/x86/avf_showcqt.asm
- [DH] libavfilter/x86/scene_sad.asm
- [DH] libavfilter/x86/vf_blend.asm
- [DH] libavfilter/x86/vf_framerate.asm
- [DH] libavfilter/x86/vf_gradfun.asm
- [DH] libavfilter/x86/vf_hqdn3d.asm
- [DH] libavfilter/x86/vf_interlace.asm
- [DH] libavfilter/x86/vf_maskedmerge.asm
- [DH] libavfilter/x86/vf_stereo3d.asm
- [DH] libavfilter/x86/vf_w3fdif.asm
- [DH] libavutil/x86/float_dsp.asm
- [DH] libavutil/x86/lls.asm
- [DH] libswresample/x86/audio_convert.asm
- [DH] libswresample/x86/rematrix.asm
- [DH] libswscale/x86/input.asm
- [DH] libswscale/x86/output.asm
- [DH] libswscale/x86/scale.asm
- [DH] libswscale/x86/scale_avx2.asm
- [DH] libswscale/x86/yuv2yuvX.asm
- [DH] libswscale/x86/yuv_2_rgb.asm
- [DH] tests/checkasm/x86/checkasm.asm
-
Handling correctly the ffmpeg & ffprobe with php
29 septembre 2014, par coccoHandling correctly the ffmpeg & ffprobe with php
maybe not relevant final goals :
- upload clip with ajax
- get ajax info from
ffprobe
using php as json executingffprobe
once only (noffmpeg
) - handle all calculations with javascript
- maybe an extra php script tool that can create gifs, extract frames(thumbs), or a video grid preview
- when rdy ajax the conversion info to the final php conversion script executing ffmpeg once only (just the final ffmpeg string.).
I’m trying to write my own ffmpeg local web video editor that converts all formats to mp4 automatically. As mp4 is the most compatible container now and the h264+aac/+ac3 is also one of the best compressions. I also want to be able to cut, crop, resize, remove streams, add streams and more. I’m stuck on some simple problems :
1. HOW TO GET THE INFO ?
I’m using ffprobe to get the file information as json with the following command :
ffprobe -v quiet -print_format json -show_format -show_streams -show_packets '.$video
this gives you a lot of information, but some relevant stuff is not always present. I need the duration (in milliseconds),the fps (as a float) and the total frames (as an integer).
i know that these values can sometimes be found inside this array :
format.duration //Total duration
streams[0].duration //Video duration
streams[1].duration //Audio duration
streams[0].avg_frame_rate //Average framerate
streams[0].r_frame_rate //Video framerate
streams[0].nb_frames //Total framesbut most of the time
nb_frames
is missing, alsoavg_frame_rate
differs fromr_frame_rate
, which is also not always available.I know that i could use multiple commands to increase the chance to get the correct values.. but srsly ???
//fps
ffmpeg -i INPUT 2>&1 | sed -n "s/.*, \(.*\) fp.*/\1/p"
//duration
ffmpeg -i INPUT 2>&1 | awk '/Duration/ {split($2,a,":");print a[1]*3600+a[2]*60+a[3]}'
//frames
ffmpeg -i INPUT -vcodec copy -f rawvideo -y /dev/null 2>&1 | tr ^M '\n' | awk '/^frame=/ {print $2}'|tail -n 1I don’t want to execute ffmpeg 3 times to get this information ; I’d prefer to just use ffprobe.
So... is there an elegant way to get the extra info that is not always present inside the ffprobe output (fps, frames, duration) ???
In the preview i want to be able to jump correctly to a specific frame (NOT TIME). if the above parameters are aviable i can do that using this command.
ffmpeg -i INPUT -vf 'select=gte(n\,FRAMENUMBER)' -vframes 1 -f image2 OUTPUT
using the above command by setting the framenumber to the last frame always returns a black frame.
if there are 50 frames (for example) the range is 1-50 — correct ? Frame 50 is black, frame 1 is ok, frame 0 returns an error...
2. WHILE READING THE LOG HOW TO SKIP ERRORS AND DETERMINE IF THE CONVERSION IS FINISHED ?
I’m able to upload one single video per time (per page) and i can read the current progress from the ffmpeg generated output log until i don’t close the page. more control/multiple conversions would be nice.
i’m reading the last line of the log with a custom tail function but as this is a log that also includes errors i don’t always get a nice line containing the desidered values. btw to check if the progress is complete i check if the last line CONTAINS the WORD
frame
....How can i find out when the conversion progress is finished ?
maybe a way to delete the log with ffmpeg command ??And skip/log the errors ??
i’m using server sent events to read the log...
here is the php code<?php
setlocale(LC_CTYPE, "en_US.UTF-8");
function tailCustom($filepath,$lines=1,$adaptive=true){
// a custom function to get the last line of a textfile.
}
function send($data){
echo "id: ".time().PHP_EOL;
echo "data: ".$data.PHP_EOL;
echo PHP_EOL;
ob_flush();
flush();
}
header('Content-Type: text/event-stream');
header('Cache-Control: no-cache');
while(true){
send(tailCustom($_GET['log'].".log"));
sleep(1);
}
?>And here the SSE js
function startSSE(fn){
sse=new EventSource("ffmpegProgress.php?log="+encodeURIComponent(fn));
sse.addEventListener('message',conversionProgress,false);
}
function conversionProgress(e){
if(e.data.substr(0,6)=='frame='){
inProgress=true;
var x=e.data.match(/frame=\s*(.*?)\s*fps=\s*(.*?)\s*q=\s*(.*?)\s*size=\s*(.*?)\s*time=\s*(.*?)\s*bitrate=\s*(.*?)\s*$/);
x.shift();x={frame:x[0]*1,fps:x[1]*1,q:x[2],size:x[3],time:x[4],bitrate:x[5]};
var elapsedTime = ((new Date().getTime()) - startTime);
var chunksPerTime = timeString2ms(x.time) / elapsedTime;
var estimatedTotalTime = duration / chunksPerTime;
var timeLeftInSeconds = Math.abs(elapsedTime-(estimatedTotalTime*1000));
var withOneDecimalPlace = Math.round(timeLeftInSeconds * 10) / 10;
conversion.innerHTML='Time Left: '+ms2TimeString(timeLeftInSeconds).split('.')[0]+'<br />'+
'Time Left2: '+(ms2TimeString(((frames-x.frame)/x.fps)*1000)+(timeString2ms(x.time)/(duration*1000)*100|0)).split('.')[0]+'<br />'+
'Estimated Total: '+ms2TimeString(estimatedTotalTime*1000).split('.')[0]+'<br />'+
'Elapsed Time: '+ms2TimeString(elapsedTime).split('.')[0];
}else{
if(inProgress){
sse.removeEventListener('message',conversionProgress,false);
sse.close();
sse=null;
conversion.textContent='Finished in '+ms2TimeString((new Date().getTime()) - startTime).split('.')[0];
//delete log/old file??
inProgress=false;
}
}
}EDIT
HERE IS A SAMPLE OUTPUT after detecting h264 codec in a m2ts with ac3 audio
As most devices can already read h264 i just need to convert the audio in aac and copy the same audio AC3 as second track. and put everything inside a mp4 container. So that i have a Android/chrome/ios & more browsers compatible file.
$opt="-map 0:0 -map 0:1 -map 0:1 -c:v copy -c:a:0 libfdk_aac -metadata:s:a:0 language=ita -b:a 128k -ar 48000 -ac 2 -c:a:1 copy -metadata:s:a:1 language=ita -movflags +faststart";
$i="in.m2ts";
$o="out.mp4";
$t="title";
$y="2014";
$progress="nameoftheLOG.log";
$cmd="ffmpeg -y -i ".escapeshellarg($i)." -metadata title=".$t." -metadata date=".$y." ".$opt." ".$o." null >/dev/null 2>".$progress." &";if you have any questions about the code or want to see more code just ask...
-
9 Ways to Customise Your Matomo Like a Pro
5 octobre 2022, par Erin