On Tue, Apr 11, 2017 at 14:12:08 +1000, Timothy Lee wrote: > Capture is an input stream capture protocol that dumps the input stream to a > file. The default name of the output file is "capture.dat", but it can be > changed using the "capture_file" option.
Nice! > +Input stream capturing protocol. Probably worth pointing out more exactly what it does. Even I can only guess: Dumps the raw payload, in *addition* to demuxing the input as normal. > +A capture URL has the form: > +@example > +capture:@var{URL} That makes it an additional protocol prefix, right? So you can end up having two (or more?). "capture:file:/path/bla" (Confusing to me as a user at first sight, but ingenious if it works. Yes, I did test it.) > +For example, to capture the input stream as @file{stream.sav} during > playback: > +@example > +ffplay -capture_file stream.sav capture:@var{URL} So, is this the perfect replacement for "mplayer -dumpstream [-dumpfile capture.dat]"? :-) Probably also worth noting somewhere. If you go with Nicolas's suggestions, this comment is obsolete, but: > + c->fd = avpriv_open(c->capture_file, O_WRONLY|O_BINARY|O_TRUNC|O_CREAT, > 0666); > + if (c->fd < 0) > + av_log(h, AV_LOG_ERROR, "Failed to create capture file\n"); If you're going to print a message, please also evaluate errno, for the sake of the user. Moritz _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel