
Recherche avancée
Médias (91)
-
Head down (wav version)
26 septembre 2011, par
Mis à jour : Avril 2013
Langue : English
Type : Audio
-
Echoplex (wav version)
26 septembre 2011, par
Mis à jour : Avril 2013
Langue : English
Type : Audio
-
Discipline (wav version)
26 septembre 2011, par
Mis à jour : Avril 2013
Langue : English
Type : Audio
-
Letting you (wav version)
26 septembre 2011, par
Mis à jour : Avril 2013
Langue : English
Type : Audio
-
1 000 000 (wav version)
26 septembre 2011, par
Mis à jour : Avril 2013
Langue : English
Type : Audio
-
999 999 (wav version)
26 septembre 2011, par
Mis à jour : Avril 2013
Langue : English
Type : Audio
Autres articles (67)
-
Les autorisations surchargées par les plugins
27 avril 2010, parMediaspip core
autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs -
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 -
Submit bugs and patches
13 avril 2011Unfortunately a software is never perfect.
If you think you have found a bug, report it using our ticket system. Please to help us to fix it by providing the following information : the browser you are using, including the exact version as precise an explanation as possible of the problem if possible, the steps taken resulting in the problem a link to the site / page in question
If you think you have solved the bug, fill in a ticket and attach to it a corrective patch.
You may also (...)
Sur d’autres sites (9433)
-
ffmpeg when asked to map a .mov file's streams 0,1,3 actually maps streams 0,1,2
15 septembre 2023, par user2258729I'm trying the following :


Start with
in.mov
which has 4 streams 0:0 - 0:3.

Audio, Video, Data (unknown), and mJpeg.


Trying to map 0:0, 0:1, and 0:3 into
out013.mov
.

ffmpeg -i in.mov -map 0 -map -0:2 -c copy out013.mov


or


ffmpeg -i in.mov -map 0:0 -map 0:1 -map 0:2 -c copy out013.mov


ffmpeg tells me that 3 streams are mapped :


Stream #0:0 -> #0:0 (copy)
 Stream #0:1 -> #0:1 (copy)
 Stream #0:3 -> #0:2 (copy)



ffprobe disagrees. According to it what really happened was :


Stream #0:0 -> #0:0 (copy)
 Stream #0:1 -> #0:1 (copy)
 Stream #0:2 -> #0:2 (copy)



"Who needs a thumbnail image anyways, screw it !" I said. "Let's just get rid of the data."


ffmpeg -i out013.mov -map 0:0 -map 0:1 -c copy out01.mov


ffmpeg tells me that 2 streams are mapped :


Stream #0:0 -> #0:0 (copy)
 Stream #0:1 -> #0:1 (copy)



ffprobe disagrees. According to it what really happened was :


Stream #0:0 -> #0:0 (copy)
 Stream #0:1 -> #0:1 (copy)
 Stream #0:2 -> #0:2 (copy)



Seems like I can't rid myself of that data stream (0:2).


Below is the output from the ffprobe and ffmpeg for the first scenario.


Any ideas ?



ffprobe in.mov


ffprobe version 2023-09-07-git-9c9f48e7f2-essentials_build-www.gyan.dev Copyright (c) 2007-2023 the FFmpeg developers
 built with gcc 12.2.0 (Rev10, Built by MSYS2 project)
 configuration: --enable-gpl --enable-version3 --enable-static --disable-w32threads --disable-autodetect --enable-fontconfig --enable-iconv --enable-gnutls --enable-libxml2 --enable-gmp --enable-bzlib --enable-lzma --enable-zlib --enable-libsrt --enable-libssh --enable-libzmq --enable-avisynth --enable-sdl2 --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-libaom --enable-libopenjpeg --enable-libvpx --enable-mediafoundation --enable-libass --enable-libfreetype --enable-libfribidi --enable-libharfbuzz --enable-libvidstab --enable-libvmaf --enable-libzimg --enable-amf --enable-cuda-llvm --enable-cuvid --enable-ffnvcodec --enable-nvdec --enable-nvenc --enable-dxva2 --enable-d3d11va --enable-libvpl --enable-libgme --enable-libopenmpt --enable-libopencore-amrwb --enable-libmp3lame --enable-libtheora --enable-libvo-amrwbenc --enable-libgsm --enable-libopencore-amrnb --enable-libopus --enable-libspeex --enable-libvorbis --enable-librubberband
 libavutil 58. 19.100 / 58. 19.100
 libavcodec 60. 26.100 / 60. 26.100
 libavformat 60. 11.100 / 60. 11.100
 libavdevice 60. 2.101 / 60. 2.101
 libavfilter 9. 11.100 / 9. 11.100
 libswscale 7. 3.100 / 7. 3.100
 libswresample 4. 11.100 / 4. 11.100
 libpostproc 57. 2.100 / 57. 2.100
