
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 (35)
-
Websites made with MediaSPIP
2 mai 2011, parThis page lists some websites based on MediaSPIP.
-
Creating farms of unique websites
13 avril 2011, parMediaSPIP platforms can be installed as a farm, with a single "core" hosted on a dedicated server and used by multiple websites.
This allows (among other things) : implementation costs to be shared between several different projects / individuals rapid deployment of multiple unique sites creation of groups of like-minded sites, making it possible to browse media in a more controlled and selective environment than the major "open" (...) -
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
Sur d’autres sites (4759)
-
FFmpeg/FFplay directshow and blackmagic
21 janvier 2016, par max246I got a BlackMagic intensity pro 4k capturing card, which is working fine with the express tool, I can see the live feed and record, but after I tried different stuff from what I found online to make ffplay/ffmpeg working, I ended up to have just a black screen.
I have checked if all the versions of my ffmpeg files were eanable-decklinnk, I have compiled the latest one with the latest version of the api, but still I get a black screen instead of the actually feed.
ffmpeg -list_devices true -f dshow -i dummy
ffmpeg version N-77245-g7209c94 Copyright (c) 2000-2015 the FFmpeg developers
built with gcc 5.2.0 (Rev4, Built by MSYS2 project)
configuration: --enable-avisynth --enable-libbluray --enable-libcaca --enable -libass --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame
--enable-libschroedinger --enable-libsoxr --enable-libtwolame --enable-libspeex --enable-libtheora --enable-libvorbis --enable-libopus --enable-libtesseract --
enable-libdcadec --enable-libbs2b --enable-libmfx --enable-libfreetype --enable-fontconfig --enable-libfribidi --enable-opengl --enable-libvpx --enable-libkvaza
ar --enable-libwebp --enable-decklink --enable-libgme --disable-w32threads --enable-opencl --enable-libzimg --enable-openssl --disable-debug
libavutil 55. 10.100 / 55. 10.100
libavcodec 57. 17.100 / 57. 17.100
libavformat 57. 20.100 / 57. 20.100
libavdevice 57. 0.100 / 57. 0.100
libavfilter 6. 21.100 / 6. 21.100
libswscale 4. 0.100 / 4. 0.100
libswresample 2. 0.101 / 2. 0.101
[dshow @ 0000000ba36b6480] DirectShow video devices (some may be both video and audio devices)
[dshow @ 0000000ba36b6480] "Blackmagic WDM Capture"
[dshow @ 0000000ba36b6480] Alternative name "@device_pnp_\\?\decklink#avstream#5&2550cef9&0&0000#{65e8773d-8f56-11d0-a3b9-00a0c9223196}\decklinkcapture1"
[dshow @ 0000000ba36b6480] "Decklink Video Capture"
[dshow @ 0000000ba36b6480] Alternative name "@device_sw_{860BB310-5D01-11D0-BD3B-00A0C911CE86}\{44A8B5C7-13B6-4211-BD40-35B629D9E6DF}"
[dshow @ 0000000ba36b6480] DirectShow audio devices
[dshow @ 0000000ba36b6480] "Wej?øcie liniowe (Blackmagic Audio)"
[dshow @ 0000000ba36b6480] Alternative name "@device_cm_{33D9A762-90C8-11D0-BD43-00A0C911CE86}\wave_{977E2DB6-B17C-4343-9018-652924C20A8C}"
[dshow @ 0000000ba36b6480] "Decklink Audio Capture"
[dshow @ 0000000ba36b6480] Alternative name "@device_sw_{33D9A762-90C8-11D0-BD43-00A0C911CE86}\{AAA22F7E-5AA0-49D9-8C8D-B52B1AA92EB7}"
dummy: Immediate exit requestedThe result above tells me that ffmpeg can see the card and I am able to open a communication, I have checked one post where it says you need to specific which input type is showing, otherwise it will never work, and I did that, but still no luck.
By running the command line above, I can only see a black screen but not actually errors.
I am running Windows 8.1 64bit.
ffplay -pixel_format uyvy422 -framerate 25 -f dshow -i video="Decklink Video Capture" -format x264
ffplay version N-77245-g7209c94 Copyright (c) 2003-2015 the FFmpeg developers
built with gcc 5.2.0 (Rev4, Built by MSYS2 project)
configuration: --enable-avisynth --enable-libbluray --enable-libcaca --enable-libass --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame
--enable-libschroedinger --enable-libsoxr --enable-libtwolame --enable-libspeex --enable-libtheora --enable-libvorbis --enable-libopus --enable-libtesseract --
enable-libdcadec --enable-libbs2b --enable-libmfx --enable-libfreetype --enable-fontconfig --enable-libfribidi --enable-opengl --enable-libvpx --enable-libkvaza
ar --enable-libwebp --enable-decklink --enable-libgme --disable-w32threads --enable-opencl --enable-libzimg --enable-openssl --disable-debug
libavutil 55. 10.100 / 55. 10.100
libavcodec 57. 17.100 / 57. 17.100
libavformat 57. 20.100 / 57. 20.100
libavdevice 57. 0.100 / 57. 0.100
libavfilter 6. 21.100 / 6. 21.100
libswscale 4. 0.100 / 4. 0.100
libswresample 2. 0.101 / 2. 0.101
Input #0, dshow, from 'video=Decklink Video Capture': 0B f=0/0
Duration: N/A, start: 0.138773, bitrate: N/A
Stream #0:0: Video: rawvideo (UYVY / 0x59565955), uyvy422, 720x576, 25 tbr,
10000k tbn, 25 tbc
1.51 M-V: -0.000 fd= 0 aq= 0KB vq= 0KB sq= 0B f=0/0 -
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.
-
Anomalie #1951 (Fermé) : modele urls standards
7 juillet 2011, par cedric -