
Recherche avancée
Médias (1)
-
The Great Big Beautiful Tomorrow
28 octobre 2011, par
Mis à jour : Octobre 2011
Langue : English
Type : Texte
Autres articles (51)
-
Demande de création d’un canal
12 mars 2010, parEn fonction de la configuration de la plateforme, l’utilisateur peu avoir à sa disposition deux méthodes différentes de demande de création de canal. La première est au moment de son inscription, la seconde, après son inscription en remplissant un formulaire de demande.
Les deux manières demandent les mêmes choses fonctionnent à peu près de la même manière, le futur utilisateur doit remplir une série de champ de formulaire permettant tout d’abord aux administrateurs d’avoir des informations quant à (...) -
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 -
Taille des images et des logos définissables
9 février 2011, parDans beaucoup d’endroits du site, logos et images sont redimensionnées pour correspondre aux emplacements définis par les thèmes. L’ensemble des ces tailles pouvant changer d’un thème à un autre peuvent être définies directement dans le thème et éviter ainsi à l’utilisateur de devoir les configurer manuellement après avoir changé l’apparence de son site.
Ces tailles d’images sont également disponibles dans la configuration spécifique de MediaSPIP Core. La taille maximale du logo du site en pixels, on permet (...)
Sur d’autres sites (8418)
-
ffmpeg : Pipe input error
1er septembre 2012, par Amit KhannaI'm facing an issue while working with ffmpeg when input and output are pipes. Though Output pipe is working fine, piping the input is causing some error.
I tried to convert mp4 video to flv using the following command and it worked fine :
$ ffmpeg -i video-2012-04-26-19-48-40.mp4 -ar 44100 -ab 96 -f flv pipe:1 | cat> videoname.flv
It worked fine and gave the following output :
FFmpeg version 0.6-4:0.6-2ubuntu6.3, Copyright (c) 2000-2010 the FFmpeg developers
built on Dec 21 2011 18:37:43 with gcc 4.4.5
configuration: --extra-version=4:0.6-2ubuntu6.3 --prefix=/usr --enable-avfilter --enable-avfilter-lavf --enable-vdpau --enable-bzlib --enable-libgsm --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-vaapi --enable-pthreads --enable-zlib --enable-libvpx --disable-stripping --enable-runtime-cpudetect --enable-gpl --enable-postproc --enable-x11grab --enable-libdc1394 --enable-shared --disable-static
WARNING: library configuration mismatch
libavutil configuration: --extra-version=4:0.6-2ubuntu3.3 --prefix=/usr --enable-avfilter --enable-avfilter-lavf --enable-vdpau --enable-bzlib --enable-libdirac --enable-libgsm --enable-libopenjpeg --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-vaapi --enable-pthreads --enable-zlib --enable-libvpx --disable-stripping --enable-runtime-cpudetect --enable-libmp3lame --enable-gpl --enable-postproc --enable-x11grab --enable-libfaad --enable-libxvid --enable-libx264 --enable-librtmp --enable-libdc1394 --shlibdir=/usr/lib/i686/cmov --cpu=i686 --enable-shared --disable-static --disable-ffmpeg --disable-ffplay
libavcodec configuration: --extra-version=4:0.6-2ubuntu3.3 --prefix=/usr --enable-avfilter --enable-avfilter-lavf --enable-vdpau --enable-bzlib --enable-libdirac --enable-libgsm --enable-libopenjpeg --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-vaapi --enable-pthreads --enable-zlib --enable-libvpx --disable-stripping --enable-runtime-cpudetect --enable-libmp3lame --enable-gpl --enable-postproc --enable-x11grab --enable-libfaad --enable-libxvid --enable-libx264 --enable-librtmp --enable-libdc1394 --shlibdir=/usr/lib/i686/cmov --cpu=i686 --enable-shared --disable-static --disable-ffmpeg --disable-ffplay
libavformat configuration: --extra-version=4:0.6-2ubuntu6.3 --prefix=/usr --enable-avfilter --enable-avfilter-lavf --enable-vdpau --enable-bzlib --enable-libgsm --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-vaapi --enable-pthreads --enable-zlib --enable-libvpx --disable-stripping --enable-runtime-cpudetect --enable-gpl --enable-postproc --enable-x11grab --enable-libdc1394 --shlibdir=/usr/lib/i686/cmov --cpu=i686 --enable-shared --disable-static --disable-ffmpeg --disable-ffplay
libavdevice configuration: --extra-version=4:0.6-2ubuntu6.3 --prefix=/usr --enable-avfilter --enable-avfilter-lavf --enable-vdpau --enable-bzlib --enable-libgsm --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-vaapi --enable-pthreads --enable-zlib --enable-libvpx --disable-stripping --enable-runtime-cpudetect --enable-gpl --enable-postproc --enable-x11grab --enable-libdc1394 --shlibdir=/usr/lib/i686/cmov --cpu=i686 --enable-shared --disable-static --disable-ffmpeg --disable-ffplay
libavfilter configuration: --extra-version=4:0.6-2ubuntu6.3 --prefix=/usr --enable-avfilter --enable-avfilter-lavf --enable-vdpau --enable-bzlib --enable-libgsm --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-vaapi --enable-pthreads --enable-zlib --enable-libvpx --disable-stripping --enable-runtime-cpudetect --enable-gpl --enable-postproc --enable-x11grab --enable-libdc1394 --shlibdir=/usr/lib/i686/cmov --cpu=i686 --enable-shared --disable-static --disable-ffmpeg --disable-ffplay
libswscale configuration: --extra-version=4:0.6-2ubuntu6.3 --prefix=/usr --enable-avfilter --enable-avfilter-lavf --enable-vdpau --enable-bzlib --enable-libgsm --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-vaapi --enable-pthreads --enable-zlib --enable-libvpx --disable-stripping --enable-runtime-cpudetect --enable-gpl --enable-postproc --enable-x11grab --enable-libdc1394 --shlibdir=/usr/lib/i686/cmov --cpu=i686 --enable-shared --disable-static --disable-ffmpeg --disable-ffplay
libpostproc configuration: --extra-version=4:0.6-2ubuntu6.3 --prefix=/usr --enable-avfilter --enable-avfilter-lavf --enable-vdpau --enable-bzlib --enable-libgsm --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-vaapi --enable-pthreads --enable-zlib --enable-libvpx --disable-stripping --enable-runtime-cpudetect --enable-gpl --enable-postproc --enable-x11grab --enable-libdc1394 --shlibdir=/usr/lib/i686/cmov --cpu=i686 --enable-shared --disable-static --disable-ffmpeg --disable-ffplay
libavutil 50.15. 1 / 50.15. 1
libavcodec 52.72. 2 / 52.72. 2
libavformat 52.64. 2 / 52.64. 2
libavdevice 52. 2. 0 / 52. 2. 0
libavfilter 1.19. 0 / 1.19. 0
libswscale 0.11. 0 / 0.11. 0
libpostproc 51. 2. 0 / 51. 2. 0
Seems stream 0 codec frame rate differs from container frame rate: 60000.00 (60000/1) -> 1000.00 (1000/1)
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'video-2012-04-26-19-48-40.mp4':
Metadata:
major_brand : 3gp4
minor_version : 768
compatible_brands: 3gp43gp6
Duration: 00:00:09.55, start: 0.000000, bitrate: 3366 kb/s
Stream #0.0(eng): Video: h264, yuv420p, 720x480, 3304 kb/s, 29.61 fps, 1k tbr, 30k tbn, 60k tbc
Stream #0.1(eng): Audio: aac, 16000 Hz, mono, s16, 56 kb/s
WARNING: The bitrate parameter is set too low. It takes bits/s as argument, not kbits/s
Output #0, flv, to 'pipe:1':
Metadata:
encoder : Lavf52.64.2
Stream #0.0(eng): Video: flv, yuv420p, 720x480, q=2-31, 200 kb/s, 1k tbn, 1k tbc
Stream #0.1(eng): Audio: adpcm_swf, 44100 Hz, mono, s16, 0 kb/s
Stream mapping:
Stream #0.0 -> #0.0
Stream #0.1 -> #0.1
Press [q] to stop encoding
frame= 283 fps=175 q=31.0 Lsize= 924kB time=9.52 bitrate= 794.7kbits/s
video:709kB audio:207kB global headers:0kB muxing overhead 0.867656%But when I read the input also from pipe, I get an error :
Command :
$cat video-2012-04-26-19-48-40.mp4| ffmpeg -i pipe: -ar 44100 -ab 96 -f flv pipe:1 | cat> videoname.flv
Error output :
FFmpeg version 0.6-4:0.6-2ubuntu6.3, Copyright (c) 2000-2010 the FFmpeg developers
built on Dec 21 2011 18:37:43 with gcc 4.4.5
configuration: --extra-version=4:0.6-2ubuntu6.3 --prefix=/usr --enable-avfilter --enable-avfilter-lavf --enable-vdpau --enable-bzlib --enable-libgsm --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-vaapi --enable-pthreads --enable-zlib --enable-libvpx --disable-stripping --enable-runtime-cpudetect --enable-gpl --enable-postproc --enable-x11grab --enable-libdc1394 --enable-shared --disable-static
WARNING: library configuration mismatch
libavutil configuration: --extra-version=4:0.6-2ubuntu3.3 --prefix=/usr --enable-avfilter --enable-avfilter-lavf --enable-vdpau --enable-bzlib --enable-libdirac --enable-libgsm --enable-libopenjpeg --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-vaapi --enable-pthreads --enable-zlib --enable-libvpx --disable-stripping --enable-runtime-cpudetect --enable-libmp3lame --enable-gpl --enable-postproc --enable-x11grab --enable-libfaad --enable-libxvid --enable-libx264 --enable-librtmp --enable-libdc1394 --shlibdir=/usr/lib/i686/cmov --cpu=i686 --enable-shared --disable-static --disable-ffmpeg --disable-ffplay
libavcodec configuration: --extra-version=4:0.6-2ubuntu3.3 --prefix=/usr --enable-avfilter --enable-avfilter-lavf --enable-vdpau --enable-bzlib --enable-libdirac --enable-libgsm --enable-libopenjpeg --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-vaapi --enable-pthreads --enable-zlib --enable-libvpx --disable-stripping --enable-runtime-cpudetect --enable-libmp3lame --enable-gpl --enable-postproc --enable-x11grab --enable-libfaad --enable-libxvid --enable-libx264 --enable-librtmp --enable-libdc1394 --shlibdir=/usr/lib/i686/cmov --cpu=i686 --enable-shared --disable-static --disable-ffmpeg --disable-ffplay
libavformat configuration: --extra-version=4:0.6-2ubuntu6.3 --prefix=/usr --enable-avfilter --enable-avfilter-lavf --enable-vdpau --enable-bzlib --enable-libgsm --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-vaapi --enable-pthreads --enable-zlib --enable-libvpx --disable-stripping --enable-runtime-cpudetect --enable-gpl --enable-postproc --enable-x11grab --enable-libdc1394 --shlibdir=/usr/lib/i686/cmov --cpu=i686 --enable-shared --disable-static --disable-ffmpeg --disable-ffplay
libavdevice configuration: --extra-version=4:0.6-2ubuntu6.3 --prefix=/usr --enable-avfilter --enable-avfilter-lavf --enable-vdpau --enable-bzlib --enable-libgsm --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-vaapi --enable-pthreads --enable-zlib --enable-libvpx --disable-stripping --enable-runtime-cpudetect --enable-gpl --enable-postproc --enable-x11grab --enable-libdc1394 --shlibdir=/usr/lib/i686/cmov --cpu=i686 --enable-shared --disable-static --disable-ffmpeg --disable-ffplay
libavfilter configuration: --extra-version=4:0.6-2ubuntu6.3 --prefix=/usr --enable-avfilter --enable-avfilter-lavf --enable-vdpau --enable-bzlib --enable-libgsm --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-vaapi --enable-pthreads --enable-zlib --enable-libvpx --disable-stripping --enable-runtime-cpudetect --enable-gpl --enable-postproc --enable-x11grab --enable-libdc1394 --shlibdir=/usr/lib/i686/cmov --cpu=i686 --enable-shared --disable-static --disable-ffmpeg --disable-ffplay
libswscale configuration: --extra-version=4:0.6-2ubuntu6.3 --prefix=/usr --enable-avfilter --enable-avfilter-lavf --enable-vdpau --enable-bzlib --enable-libgsm --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-vaapi --enable-pthreads --enable-zlib --enable-libvpx --disable-stripping --enable-runtime-cpudetect --enable-gpl --enable-postproc --enable-x11grab --enable-libdc1394 --shlibdir=/usr/lib/i686/cmov --cpu=i686 --enable-shared --disable-static --disable-ffmpeg --disable-ffplay
libpostproc configuration: --extra-version=4:0.6-2ubuntu6.3 --prefix=/usr --enable-avfilter --enable-avfilter-lavf --enable-vdpau --enable-bzlib --enable-libgsm --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-vaapi --enable-pthreads --enable-zlib --enable-libvpx --disable-stripping --enable-runtime-cpudetect --enable-gpl --enable-postproc --enable-x11grab --enable-libdc1394 --shlibdir=/usr/lib/i686/cmov --cpu=i686 --enable-shared --disable-static --disable-ffmpeg --disable-ffplay
libavutil 50.15. 1 / 50.15. 1
libavcodec 52.72. 2 / 52.72. 2
libavformat 52.64. 2 / 52.64. 2
libavdevice 52. 2. 0 / 52. 2. 0
libavfilter 1.19. 0 / 1.19. 0
libswscale 0.11. 0 / 0.11. 0
libpostproc 51. 2. 0 / 51. 2. 0
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x8962bc0]stream 0, offset 0x28: partial file
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x8962bc0]Could not find codec parameters (Video: h264, 3304 kb/s)
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x8962bc0]Could not find codec parameters (Audio: aac, mono, s16, 56 kb/s)
pipe:: could not find codec parametersPlease help me fix the error.
-
How can I create a write stream for res for a child_process.spawn method as it says cp.spawn().pipe(res) is not a method
11 juin 2022, par niishaaantconst express = require('express');
const router = express.Router();
const ytdl = require('ytdl-core');
const cp = require('child_process');
const ffmpeg = require('ffmpeg-static');