[mov,mp4,m4a,3gp,3g2,mj2 @ 0000023b088f3300] stream 0, timescale not set
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'in.mov':
 Metadata:
 major_brand : qt
 minor_version : 0
 compatible_brands: qt
 creation_time : 2023-08-22T21:23:09.000000Z
 title : Redacted
 com.apple.quicktime.displayname: Redacted
 com.apple.quicktime.title: Redacted
 Duration: 00:00:30.03, start: 0.000000, bitrate: 152583 kb/s
 Stream #0:0[0x1](eng): Audio: pcm_s24le (lpcm / 0x6D63706C), 48000 Hz, 2 channels, s32 (24 bit), 2304 kb/s (default)
 Metadata:
 creation_time : 2023-08-22T21:23:09.000000Z
 handler_name : Core Media Audio
 vendor_id : [0][0][0][0]
 Stream #0:1[0x2](und): Video: prores (Standard) (apcn / 0x6E637061), yuv422p10le(bt709, progressive), 1920x1080, 150213 kb/s, SAR 1:1 DAR 16:9, 29.97 fps, 29.97 tbr, 30k tbn (default)
 Metadata:
 creation_time : 2023-08-22T21:23:09.000000Z
 handler_name : Core Media Video
 vendor_id : [0][0][0][0]
 encoder : Apple ProRes 422
 timecode : 00:00:00:00
 Stream #0:2[0x3](und): Data: none (tmcd / 0x64636D74), 0 kb/s (default)
 Metadata:
 creation_time : 2023-08-22T21:23:09.000000Z
 handler_name : Core Media Time Code
 timecode : 00:00:00:00
 Stream #0:3[0x0]: Video: mjpeg (Progressive), yuvj420p(pc, bt470bg/unknown/unknown), 1920x1080 [SAR 72:72 DAR 16:9], 90k tbr, 90k tbn (attached pic)
Unsupported codec with id 0 for input stream 2




ffmpeg -i in.mov -map 0:0 -map 0:1 -map 0:3 -c copy out013.mov


ffmpeg version 2023-09-07-git-9c9f48e7f2-essentials_build-www.gyan.dev Copyright (c) 2000-2023 the FFmpeg developers
 built with gcc 12.2.0 (Rev10, Built by MSYS2 project)
 configuration: --enable-gpl --enable-version3 --enable-static --disable-w32threads --disable-autodetect --enable-fontconfig --enable-iconv --enable-gnutls --enable-libxml2 --enable-gmp --enable-bzlib --enable-lzma --enable-zlib --enable-libsrt --enable-libssh --enable-libzmq --enable-avisynth --enable-sdl2 --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-libaom --enable-libopenjpeg --enable-libvpx --enable-mediafoundation --enable-libass --enable-libfreetype --enable-libfribidi --enable-libharfbuzz --enable-libvidstab --enable-libvmaf --enable-libzimg --enable-amf --enable-cuda-llvm --enable-cuvid --enable-ffnvcodec --enable-nvdec --enable-nvenc --enable-dxva2 --enable-d3d11va --enable-libvpl --enable-libgme --enable-libopenmpt --enable-libopencore-amrwb --enable-libmp3lame --enable-libtheora --enable-libvo-amrwbenc --enable-libgsm --enable-libopencore-amrnb --enable-libopus --enable-libspeex --enable-libvorbis --enable-librubberband
 libavutil 58. 19.100 / 58. 19.100
 libavcodec 60. 26.100 / 60. 26.100
 libavformat 60. 11.100 / 60. 11.100
 libavdevice 60. 2.101 / 60. 2.101
 libavfilter 9. 11.100 / 9. 11.100
 libswscale 7. 3.100 / 7. 3.100
 libswresample 4. 11.100 / 4. 11.100
 libpostproc 57. 2.100 / 57. 2.100
