
Recherche avancée
Médias (91)
-
Les Miserables
9 décembre 2019, par
Mis à jour : Décembre 2019
Langue : français
Type : Textuel
-
VideoHandle
8 novembre 2019, par
Mis à jour : Novembre 2019
Langue : français
Type : Video
-
Somos millones 1
21 juillet 2014, par
Mis à jour : Juin 2015
Langue : français
Type : Video
-
Un test - mauritanie
3 avril 2014, par
Mis à jour : Avril 2014
Langue : français
Type : Textuel
-
Pourquoi Obama lit il mes mails ?
4 février 2014, par
Mis à jour : Février 2014
Langue : français
-
IMG 0222
6 octobre 2013, par
Mis à jour : Octobre 2013
Langue : français
Type : Image
Autres articles (50)
-
Support audio et vidéo HTML5
10 avril 2011MediaSPIP utilise les balises HTML5 video et audio pour la lecture de documents multimedia en profitant des dernières innovations du W3C supportées par les navigateurs modernes.
Pour les navigateurs plus anciens, le lecteur flash Flowplayer est utilisé.
Le lecteur HTML5 utilisé a été spécifiquement créé pour MediaSPIP : il est complètement modifiable graphiquement pour correspondre à un thème choisi.
Ces technologies permettent de distribuer vidéo et son à la fois sur des ordinateurs conventionnels (...) -
HTML5 audio and video support
13 avril 2011, parMediaSPIP uses HTML5 video and audio tags to play multimedia files, taking advantage of the latest W3C innovations supported by modern browsers.
The MediaSPIP player used has been created specifically for MediaSPIP and can be easily adapted to fit in with a specific theme.
For older browsers the Flowplayer flash fallback is used.
MediaSPIP allows for media playback on major mobile platforms with the above (...) -
De l’upload à la vidéo finale [version standalone]
31 janvier 2010, parLe chemin d’un document audio ou vidéo dans SPIPMotion est divisé en trois étapes distinctes.
Upload et récupération d’informations de la vidéo source
Dans un premier temps, il est nécessaire de créer un article SPIP et de lui joindre le document vidéo "source".
Au moment où ce document est joint à l’article, deux actions supplémentaires au comportement normal sont exécutées : La récupération des informations techniques des flux audio et video du fichier ; La génération d’une vignette : extraction d’une (...)
Sur d’autres sites (4560)
-
Using GDIgrab in FFmpeg with dshow Audio produces black screen
16 mars 2016, par Spreadyshere is my command :
ffmpeg -f gdigrab -framerate 25 -offset_x 10 -offset_y 10 -show_region 1 -draw_mouse 1 -video_size 1280x720 -i desktop -f dshow -i audio="Microphone (2- ATR USB microphone)" -r 25 -threads 4 -c:v libx264 -pix_fmt yuv422p -preset superfast -tune fastdecode -x264opts keyint=25:min-keyint=1 -crf 4 -c:a aac -profile:a aac_low -async 25 "C:\Users\david\Desktop\%output%.mp4"
The gdigrab video works great when it is on its own (no audio). The audio works fine when it is on its own (no video). When I join the two commands to capture both together, as soon as I move a window within my capture area, the area goes black.
In Windows 7, I used to get around this by stopping the desktop composition service prior to capture, (SC stop uxsms), but this is now not possible in Win10.
I thought it may be something graphics card related.
My main monitor is on an Nvidia card, with my second running from the onboard Intel. This is setup for Quicksync H264 playback and encoding with my NLE.I know that I could use a dshow screen capture driver such as UScreen but am trying to avoid that as I need the capture area to be specified each time from a simple batch.
Any help appreciated to solve this black area problem- its driving me crazy !
David -
PHP - Read and write the same file hangs
2 février 2016, par AdracatI’m trying to use FFMPEG to make some works with video on the server, and something I need to do is to get the progress of the process.
I searched a little and I found this solution which tells to write the log into a file and then reading and parsing it.
The problem
What is driving me crazy is that I tell FFMPEG - with
exec
- (process A) to write the log into a file, but when I try to read it - withfile_get_contents()
- (process B) it does not show the contents until process A is finished (or interrupted the PHP script).So, when process A finishes or it says "PHP script timeout", then I can read the file as times as I want, refreshing the page (process B) and showing the contents at the time.
What I’ve tried
I’ve tried to use
fopen()
to create the file withw
,w+
anda
parameters, using - and without using -fclose()
. I’ve tried to use alsoflock()
just in case it gets faster to read to process B if it knows it’s already locked and does not have to wait, but then FFMPEG is not able to write into the file.I’ve searched for multithreading too, but I think there must be an easier and simpler way.
I’ve used also CURL and HTTP context, as this link suggests, but no luck.
I’ve tried, too, to use PHP-FFMPEG but it’s not supporting the last FFMPEG version, so I cannot use it.
When I said before "(or interrupted the PHP script)" is because I tried to wait and, when PHP got a timeout, process B worked alright and the file was still updating.
The code
Process A (fileA.php)
exec('ffmpeg -y -i input_file.mp4 output_file.avi 2> C:\Full\Path\To\File\log.txt 1>&2');
Process B (fileB.php)
$content = file_get_contents($file);
if($content){
//get duration of source
preg_match("/Duration: (.*?), start:/", $content, $matches);
$rawDuration = $matches[1];
//rawDuration is in 00:00:00.00 format. This converts it to seconds.
$ar = array_reverse(explode(":", $rawDuration));
$duration = floatval($ar[0]);
if (!empty($ar[1])) $duration += intval($ar[1]) * 60;
if (!empty($ar[2])) $duration += intval($ar[2]) * 60 * 60;
//get the time in the file that is already encoded
preg_match_all("/time=(.*?) bitrate/", $content, $matches);
$rawTime = array_pop($matches);
//this is needed if there is more than one match
if (is_array($rawTime)){$rawTime = array_pop($rawTime);}
//rawTime is in 00:00:00.00 format. This converts it to seconds.
$ar = array_reverse(explode(":", $rawTime));
$time = floatval($ar[0]);
if (!empty($ar[1])) $time += intval($ar[1]) * 60;
if (!empty($ar[2])) $time += intval($ar[2]) * 60 * 60;
//calculate the progress
$progress = round(($time/$duration) * 100);
echo "Duration: " . $duration . "<br />";
echo "Current Time: " . $time . "<br />";
echo "Progress: " . $progress . "%";
}The process
I just open
fileA.php
on a Chrome tab and, after a few seconds, I openfileB.php
on another Chrome tab (and it stays as loading).What I need
I need to be able to load the file and show the information I want to show while the file is being written (by
exec
andFFMPEG
or other PHP scripts), so I can update the progress percentage with some AJAX calls.Extra information
At this point, I’m using PHP 5.4 on a IIS 7.5 with Windows 7 Professional.
Thank you everyone for your time, help and patience !
Best regards.
-
convert CCTV .264 video to one of common formats (mp4, avi, etc.) via ffmpeg or other cmdline tool
21 mars 2016, par yy502I’ve got a CCTV cam that produces .264 format video clips. These clips plays fine just like any other normal video recording that you would expect on portable devices, but only with it’s manufacture provided App. When played directly using VLC or mplayer, only gray blocks are visible in the picture. I doubt it is propitiatory encoding, but some kind of hardware encoded raw h264 format that I’m just lacking the right combination of arguments/options for playback or convert using ffmpeg.
ffmpeg -i
does report the basic metadata correctly, but also crazy amount of frame errors.... but I know the video can be played fine.The Android App has the following files in its lib folder :
I understand these files are not all for video decoding but also some other feature in the app. I’m just hoping someone could maybe determine what extra lib or option is needed to convert it with ffmpeg. e.g.
libh264ToRGB565.so
could be useful maybe...?This is a screenshot of what to expect from the sample video.
And here is the sample video clip (1.3M, 1280x720p) : http://146.185.145.75/vid.264
(MD5 = 0ae871484b3832984f46e6820b21c673)Any suggestion is appreciated.