router.get('/', async (req, res) => {
 const { v, f, q } = req.query;
 if (!ytdl.validateID(v) && !ytdl.validateURL(v)) {
 return res
 .status(400)
 .json({ success: false, error: 'No valid YouTube Id!' });
 }
 try {
 let info = await ytdl.getInfo(v);

 //set format and title
 // const title = info.videoDetails.title;
 // res.setHeader('Content-disposition', contentDisposition(`${title}${f}`));

 //define audio and video stream seperately and download them
 const audio = ytdl(v, { quality: 'highestaudio' }).on(
 'progress',
 (_, downloaded, total) => {
 console.log({ downloaded, total });
 }
 );
 let format = ytdl.chooseFormat(info.formats, { quality: q });
 const video = ytdl(v, { format }).on('progress', (_, downloaded, total) => {
 console.log({ downloaded, total });
 });

 const ffmpegProcess = cp
 .spawn(
 ffmpeg,
 [
 // Remove ffmpeg's console spamming
 '-loglevel',
 '8',
 '-hide_banner',
 // Redirect/Enable progress messages
 '-progress',
 'pipe:3',
 // Set inputs
 '-i',
 'pipe:4',
 '-i',
 'pipe:5',
 // Map audio & video from streams
 '-map',
 '0:a',
 '-map',
 '1:v',
 // Keep encoding
 '-c:v',
 'copy',
 // Define output file
 `out.${f}`,
 ],
 {
 windowsHide: true,
 stdio: [
 /* Standard: stdin, stdout, stderr */
 'inherit',
 'inherit',
 'inherit',
 /* Custom: pipe:3, pipe:4, pipe:5 */
 'pipe',
 'pipe',
 'pipe',
 ],
 }
 )
 .on('close', () => {
 console.log('done');
 });

 // Link streams
 // FFmpeg creates the transformer streams and we just have to insert / read data
 ffmpegProcess.stdio[3].on('data', (chunk) => {
 // Parse the param=value list returned by ffmpeg
 const lines = chunk.toString().trim().split('\n');
 const args = {};
 for (const l of lines) {
 const [key, value] = l.split('=');
 args[key.trim()] = value.trim();
 }
 });
 audio.pipe(ffmpegProcess.stdio[4]);
 video.pipe(ffmpegProcess.stdio[5]);
 } catch (error) {
 res.status(400);
 console.log('error ', error);
 }
});

