
Recherche avancée
Médias (1)
-
Carte de Schillerkiez
13 mai 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Texte
Autres articles (74)
-
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 -
Support audio et vidéo HTML5
10 avril 2011MediaSPIP utilise les balises HTML5 video et audio pour la lecture de documents multimedia en profitant des dernières innovations du W3C supportées par les navigateurs modernes.
Pour les navigateurs plus anciens, le lecteur flash Flowplayer est utilisé.
Le lecteur HTML5 utilisé a été spécifiquement créé pour MediaSPIP : il est complètement modifiable graphiquement pour correspondre à un thème choisi.
Ces technologies permettent de distribuer vidéo et son à la fois sur des ordinateurs conventionnels (...) -
Librairies et binaires spécifiques au traitement vidéo et sonore
31 janvier 2010, parLes logiciels et librairies suivantes sont utilisées par SPIPmotion d’une manière ou d’une autre.
Binaires obligatoires FFMpeg : encodeur principal, permet de transcoder presque tous les types de fichiers vidéo et sonores dans les formats lisibles sur Internet. CF ce tutoriel pour son installation ; Oggz-tools : outils d’inspection de fichiers ogg ; Mediainfo : récupération d’informations depuis la plupart des formats vidéos et sonores ;
Binaires complémentaires et facultatifs flvtool2 : (...)
Sur d’autres sites (9165)
-
fluent ffmpeg size output option not working
19 janvier 2017, par AshburySummary : I’m trying to limit output to 3mb,
.outputOptions('-fs 3000000')
isn’t working for me, the file is coming back with a size of119260428
or 119mb.Here is the code to try for yourself, all you need is a
test.mp3
large enough that the resultingtestoutput.ogg
is > 3mb :var ffmpeg = require("fluent-ffmpeg");
var command = ffmpeg();
var convertToOGG = function(){
var fileName = 'test.mp3'
ffmpeg.ffprobe(fileName, function(err, metadata) {
command
.input(fileName)
.inputFormat("mp3")
.audioChannels(1)
.outputOptions('-fs', 3000000)
.output('testoutput.ogg')
.on("progress", function(progress) {
console.log("Processing: " + progress.timemark);
})
.on("error", function(err, stdout, stderr) {
console.log("Cannot process video: " + err.message);
})
.on("end", function(stdout, stderr) {
ffmpeg.ffprobe('testoutput.ogg', function(err,metadata){
if(metadata.format.size >= 3000000){
console.log("didn't work")
}
})
})
.run();
});
};
convertToOGG();Per the fluent-ffmpeg documentation you should be able to use a ffmpeg command in an output option :
outputOption()
This method allows passing any output-related option to ffmpeg. You can call it with a single argument to pass a single option, optionnaly
with a space-separated parameter :/* Single option */
ffmpeg('/path/to/file.avi').outputOptions('-someOption');and in FFMPEG’s documentation :
-fs limit_size (output) Set the file size limit, expressed in bytes. No further chunk of bytes is written after the limit is exceeded. The
size of the output file is slightly more than the requested file size.It’s giving me no errors, just seemingly ignoring the file size limit of 99mb and outputting a 119.3mb file.
Edit - Looks like
-fs 3000000
is working for mp3 to wav, but still wont do mp3 to ogg. This is the output from running the command in terminal :✗ ffmpeg -i test.mp3 -fs 3000000 testoutput.ogg
ffmpeg version 3.2.2 Copyright (c) 2000-2016 the FFmpeg developers
built with Apple LLVM version 6.1.0 (clang-602.0.49) (based on LLVM 3.6.0svn)
configuration: --prefix=/usr/local/Cellar/ffmpeg/3.2.2 --enable-shared --enable-pthreads --enable-gpl --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-libmp3lame --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxvid --enable-opencl --disable-lzma --enable-vda
libavutil 55. 34.100 / 55. 34.100
libavcodec 57. 64.101 / 57. 64.101
libavformat 57. 56.100 / 57. 56.100
libavdevice 57. 1.100 / 57. 1.100
libavfilter 6. 65.100 / 6. 65.100
libavresample 3. 1. 0 / 3. 1. 0
libswscale 4. 2.100 / 4. 2.100
libswresample 2. 3.100 / 2. 3.100
libpostproc 54. 1.100 / 54. 1.100
[mp3 @ 0x7fc6a4000000] Estimating duration from bitrate, this may be inaccurate
Input #0, mp3, from 'test.mp3':
Metadata:
lyrics-eng : xxx
title : xxx
artist : xxx
album_artist : xxx
album : xxx
genre : xxx
Duration: 03:27:28.74, start: 0.000000, bitrate: 128 kb/s
Stream #0:0: Audio: mp3, 44100 Hz, mono, s16p, 128 kb/s
Stream #0:1: Video: mjpeg, yuvj444p(pc, bt470bg/unknown/unknown), 540x360, 90k tbr, 90k tbn, 90k tbc
Metadata:
title : Array
comment : Cover (front)
[swscaler @ 0x7fc6a4808800] deprecated pixel format used, make sure you did set range correctly
[ogg @ 0x7fc6a3815800] Frame rate very high for a muxer not efficiently supporting it.
Please consider specifying a lower framerate, a different muxer or -vsync 2
Output #0, ogg, to 'testoutput.ogg':
Metadata:
lyrics-eng : xxx
title : xxx
artist : xxx
album_artist : xxx
album : xxx
genre : xxx
encoder : Lavf57.56.100
Stream #0:0: Video: theora (libtheora), yuv444p, 540x360, q=2-31, 200 kb/s, 90k fps, 90k tbn, 90k tbc
Metadata:
title : Array
DESCRIPTION : Cover (front)
encoder : Lavc57.64.101 libtheora
lyrics-eng : xxx
artist : xxx
ALBUMARTIST : xxx
album : xxx
genre : xxx
Stream #0:1: Audio: vorbis (libvorbis), 44100 Hz, mono, fltp
Metadata:
encoder : Lavc57.64.101 libvorbis
lyrics-eng : xxx
title : xxx
artist : xxx
ALBUMARTIST : xxx
album : xxx
genre : xxx
Stream mapping:
Stream #0:1 -> #0:0 (mjpeg (native) -> theora (libtheora))
Stream #0:0 -> #0:1 (mp3 (native) -> vorbis (libvorbis))
Press [q] to stop, [?] for help
frame= 1 fps=0.0 q=-0.0 Lsize= 116465kB time=03:27:28.71 bitrate= 76.6kbits/s speed=61.2x
video:9kB audio:114907kB subtitle:0kB other streams:0kB global headers:6kB muxing overhead: 1.347787% -
android - ffmpeg overlay videos not working properly
2 janvier 2017, par MickStWhat I’m trying to do : I have 2 videos (the first one is recorded in the app itself, the second was pre-recorded and it’s shorter than the first). I’m trying to overlay it with the following FFMpeg command :
finalCommand = new String[]{"-y",
"-i", vid1,
"-i", vid2,
"-i", aud1,
"-i", aud2,
"-strict", "experimental", "-filter_complex",
"[0:a] volume=0.2 [a8];"
+"[3:a] atrim=end="+String.valueOf(newTimePause)+" [a12];"
+"[3:a] atrim=start="+String.valueOf(newTimePause)+" [a14];"
+"[a14] adelay="+String.valueOf(newDelayInt)+"|"
+String.valueOf(newDelayInt)+" [a16];"
+ "[a8][a12][a16][2:a:0] amix=inputs=4 [a];"
+ "movie=" + watermark + " [watermark];"
+ "[0:v][watermark] overlay=main_w-overlay_w-10:main_h-overlay_h-10 [outv0];"
+ "[1] fifo, scale=iw/2.5:ih/2.5 [vid2];"
+ "[vid2]fifo, trim=end=80.5 [vid5];"
+ "[vid2] fifo, trim=start=80.5 [vid6];"
+ "[outv0][vid5] overlay=10:10:enable=\'between(t,0,84)\' [outv6];"
+ "[outv6][vid6] overlay=10:10:enable=\'between(t,84,101)\' [outv]",
"-map", "[outv]",
"-map", "[a]",
"-r", "30",
"-b",
"4000k",
"-vcodec", "mpeg4",
"-ab", "44100", "-ac", "2", "-ar", "44100",
IOUtils.getFINALdir(this)+"/finalvid.mp4"
};So : vid1 is an mp4 video recorded in the app, watermark is a png image that should be overlayed during all vid1, and vid2 is the one pre-recorded. And the difference in length between vid1 and vid2 depends on the user. So I need to split vid2 at 80.5 seconds into 2 pieces, then overlay the first piece of vid2 from the beginning of vid1 to the time user clicked the button (here it’s hardcoded as 84 for convenience, and I know that from 80.5 to 84 the last frame will remain overlaid - it’s ok), then overlay the second piece from this "84" till the end. (it’s almost the same for aud2 - the corresponding audio for vid2 - but aud2 works fine)
But with this piece of code it looks like it takes a lot of memory and lots of frames of overlaid vid2 just get lost - it just freezes. And the line
+ "[outv6][vid6] overlay=10:10:enable=\'between(t,84,101)\' [outv]",
ruins everything so that from 84 till the end nothing is finally overlaid including the watermark (why so ?)And the other problem is this is too slow. Idk how to export a video of 720p or 1080p and that it be not too slow, not be of a big file size and not stop with OOM (now it’s about 480p and takes about 50Mb - I want a larger resolution with a smaller size).
I think the whole command can be rewritten better, but how ? What am I doing wrong and how to fix it all ? Thanks in advance !
-
Old TV : ffmpeg-converted file not working
29 décembre 2016, par senseiwaI have an old Full-HD TV (Philips) that supports USB reading with some video formats. However, it just supports one audio stream (the first), so in case I have two with the first that is not english, I need to remove the first one. I am doing this via
ffmpeg
, but the TV cannot read the converted file, although they are identical (except for one audio track).The conversion command I am using is is
ffmpeg -i filename.IN -map 0:0 -map 0:2 -acodec copy -vcodec copy filename.OUT
to just copy the video/audio stream, but keeping only the second audio track. The original file is this one (output of
ffprobe
) and it works perfectly reproducing the video with the first audio track :Input #0, avi, from 'ORIG.avi':
Metadata:
encoder : X
Duration: 01:40:57.18, start: 0.000000, bitrate: 2695 kb/s
Stream #0:0: Video: mpeg4 (Advanced Simple Profile) (XVID / 0x44495658), yuv420p, 656x368 [SAR 1:1 DAR 41:23], 1914 kb/s, 23.98 fps, 23.98 tbr, 23.98 tbn, 23.98 tbc
Stream #0:1: Audio: ac3 ([0] [0][0] / 0x2000), 48000 Hz, 5.1(side), fltp, 384 kb/s
Stream #0:2: Audio: ac3 ([0] [0][0] / 0x2000), 48000 Hz, 5.1(side), fltp, 384 kb/sand the converted not working one is
Input #0, avi, from 'CONV.avi':
Metadata:
encoder : Lavf57.56.100
Duration: 01:40:57.18, start: 0.000000, bitrate: 2309 kb/s
Stream #0:0: Video: mpeg4 (Advanced Simple Profile) (XVID / 0x44495658), yuv420p, 656x368 [SAR 1:1 DAR 41:23], 1914 kb/s, 23.98 fps, 23.98 tbr, 23.98 tbn, 23.98 tbc
Stream #0:1: Audio: ac3 ([0] [0][0] / 0x2000), 48000 Hz, 5.1(side), fltp, 384 kb/sOn a PC, however, they both work.
The question is, how can I convert, keeping eventually just one audio track, in a format that my TV supports without losing quality ?
I do not have the list of supported codecs, but I have a list of videos that the TV is able to reproduce.