[mov,mp4,m4a,3gp,3g2,mj2 @ 000001f92e383880] stream 0, timescale not set
[aist#0:0/pcm_s24le @ 000001f92e50f400] Guessed Channel Layout: stereo
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'in.mov':
 Metadata:
 major_brand : qt
 minor_version : 0
 compatible_brands: qt
 creation_time : 2023-08-22T21:23:09.000000Z
 title : Redacted
 com.apple.quicktime.displayname: Redacted
 com.apple.quicktime.title: Redacted
 Duration: 00:00:30.03, start: 0.000000, bitrate: 152583 kb/s
 Stream #0:0[0x1](eng): Audio: pcm_s24le (lpcm / 0x6D63706C), 48000 Hz, 2 channels, s32 (24 bit), 2304 kb/s (default)
 Metadata:
 creation_time : 2023-08-22T21:23:09.000000Z
 handler_name : Core Media Audio
 vendor_id : [0][0][0][0]
 Stream #0:1[0x2](und): Video: prores (Standard) (apcn / 0x6E637061), yuv422p10le(bt709, progressive), 1920x1080, 150213 kb/s, SAR 1:1 DAR 16:9, 29.97 fps, 29.97 tbr, 30k tbn (default)
 Metadata:
 creation_time : 2023-08-22T21:23:09.000000Z
 handler_name : Core Media Video
 vendor_id : [0][0][0][0]
 encoder : Apple ProRes 422
 timecode : 00:00:00:00
 Stream #0:2[0x3](und): Data: none (tmcd / 0x64636D74), 0 kb/s (default)
 Metadata:
 creation_time : 2023-08-22T21:23:09.000000Z
 handler_name : Core Media Time Code
 timecode : 00:00:00:00
 Stream #0:3[0x0]: Video: mjpeg (Progressive), yuvj420p(pc, bt470bg/unknown/unknown), 1920x1080 [SAR 72:72 DAR 16:9], 90k tbr, 90k tbn (attached pic)
Output #0, mov, to 'out013.mov':
 Metadata:
 major_brand : qt
 minor_version : 0
 compatible_brands: qt
 com.apple.quicktime.title: Redacted
 title : Redacted
 com.apple.quicktime.displayname: Redacted
 encoder : Lavf60.11.100
 Stream #0:0(eng): Audio: pcm_s24le (in24 / 0x34326E69), 48000 Hz, stereo, s32 (24 bit), 2304 kb/s (default)
 Metadata:
 creation_time : 2023-08-22T21:23:09.000000Z
 handler_name : Core Media Audio
 vendor_id : [0][0][0][0]
 Stream #0:1(und): Video: prores (Standard) (apcn / 0x6E637061), yuv422p10le(bt709, progressive), 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 150213 kb/s, 29.97 fps, 29.97 tbr, 30k tbn (default)
 Metadata:
 creation_time : 2023-08-22T21:23:09.000000Z
 handler_name : Core Media Video
 vendor_id : [0][0][0][0]
 encoder : Apple ProRes 422
 timecode : 00:00:00:00
 Stream #0:2: Video: mjpeg (Progressive) (jpeg / 0x6765706A), yuvj420p(pc, bt470bg/unknown/unknown), 1920x1080 [SAR 72:72 DAR 16:9], q=2-31, 90k tbr, 90k tbn (attached pic)
Stream mapping:
 Stream #0:0 -> #0:0 (copy)
 Stream #0:1 -> #0:1 (copy)
 Stream #0:3 -> #0:2 (copy)
Press [q] to stop, [?] for help
[out#0/mov @ 000001f92e398340] video:550881kB audio:8446kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
frame= 900 fps=0.0 q=-1.0 Lq=-1.0 size= 559116kB time=00:00:30.02 bitrate=152567.6kbits/s speed= 117x




ffprobe out013.mov


ffprobe version 2023-09-07-git-9c9f48e7f2-essentials_build-www.gyan.dev Copyright (c) 2007-2023 the FFmpeg developers
 built with gcc 12.2.0 (Rev10, Built by MSYS2 project)
 configuration: --enable-gpl --enable-version3 --enable-static --disable-w32threads --disable-autodetect --enable-fontconfig --enable-iconv --enable-gnutls --enable-libxml2 --enable-gmp --enable-bzlib --enable-lzma --enable-zlib --enable-libsrt --enable-libssh --enable-libzmq --enable-avisynth --enable-sdl2 --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-libaom --enable-libopenjpeg --enable-libvpx --enable-mediafoundation --enable-libass --enable-libfreetype --enable-libfribidi --enable-libharfbuzz --enable-libvidstab --enable-libvmaf --enable-libzimg --enable-amf --enable-cuda-llvm --enable-cuvid --enable-ffnvcodec --enable-nvdec --enable-nvenc --enable-dxva2 --enable-d3d11va --enable-libvpl --enable-libgme --enable-libopenmpt --enable-libopencore-amrwb --enable-libmp3lame --enable-libtheora --enable-libvo-amrwbenc --enable-libgsm --enable-libopencore-amrnb --enable-libopus --enable-libspeex --enable-libvorbis --enable-librubberband
 libavutil 58. 19.100 / 58. 19.100
 libavcodec 60. 26.100 / 60. 26.100
 libavformat 60. 11.100 / 60. 11.100
 libavdevice 60. 2.101 / 60. 2.101
 libavfilter 9. 11.100 / 9. 11.100
 libswscale 7. 3.100 / 7. 3.100
 libswresample 4. 11.100 / 4. 11.100
 libpostproc 57. 2.100 / 57. 2.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'out013.mov':
 Metadata:
 major_brand : qt
 minor_version : 512
 compatible_brands: qt
 title : Redacted
 encoder : Lavf60.11.100
 timecode : 00:00:00:00
 Duration: 00:00:30.03, start: 0.000000, bitrate: 152523 kb/s
 Stream #0:0[0x1](eng): Audio: pcm_s24le (in24 / 0x34326E69), 48000 Hz, stereo, s32 (24 bit), 2304 kb/s (default)
 Metadata:
 handler_name : Core Media Audio
 vendor_id : [0][0][0][0]
 Stream #0:1[0x2]: Video: prores (Standard) (apcn / 0x6E637061), yuv422p10le(bt709, progressive), 1920x1080, 150213 kb/s, SAR 1:1 DAR 16:9, 29.97 fps, 29.97 tbr, 30k tbn (default)
 Metadata:
 handler_name : Core Media Video
 vendor_id : FFMP
 encoder : Apple ProRes 422
 timecode : 00:00:00:00
 Stream #0:2[0x4](eng): Data: none (tmcd / 0x64636D74), 0 kb/s
 Metadata:
 handler_name : Core Media Video
 timecode : 00:00:00:00
Unsupported codec with id 0 for input stream 2




-
How do you use Node.js to stream an MP4 file with ffmpeg ?
27 avril 2023, par LaserJesusI've been trying to solve this problem for several days now and would really appreciate any help on the subject.



I'm able to successfully stream an mp4 audio file stored on a Node.js server using fluent-ffmpeg by passing the location of the file as a string and transcoding it to mp3. If I create a file stream from the same file and pass that to fluent-ffmpeg instead it works for an mp3 input file, but not a mp4 file. In the case of the mp4 file no error is thrown and it claims the stream completed successfully, but nothing is playing in the browser. I'm guessing this has to do with the meta data being stored at the end of an mp4 file, but I don't know how to code around this. This is the exact same file that works correctly when it's location is passed to ffmpeg, rather than the stream. When I try and pass a stream to the mp4 file on s3, again no error is thrown, but nothing streams to the browser. This isn't surprising as ffmpeg won't work with the file locally as stream, so expecting it to handle the stream from s3 is wishful thinking.



How can I stream the mp4 file from s3, without storing it locally as a file first ? How do I get ffmpeg to do this without transcoding the file too ? The following is the code I have at the moment which isn't working. Note that it attempts to pass the s3 file as a stream to ffmpeg and it's also transcoding it into an mp3, which I'd prefer not to do.



.get(function(req,res) {
 aws.s3(s3Bucket).getFile(s3Path, function (err, result) {
 if (err) {
 return next(err);
 }
 var proc = new ffmpeg(result)
 .withAudioCodec('libmp3lame')
 .format('mp3')
 .on('error', function (err, stdout, stderr) {
 console.log('an error happened: ' + err.message);
 console.log('ffmpeg stdout: ' + stdout);
 console.log('ffmpeg stderr: ' + stderr);
 })
 .on('end', function () {
 console.log('Processing finished !');
 })
 .on('progress', function (progress) {
 console.log('Processing: ' + progress.percent + '% done');
 })
 .pipe(res, {end: true});
 });
});




This is using the knox library when it calls aws.s3... I've also tried writing it using the standard aws sdk for Node.js, as shown below, but I get the same outcome as above.



var AWS = require('aws-sdk');

var s3 = new AWS.S3({
 accessKeyId: process.env.AWS_ACCESS_KEY_ID,
 secretAccessKey: process.env.AWS_SECRET_KEY,
 region: process.env.AWS_REGION_ID
});
var fileStream = s3.getObject({
 Bucket: s3Bucket,
 Key: s3Key
 }).createReadStream();
var proc = new ffmpeg(fileStream)
 .withAudioCodec('libmp3lame')
 .format('mp3')
 .on('error', function (err, stdout, stderr) {
 console.log('an error happened: ' + err.message);
 console.log('ffmpeg stdout: ' + stdout);
 console.log('ffmpeg stderr: ' + stderr);
 })
 .on('end', function () {
 console.log('Processing finished !');
 })
 .on('progress', function (progress) {
 console.log('Processing: ' + progress.percent + '% done');
 })
 .pipe(res, {end: true});




=====================================



Updated



I placed an mp3 file in the same s3 bucket and the code I have here worked and was able to stream the file through to the browser without storing a local copy. So the streaming issues I face have something to do with the mp4/aac container/encoder format.



I'm still interested in a way to bring the m4a file down from s3 to the Node.js server in it's entirety, then pass it to ffmpeg for streaming without actually storing the file in the local file system.



=====================================



Updated Again



I've managed to get the server streaming the file, as mp4, straight to the browser. This half answers my original question. My only issue now is that I have to download the file to a local store first, before I can stream it. I'd still like to find a way to stream from s3 without needing the temporary file.



aws.s3(s3Bucket).getFile(s3Path, function(err, result){
 result.pipe(fs.createWriteStream(file_location));
 result.on('end', function() {
 console.log('File Downloaded!');
 var proc = new ffmpeg(file_location)
 .outputOptions(['-movflags isml+frag_keyframe'])
 .toFormat('mp4')
 .withAudioCodec('copy')
 .seekInput(offset)
 .on('error', function(err,stdout,stderr) {
 console.log('an error happened: ' + err.message);
 console.log('ffmpeg stdout: ' + stdout);
 console.log('ffmpeg stderr: ' + stderr);
 })
 .on('end', function() {
 console.log('Processing finished !');
 })
 .on('progress', function(progress) {
 console.log('Processing: ' + progress.percent + '% done');
 })
 .pipe(res, {end: true});
 });
});




On the receiving side I just have the following javascript in an empty html page :



window.AudioContext = window.AudioContext || window.webkitAudioContext;
context = new AudioContext();

function process(Data) {
 source = context.createBufferSource(); // Create Sound Source
 context.decodeAudioData(Data, function(buffer){
 source.buffer = buffer;
 source.connect(context.destination);
 source.start(context.currentTime);
 });
};

function loadSound() {
 var request = new XMLHttpRequest();
 request.open("GET", "/stream/", true);
 request.responseType = "arraybuffer";

 request.onload = function() {
 var Data = request.response;
 process(Data);
 };

 request.send();
};

loadSound()




=====================================



The Answer



The code above under the title 'updated again' will stream an mp4 file, from s3, via a Node.js server to a browser without using flash. It does require that the file be stored temporarily on the Node.js server so that the meta data in the file is moved from the end of the file to the front. In order to stream without storing the temporary file, you need to actual modify the file on S3 first and make this meta data change. If you have changed the file in this way on S3 then you can modify the code under the title 'updated again' so that the result from S3 is piped straight into the ffmpeg constructor, rather than into a file stream on the Node.js server, then providing that file location to ffmepg, as the code does now. You can change the final 'pipe' command to 'save(location)' to get a version of the mp4 file locally with the meta data moved to the front. You can then upload that new version of the file to S3 and try out the end to end streaming. Personally I'm now going to create a task that modifies the files in this way as they are uploaded to s3 in the first place. This allows me to record and stream in mp4 without transcoding or storing a temp file on the Node.js server.


-
Why zoompan "pzoom - " not working on video?
10 avril 2023, par Jim Qiancmd : ffmpeg -i video2.mp4 -filter_complex "[0:v]zoompan=z=pzoom-0.01:x='iw/2-iw/zoom/2':y='ih/2-ih/zoom/2':d=1" -c:v libx264 -pix_fmt yuv420p -r 24 -y video_bg.mp4


no zoom in happened in the out video


However, if change to pzoom+0.01, zoom out does work. Why ?