module.exports = router;





I am trying to create a youtube downloader app and this is the code for downloading a video using the ytdl and ffmpeg packages in an express route but i don't know how i can download the result (out.mp4) for the client. when I try to pipe it to res error occurs saying cp.spawn().pipe() is not a method.




-
How to optimize FFMPEG with pipe and memory reuse in Tide SDK
7 janvier 2014, par Vincent DuprezIm running into an speed optimization issue. Im building a video cut tool in web technologies on desktop with TideSDK. On of the tools has a timeline with a position slider
basically, whenever the slider moves, (using jquery UI), I get the position, translate this into a timecode and asks FFMPEG to encode to a file, when a get the finished event, I simply update the background-image attribute of the 'viewer' to this file. The file is located in some temporary folder.
The thing is, it is just a bit too slow. Usable, but slow (approx 2 fps on a High end Computer)
I think there are 2 bottlenecks on this strategy :Writing ffmpeg output to a file & reading back in css
repeatedly loading the same movie file in ffmpeg
This is the code executed on each move (var timecode is the calculated timecode based on the pointer position)
var cmd = [FFMPEG];
cmd.push('-y'); //overwrite existing files
cmd.push('-ss',timecode); //CUE position
cmd.push('-i',input); //input file
cmd.push('-f','image2'); //output format
cmd.push('-vframes','1'); //number of images to render
cmd.push(Ti.API.Application.getDataPath( )+"/encoderframe.jpg"); //output file
var makeframe = Ti.Process.createProcess(cmd);
makeframe.setOnReadLine(function(data){ /*console.log(data);*/ });
var time = new Date().getTime();
makeframe.setOnExit(function(){ ffmpegrunning = false; $('#videoframe').css('background-image','url(file://'+Ti.API.Application.getDataPath( ).replace(" ","%20")+'/encoderframe.jpg?'+time+')'); });
makeframe.launch();Basically, this repeatedly asks the same Command :
ffmpeg -y -ss 00:00:01.04 -i /somepath/somevideo.mov -f image2 -vframes 1 /path/to/output/encoderframe204.jpg
How can I optimize this code, Pipe to output straight to css background with Base64 data, or reuse loaded memory file in ffmpeg. ?
Thanks !