
Recherche avancée
Médias (1)
-
Bug de détection d’ogg
22 mars 2013, par
Mis à jour : Avril 2013
Langue : français
Type : Video
Autres articles (112)
-
MediaSPIP version 0.1 Beta
16 avril 2011, parMediaSPIP 0.1 beta est la première version de MediaSPIP décrétée comme "utilisable".
Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
Pour avoir une installation fonctionnelle, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...) -
MediaSPIP 0.1 Beta version
25 avril 2011, parMediaSPIP 0.1 beta is the first version of MediaSPIP proclaimed as "usable".
The zip file provided here only contains the sources of MediaSPIP in its standalone version.
To get a working installation, you must manually install all-software dependencies on the server.
If you want to use this archive for an installation in "farm mode", you will also need to proceed to other manual (...) -
HTML5 audio and video support
13 avril 2011, parMediaSPIP uses HTML5 video and audio tags to play multimedia files, taking advantage of the latest W3C innovations supported by modern browsers.
The MediaSPIP player used has been created specifically for MediaSPIP and can be easily adapted to fit in with a specific theme.
For older browsers the Flowplayer flash fallback is used.
MediaSPIP allows for media playback on major mobile platforms with the above (...)
Sur d’autres sites (14598)
-
avcodec/h264_refs : Rewrite code to make control flow clearer
26 mars 2024, par Andreas Rheinhardtavcodec/h264_refs : Rewrite code to make control flow clearer
While this change IMO makes the control flow clearer
for the human reader, it is especially important for
GCC : It erroneously believes that it is possible to
enter the SHORT2(UNUSED|LONG) cases without having
entered the preceding block that initializes pic,
frame_num, structure and j ; it would emit -Wmaybe-uninitialized
warnings for these variables if they were not pseudo-
initialized with av_uninit(). This patch allows to remove
the latter.Signed-off-by : Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
-
twinvq : move all bitstream reading into single place
4 août 2013, par Kostya Shishkovtwinvq : move all bitstream reading into single place
This is required for the future addition of VoxWare MetaSound decoder, for its
functions are mostly the same but bitstream reader is completely different
and bitstream format is slightly different too.Signed-off-by : Diego Biurrun <diego@biurrun.de>
-
Read portion of lines from child process in Rust (chunk of data)
2 octobre 2022, par Alexey VolodkoWhen I try to spawn a child ffmpeg process I use additonal flag
-progress
, next I use pipe to pass this progress output to the stderr.
So the whole command looks like :

ffmpeg -i ... -progress pipe:2 ...



Without
-progress
flag ffmepg outputs following line in stderr, probably once per second :

frame=46 46 fps=0.0 q=0.0 size= 0kB time=00:00:01.72 bitrate= 0.2kbits/s speed=2.69x



With
-progress
flag ffmepg outputs (multiple lines) in stderr, probably once per second :

frame=1 1 fps=0.0 q=0.0 size= 0kB time=00:00:00.19 bitrate= 2.0kbits/s speed=2.94x 
fps=0.00
stream_0_0_q=0.0
bitrate= 2.0kbits/s
total_size=48
out_time_us=192000
out_time_ms=192000
out_time=00:00:00.192000
dup_frames=0
drop_frames=0
speed=2.94x
progress=continue



The main puppose of using
-progress
flag is to calc percentage of completion by parsingout_time_ms
line and comparing to the whole duration.

Reading this chunk (portion of lines) is pretty simple in NodeJS :


const { spawn } = require('child_process');
const child = spawn('ffmpeg', [..., '-progress', 'pipe:2', ...]);

child.stderr.on('data', (data) => {
 // data will contain multiple lines, exactly one chunk
});



Reading this chunk (portion of lines) is pretty simple in Deno also :


const child = Deno.spawnChild("ffmpeg", {
 args: [..., '-progress', 'pipe:2', ...],
});
const stderrReader = child.stderr.getReader();
let readResult = await stderrReader.read();
while (readResult.done !== true) {
 readResult = await stderrReader.read();
 // readResult will contain multiple lines, exactly one chunk
}



I can't achieve the same in rust :


let mut command = Command::new("ffmpeg");
command.args(["...", "-progress", "pipe:2", "..."]);
let mut child = command
 .stdout(Stdio::piped())
 .stderr(Stdio::piped())
 .spawn()
 .unwrap();

let child_stderr = child.stderr.as_mut().expect("Unable to pipe stderr");
let mut reader = BufReader::new(child_stderr);
let mut buff = String::new();
while reader.read_line(&mut buff).expect("Unable to read chunk") > 0 {
 // buff will contain only on line
 buff.clear();
}



I am new in Rust. I can not detect what character signals end of chunk.


- 

- Runnig
read_line()
- will read only one line. - Runnig
read_to_end()
- will read the whole output until the end of process (EOF).






How can I read in Rust portion of lines that ffmpeg outputs probably once per second ?
How Node/Deno detects this "end of chunk" ?
Does rust have such event/signal also ?


- Runnig