
Recherche avancée
Autres articles (34)
-
La file d’attente de SPIPmotion
28 novembre 2010, parUne file d’attente stockée dans la base de donnée
Lors de son installation, SPIPmotion crée une nouvelle table dans la base de donnée intitulée spip_spipmotion_attentes.
Cette nouvelle table est constituée des champs suivants : id_spipmotion_attente, l’identifiant numérique unique de la tâche à traiter ; id_document, l’identifiant numérique du document original à encoder ; id_objet l’identifiant unique de l’objet auquel le document encodé devra être attaché automatiquement ; objet, le type d’objet auquel (...) -
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 -
Encoding and processing into web-friendly formats
13 avril 2011, parMediaSPIP automatically converts uploaded files to internet-compatible formats.
Video files are encoded in MP4, Ogv and WebM (supported by HTML5) and MP4 (supported by Flash).
Audio files are encoded in MP3 and Ogg (supported by HTML5) and MP3 (supported by Flash).
Where possible, text is analyzed in order to retrieve the data needed for search engine detection, and then exported as a series of image files.
All uploaded files are stored online in their original format, so you can (...)
Sur d’autres sites (6133)
-
How to enable different components of FFMPEG ?
3 décembre 2011, par Richard77I've found this C# wrapper code around FFMPEG. I'm using ASP.NET MVC3 and C#. When trying to get it work, I'm getting the following error :
RawOutput "ffmpeg version N-34906-g4e7b3ef, Copyright (c) 2000-2011
the FFmpeg developers
built on Nov 16 2011 12:35:07 with gcc 4.6.2
configuration: --enable-gpl --enable-version3 --disable-w32threads
--enable-runtime-cpudetect --enable-avisynth --enable-bzlib --enable-frei0r
--enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libfreetype
--enable-libgsm --enable-libmp3lame --enable-libopenjpeg --enable-librtmp
--enable-libschroedinger --enable-libspeex --enable-libtheora
--enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis
--enable-libvpx --enable-libx264 --enable-libxavs --enable-libxvid
--enable-zlib
libavutil 51. 25. 0 / 51. 25. 0
libavcodec 53. 34. 0 / 53. 34. 0
libavformat 53. 20. 0 / 53. 20. 0
libavdevice 53. 4. 0 / 53. 4. 0
libavfilter 2. 48. 1 / 2. 48. 1
libswscale 2. 1. 0 / 2. 1. 0
libpostproc 51. 2. 0 / 51. 2. 0
[wmv3 @ 002BFA00] Extra data: 8 bits left, value: 0
[asf @ 002B8A80] parser not found for codec wmav2, packets or times may be invalid.
Seems stream 1 codec frame rate differs from container frame rate: 1000.00 (1000/1) -> 30.00 (30/1)
Input #0, asf, from 'C:\\FfMpeg\\Videos\\Original\\Video1.wmv':
Metadata:
WMFSDKVersion : 11.0.6002.18049
WMFSDKNeeded : 0.0.0.0000
IsVBR : 0
Duration: 00:00:41.80, start: 0.000000, bitrate: 888 kb/s
Stream #0:0(eng): Audio: wmav2 (a[1][0][0] / 0x0161), 44100 Hz, 2 channels, s16, 64 kb/s
Stream #0:1(eng): Video: wmv3 (Main) (WMV3 / 0x33564D57), yuv420p, 320x240, 786 kb/s, 30 tbr, 1k tbn, 1k tbc
Incompatible pixel format 'yuv420p' for codec 'mjpeg', auto-selecting format 'yuvj420p'
[buffer @ 031D8DA0] w:320 h:240 pixfmt:yuv420p tb:1/1000000 sar:0/1 sws_param:
[buffersink @ 031D8FA0] auto-inserting filter 'auto-inserted scale 0' between the filter 'src' and the filter 'out'
[scale @ 03106C20] w:320 h:240 fmt:yuv420p -> w:320 h:240 fmt:yuvj420p flags:0x4
[wmv3 @ 002BFA00] Extra data: 8 bits left, value: 0
Output #0, image2, to '87334ed0-2bcf-4be5-82ae-9089c14e0323.jpg':
Metadata:
WMFSDKVersion : 11.0.6002.18049
WMFSDKNeeded : 0.0.0.0000
IsVBR : 0
encoder : Lavf53.20.0
Stream #0:0(eng): Video: mjpeg, yuvj420p, 320x240, q=2-31, 200 kb/s, 90k tbn, 30 tbc
Stream mapping:
Stream #0:1 -> #0:0 (wmv3 -> mjpeg)
Press [q] to stop, [?] for help
[image2 @ 03107920] Could not open file : 87334ed0-2bcf-4be5-82ae-9089c14e0323.jpg
av_interleaved_write_frame(): Input/output error
" stringI'm absolutely new to FFMPEG, so I don't know where to start to solve the above probleme.
EDIT
public ActionResult Convert()
{
Converter _converter = new Converter(@"C:\FfMpeg\ffmpeg.exe");
OutputPackage oo = _converter.ConvertToFLV(@"C:\FfMpeg\Videos\Original\Video1.wmv");
FileStream outStream = System.IO.File.OpenWrite(@"C:\FfMpeg\Videos\Converted\Video1.flv");
oo.VideoStream.WriteTo(outStream);
outStream.Flush();
outStream.Close();
oo.PreviewImage.Save(@"C:\FfMpeg\Videos\Thumbnail\Thumbnail1.jpg");
return RedirectToAction("WatchMovie");
}Thanks for helping
-
nodejs FFMPEG argument issues
16 août 2016, par shaunWhen I put the following command in the command line FFMPEG works completely correct and mute’s the sections of the video as expected.
C:\>ffmpeg -y -i C:/Users/ADMINI~1/AppData/Local/Temp/2/0400028520160811144100001i100.mp4 -af "volume=enable='between(t,1,3)':volume=0, volume=enable='between(t,10,12)':volume=0, volume=enable='between(t,4,6)':volume=0, volume=enable='between(t,7,9)':volume=0" -c:v copy -movflags +faststart c:\temp\31e7ac4063d111e6bdc67f1f7f7b55d3.mp4
ffmpeg version N-79651-ge1c2048 Copyright (c) 2000-2016 the FFmpeg developers
built with gcc 4.9.3 (GCC)
configuration: --prefix=/usr/local/x86_64-w64-mingw32 --enable-gpl --enable-nonfree --enable-libx264 --enable-libfdk_aac --enable-static --enable-runtime-cpudetect --enable-w32threads --disable-shared --disable-ffplay --disable-ffserver --arch=x86_64 --extra-cflags=-I/local/x86_64-w64-mingw32/include --extra-ldflags='-L/local/x86_64-w64-mingw32/lib -static'
libavutil 55. 22.101 / 55. 22.101
libavcodec 57. 38.100 / 57. 38.100
libavformat 57. 34.103 / 57. 34.103
libavdevice 57. 0.101 / 57. 0.101
libavfilter 6. 44.100 / 6. 44.100
libswscale 4. 1.100 / 4. 1.100
libswresample 2. 0.101 / 2. 0.101
libpostproc 54. 0.100 / 54. 0.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'C:/Users/ADMINI~1/AppData/Local/Temp/2/0400028520160811144100001i100.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf57.34.103
Duration: 00:00:12.78, start: 0.000000, bitrate: 4074 kb/s
Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1280x720, 4006 kb/s, 30 fps, 30 tbr, 15360 tbn (default)
Metadata:
handler_name : VideoHandler
Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 64 kb/s (default)
Metadata:
handler_name : SoundHandler
[mp4 @ 03a8e5e0] Using AVStream.codec to pass codec parameters to muxers is deprecated, use AVStream.codecpar instead.
Last message repeated 1 times
Output #0, mp4, to 'c:\temp\31e7ac4063d111e6bdc67f1f7f7b55d3-AudRedact.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf57.34.103
Stream #0:0(und): Video: h264 ([33][0][0][0] / 0x0021), yuv420p, 1280x720, q=2-31, 4006 kb/s, 30 fps, 30 tbr, 15360 tbn (default)
Metadata:
handler_name : VideoHandler
Stream #0:1(und): Audio: aac (LC) ([64][0][0][0] / 0x0040), 48000 Hz, stereo, fltp, 128 kb/s (default)
Metadata:
handler_name : SoundHandler
encoder : Lavc57.38.100 aac
Stream mapping:
Stream #0:0 -> #0:0 (copy)
Stream #0:1 -> #0:1 (aac (native) -> aac (native))
Press [q] to stop, [?] for help
[mp4 @ 03a8e5e0] Starting second pass: moving the moov atom to the beginning of the file24.3x
frame= 383 fps=0.0 q=-1.0 Lsize= 6325kB time=00:00:12.73 bitrate=4068.3kbits/s speed=24.7x
video:6244kB audio:69kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.191899%
[aac @ 03776160] Qavg: 51080.756However if I build the same in node programatically :
function redactAudio(tempFilePath, arrPairs, cb){
// ffmpeg -loglevel fatal -y -i video.mp4 -af "volume=enable='between(t,5,10)':volume=0, volume=enable='between(t,15,20)':volume=0" -c:v copy -movflags +faststart output.mp4
var tempBuff = Buffer.alloc(16);
jsuuid.v1(null, tempBuff, 0);
var outFileName = tempBuff.toString('hex') + path2.extname(tempFilePath);
var volStr = '"';
for (var i = 0; i < arrPairs.length; i++) {
volStr += "volume=enable='between(t," + arrPairs[i].start + "," + arrPairs[i].end + ")':volume=0";
if (i !== arrPairs.length - 1) {
volStr += ", ";
} else {
volStr += '"';
}
}
child_process.execFile(
'ffmpeg',
[
/*'-loglevel', 'fatal',*/
'-y', '-i', tempFilePath,
'-af', volStr,
'-c:v', 'copy',
'-movflags', '+faststart', outFileName
],
{
cwd: tempDir,
maxBuffer: Infinity
},
function(err, stdout, stderr) {
if (err) {
console.error(clc.magentaBright(clc.whiteBright('FFMPEG - ERROR OCC: ', path2.basename(tempFilePath), ' : ', stderr, '\n')));
return cb(err, 'FFMpeg Failed: ' + JSON.stringify({ stdout: stdout, stderr: stderr} ));
} else {
console.log(clc.magentaBright(clc.whiteBright('FFMPEG - Finished: ', path2.basename(tempFilePath), '\n')));
return cb(null, outFileName);
}
}
);
}Please Help me understand what is going on because I get the following error every time when run from node.
FFMPEG - ERROR OCC: 0400028520160811144100001i100.mp4 : ffmpeg version N-79651-ge1c2048 Copyright (c) 2000-2016 the FFmpeg developers
built with gcc 4.9.3 (GCC)
configuration: --prefix=/usr/local/x86_64-w64-mingw32 --enable-gpl --enable-nonfree --enable-libx264 --enable-libfdk_aac --enable-static --enable-runtime-cpudetect --enable-w32threads --disable-shared --disable-ffplay --disable-ffserver --arch=x86_64 --extra-cflags=-I/local/x86_64-w64-mingw32/include --extra-ldflags='-L/local/x86_64-w64-mingw32/lib -static'
libavutil 55. 22.101 / 55. 22.101
libavcodec 57. 38.100 / 57. 38.100
libavformat 57. 34.103 / 57. 34.103
libavdevice 57. 0.101 / 57. 0.101
libavfilter 6. 44.100 / 6. 44.100
libswscale 4. 1.100 / 4. 1.100
libswresample 2. 0.101 / 2. 0.101
libpostproc 54. 0.100 / 54. 0.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'C:/Users/ADMINI~1/AppData/Local/Temp/2/0400028520160811144100001i100.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf57.34.103
Duration: 00:00:12.78, start: 0.000000, bitrate: 4074 kb/s
Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1280x720, 4006 kb/s, 30 fps, 30 tbr, 15360 tbn (default)
Metadata:
handler_name : VideoHandler
Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 64 kb/s (default)
Metadata:
handler_name : SoundHandler
[AVFilterGraph @ 00381600] No such filter: '"volume'
Error opening filters!
0400028520160811144100001i100.mp4
{ Error: Command failed: ffmpeg -y -i C:/Users/ADMINI~1/AppData/Local/Temp/2/0400028520160811144100001i100.mp4 -af "volume=enable='between(t,1,3)':volume=0, volume=enable='between(t,10,12)':volume=0, volume=enable='between(t,4,6)':volume=0, volume=enable='between(t,7,9)':volume=0" -c:v copy -movflags +faststart ea1eae2063d211e6bbf2af16c2e9be57.mp4
ffmpeg version N-79651-ge1c2048 Copyright (c) 2000-2016 the FFmpeg developers
built with gcc 4.9.3 (GCC)
configuration: --prefix=/usr/local/x86_64-w64-mingw32 --enable-gpl --enable-nonfree --enable-libx264 --enable-libfdk_aac --enable-static --enable-runtime-cpudetect --enable-w32threads --disable-shared --disable-ffplay --disable-ffserver --arch=x86_64 --extra-cflags=-I/local/x86_64-w64-mingw32/include --extra-ldflags='-L/local/x86_64-w64-mingw32/lib -static'
libavutil 55. 22.101 / 55. 22.101
libavcodec 57. 38.100 / 57. 38.100
libavformat 57. 34.103 / 57. 34.103
libavdevice 57. 0.101 / 57. 0.101
libavfilter 6. 44.100 / 6. 44.100
libswscale 4. 1.100 / 4. 1.100
libswresample 2. 0.101 / 2. 0.101
libpostproc 54. 0.100 / 54. 0.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'C:/Users/ADMINI~1/AppData/Local/Temp/2/0400028520160811144100001i100.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf57.34.103
Duration: 00:00:12.78, start: 0.000000, bitrate: 4074 kb/s
Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1280x720, 4006 kb/s, 30 fps, 30 tbr, 15360 tbn (default)
Metadata:
handler_name : VideoHandler
Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 64 kb/s (default)
Metadata:
handler_name : SoundHandler
[AVFilterGraph @ 00381600] No such filter: '"volume'
Error opening filters!
at ChildProcess.exithandler (child_process.js:202:12)
at emitTwo (events.js:106:13)
at ChildProcess.emit (events.js:191:7)
at maybeClose (internal/child_process.js:850:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:215:5)
killed: false,
code: 1,
signal: null,
cmd: 'ffmpeg -y -i C:/Users/ADMINI~1/AppData/Local/Temp/2/0400028520160811144100001i100.mp4 -af "volume=enable=\'between(t,1,3)\':volume=0, volume=enable=\'between(t,10,12)\':volume=0, volume=enable=\'between(t,4,6)\':volume=0, volume=enable=\'between(t,7,9)\':volume=0" -c:v copy -movflags +faststart ea1eae2063d211e6bbf2af16c2e9be57.mp4' }Best I can think is it has something to do with the \’ in volStr but I don’t know how to create it any other way.
after @Mulvya comment I changed my for loop to
var volStr = '';
for (var i = 0; i < arrPairs.length; i++) {
volStr += "volume=enable='between(t," + arrPairs[i].start + "," + arrPairs[i].end + ")':volume=0";
if (i !== arrPairs.length - 1) {
volStr += ",";
}
}getting rid of the space between each grouping and it worked beautifully.
-
ffmpeg mp3 streaming via node js
21 août 2016, par school boyvar fs = require('fs');
var child = require('child_process');
var http=require('http')
var input_file = fs.createReadStream('./remo.mp3');
http.createServer(function (req,res) {
var args = ['-ss',120,
'-i', 'remo.mp3',
'-f','mp3',
'pipe:1' // Output on stdout
];
var trans_proc = child.spawn('ffmpeg', args);
res.writeHead(200, {
'Content-Type': 'audio/mpeg'
});
trans_proc.stdout.pipe(res)
trans_proc.stderr.on('data',function (err) {
console.log(err.toString());
})
}).listen(2000)i am trying to cut the mp3 and streaming to the browser but in browser it showing corrupted file