
Recherche avancée
Médias (2)
-
SPIP - plugins - embed code - Exemple
2 septembre 2013, par
Mis à jour : Septembre 2013
Langue : français
Type : Image
-
Publier une image simplement
13 avril 2011, par ,
Mis à jour : Février 2012
Langue : français
Type : Video
Autres articles (59)
-
Mise à jour de la version 0.1 vers 0.2
24 juin 2013, parExplications des différents changements notables lors du passage de la version 0.1 de MediaSPIP à la version 0.3. Quelles sont les nouveautés
Au niveau des dépendances logicielles Utilisation des dernières versions de FFMpeg (>= v1.2.1) ; Installation des dépendances pour Smush ; Installation de MediaInfo et FFprobe pour la récupération des métadonnées ; On n’utilise plus ffmpeg2theora ; On n’installe plus flvtool2 au profit de flvtool++ ; On n’installe plus ffmpeg-php qui n’est plus maintenu au (...) -
Configurer la prise en compte des langues
15 novembre 2010, parAccéder à la configuration et ajouter des langues prises en compte
Afin de configurer la prise en compte de nouvelles langues, il est nécessaire de se rendre dans la partie "Administrer" du site.
De là, dans le menu de navigation, vous pouvez accéder à une partie "Gestion des langues" permettant d’activer la prise en compte de nouvelles langues.
Chaque nouvelle langue ajoutée reste désactivable tant qu’aucun objet n’est créé dans cette langue. Dans ce cas, elle devient grisée dans la configuration et (...) -
Websites made with MediaSPIP
2 mai 2011, parThis page lists some websites based on MediaSPIP.
Sur d’autres sites (8462)
-
Cutting the stream on local date time when scheduled
19 juin 2017, par FearhunterI am using a ffmpeg slice commando in my C# code. For example : I scheduled a stream from 12pm till 3 pm. In my if statement I use a condition to compare the local datetime with the time of now.
DateTime systemDate = DateTime.Now;
DateTime compareDate = DateTime.Today;
private Process SliceStream(string url)
{
if (systemDate < compareDate)
{
return Process.Start(new ProcessStartInfo
{
FileName = "ffmpeg.exe",
Arguments = $"-i \"{url}\"-acodec aac -strict -2 -vcodec libx264 -hls_wrap 100 -f hls -hls_time 20 C:/var/1.m3u8 ",
UseShellExecute = false,
RedirectStandardOutput = true
});
}
else
{
Thread.Sleep(100);
return null;
}
}The problem is it doesn’t work when my time on my computer is for example 12pm and he is not cutting the stream.
What am I doing wrong ?
-
How to successfully parse the output of FFMpeg in NodeJS
28 juillet 2022, par DahkneeSo I have seen a lot of topics on FFMPeg and it's a great tool I learnt about today, but I have spent the day perfecting the command and now am a little stuck with the NodeJS part.



In essence the command does the following : take input from a Mac OSX webcam, and then stream it to a web-socket. Now I looked at a lot of the NodeJS libraries but I couldn't find one that did what I need ; or did not understand how to. Here is an example of the command that I am using :



ffmpeg -f avfoundation -framerate 30 -video_size 640x480 -pix_fmt uyvy422 -i "0:1" -f mpegts -codec:v mpeg1video -s 640x480 -b:v 1000k -bf 0 http://localhost:8081/stream




This does everything I need for the streaming side of things, but I wish to call it via NodeJS, and then be able to monitor the log, and parse the data that comes back for example :



frame= 4852 fps= 30 q=6.8 size= 30506kB time=00:02:41.74 bitrate=1545.1kbits/s speed= 1x \r




and use it to get a JSON array back for me to output to a webpage.



Now all I am doing is working on ways of actually parsing the data, and I have looked at lots of other answers for things like this, but I can't seem to split/replace/regex it. I can't get anything but a long string from it.



Here is the code I am using (NodeJS) :



