
Recherche avancée
Médias (2)
-
Valkaama DVD Label
4 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Image
-
Podcasting Legal guide
16 mai 2011, par
Mis à jour : Mai 2011
Langue : English
Type : Texte
Autres articles (61)
-
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 (...) -
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
Sur d’autres sites (14564)
-
arm : implement x264_predict_4x4_v_armv6
13 mars 2014, par Janne Grunau -
avfilter/vf_removegrain : replace qsort with AV_QSORT
25 octobre 2015, par Ganesh Ajjanagaddeavfilter/vf_removegrain : replace qsort with AV_QSORT
filter_slice calls qsort, so qsort is in a performance critical
position. AV_QSORT is substantially faster due to the inlining of the
comparison callback. Thus, the increase in performance is worth the
increase in binary size.Sample benchmark (x86-64, Haswell, GNU/Linux),
filter-removegrain-mode-02 (from FATE)
new :
24060 decicycles in qsort, 1 runs, 0 skips
15690 decicycles in qsort, 2 runs, 0 skips
9307 decicycles in qsort, 4 runs, 0 skips
5572 decicycles in qsort, 8 runs, 0 skips
3485 decicycles in qsort, 16 runs, 0 skips
2517 decicycles in qsort, 32 runs, 0 skips
1979 decicycles in qsort, 64 runs, 0 skips
1911 decicycles in qsort, 128 runs, 0 skips
1568 decicycles in qsort, 256 runs, 0 skips
1596 decicycles in qsort, 512 runs, 0 skips
1614 decicycles in qsort, 1024 runs, 0 skips
1874 decicycles in qsort, 2046 runs, 2 skips
2186 decicycles in qsort, 4094 runs, 2 skipsold :
246960 decicycles in qsort, 1 runs, 0 skips
135765 decicycles in qsort, 2 runs, 0 skips
70920 decicycles in qsort, 4 runs, 0 skips
37710 decicycles in qsort, 8 runs, 0 skips
20831 decicycles in qsort, 16 runs, 0 skips
12225 decicycles in qsort, 32 runs, 0 skips
8083 decicycles in qsort, 64 runs, 0 skips
6270 decicycles in qsort, 128 runs, 0 skips
5321 decicycles in qsort, 256 runs, 0 skips
4860 decicycles in qsort, 512 runs, 0 skips
4424 decicycles in qsort, 1024 runs, 0 skips
4191 decicycles in qsort, 2046 runs, 2 skips
4934 decicycles in qsort, 4094 runs, 2 skipsReviewed-by : Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by : Ganesh Ajjanagadde <gajjanagadde@gmail.com> -
Stop encoding a video from piped video and directshow audio data
9 avril 2023, par obscureVia node.js I'm spawning a FFmpeg process which generates a video using jpeg images received from a node.js stream. Additionally it records audio from a directshow device.


const child = require("child_process");
const stream = require("stream");
let inputStream = new stream.PassThrough();
let ffmpeg = child.spawn("ffmpeg.exe", [
 "-f", "image2pipe", "-r", "24", "-fflags", "nobuffer",
 "-i", "pipe:0",
 "-f", "dshow",
 "-sample_rate",
 "48000",
 "-i", 'audio="Microphone"',
 "-acodec",
 "pcm_s16le",
 "-ac", "2",
 "-ar", "48000",
 "-vcodec", "libx264",
 "-crf", "10",
 "-preset", "veryfast",
 "-framerate", "1",
 "output.mkv"
]);

inputStream.pipe(ffmpeg.stdin);



The problem is, if I later stop sending images down the pipe


inputStream.end();



to ultimately stop FFmpeg from encoding the video, it does not stop - I guess because it's still grabbing audio data from the directshow device.


After digging through the FFmpeg manual I've found the
-shortest
output options which should :



...Finish encoding when the shortest output stream ends...




So upon adding the option e.g.


...
 "-preset", "veryfast",
 "-framerate", "1",
 "-shortest"
 "output.mkv"
]);



it indeed stops encoding but it's happening too fast.


So a video worth 10 seconds of data just has 5 seconds of audio and from second 5 - 10 there's just silence. I assume it's happening because it doesn't drain the rest of the audio buffer before stopping.


How can I stop encoding the output from the video and the audio data, while keeping all the data up to the point I've triggered the 'stop' ?