var ffmpeg = require('child_process').spawn('/usr/local/Cellar/ffmpeg/3.3.1/bin/ffmpeg', ['-f', 'avfoundation', '-framerate', '30', '-video_size', '640x480', '-pix_fmt', 'uyvy422', '-i', '0:1', '-f', 'mpegts', '-codec:v', 'mpeg1video', '-s', '640x480', '-b:v', '1000k', '-bf', '0', 'http://localhost:8081/test']);

ffmpeg.on('error', function (err) {
 console.log(err);
});

ffmpeg.on('close', function (code) {
 console.log('ffmpeg exited with code ' + code);
});

ffmpeg.stderr.on('data', function (data) {
 // console.log('stderr: ' + data);
 var tData = data.toString('utf8');
 // var a = tData.split('[\\s\\xA0]+');
 var a = tData.split('\n');
 console.log(a);
});

ffmpeg.stdout.on('data', function (data) {
 var frame = new Buffer(data).toString('base64');
 // console.log(frame);
});




I have tried splitting with new lines, carridge return, spaces, tabs, but I just can't seem to get a basic array of bits, that I can work with.



Another thing to note, is you will notice the log comes back via stderr, I have seen this online and apparently it does it for a lot of people ? So I am not sure what the deal is with that ? but the code is is the sdterr callback.



Any help is very appreciated as I am truly confused on what I am doing wrong.



Thanks.


-
FFmpeg conversion to Photo-JPEG is blocky [duplicate]
26 mai 2017, par Richard210363This question already has an answer here :
I am converting .mp4 files to .mov with the Photo-JPEG codec to use in After Effects to reduce render times.
I have looked up the FFmpeg commands to do this and come up with :
ffmpeg -i tower-bridge.mp4 -an -pix_fmt yuvj420p -vcodec mjpeg -f mov -y tower-bridge.mov
This works but when I look at the output video it is quite blocky ; like a mosaic.
During the conversion I get this message :
[swscaler @ 0000000008c97fe0] deprecated pixel format used, make sure you did set range correctly
Research on-line suggests I can ignore this message.
What can I do to improve the output quality ?
MediaInfo report on Input file :
Complete name : F :\london-tower-bridge.mp4
Format : MPEG-4
Format profile : Base Media
Codec ID : isom (isom/avc1/mp42)
File size : 18.7 MiB
Duration : 13 s 625 ms
Overall bit rate : 11.5 Mb/sID : 1
Format : AVC
Format/Info : Advanced Video Codec
Format profile : Baseline@L4
Format settings, CABAC : No
Format settings, ReFrames : 3 frames
Codec ID : avc1
Codec ID/Info : Advanced Video Coding
Duration : 13 s 625 ms
Bit rate : 11.5 Mb/s
Maximum bit rate : 26.8 Mb/s
Width : 1 920 pixels
Height : 1 080 pixels
Display aspect ratio : 16:9
Frame rate mode : Constant
Frame rate : 24.000 FPS
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive
Bits/(Pixel*Frame) : 0.231
Stream size : 18.7 MiB (100%)
Writing library : Zencoder Video Encoding SystemMediaInfo report on Output file :
Complete name : F :\london-tower-bridge.mov
Format : MPEG-4
Format profile : QuickTime
Codec ID : qt 0000.02 (qt )
File size : 16.1 MiB
Duration : 13 s 625 ms
Overall bit rate mode : Variable
Overall bit rate : 9 912 kb/s
Writing application : Lavf57.72.101ID : 1
Format : JPEG
Codec ID : jpeg
Duration : 13 s 625 ms
Bit rate mode : Variable
Bit rate : 9 910 kb/s
Width : 1 920 pixels
Height : 1 080 pixels
Display aspect ratio : 16:9
Frame rate mode : Constant
Frame rate : 24.000 FPS
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive
Compression mode : Lossy
Bits/(Pixel*Frame) : 0.199
Stream size : 16.1 MiB (100%)
Language : English