webrtc icon indicating copy to clipboard operation
webrtc copied to clipboard

save-to-disk-h264 asks for arguments not explained in README.md

Open Meeshbhoombah opened this issue 3 years ago • 3 comments

The example has two required Command Line arguments (--video and --audio) which result in the creation of two files. I'm not sure how to get a working video format such that I can confirm the example works. The resulting files that are created do not appear to be immediately playable.

Was wondering how I might be able to play the resulting outputs and/or combine them into a singular playable format (e.g: MP4).

Meeshbhoombah avatar Sep 06 '22 15:09 Meeshbhoombah

Good catch on the arguments, could you send a PR to fix that?

You could directly write the data into a container format like MP4. The Writer implementations used in that example to require the destination being written to to be a file, it could be anything that implements Write e.g. a Vec<u8>. It should also be possible to use ffmpeg to combine the two files after the fact as an alternative

k0nserv avatar Sep 06 '22 17:09 k0nserv

If I pass file names with the requisite extension (i.e: .h264 for video, .ogg for audio) then the resulting files are playable with VLC.

Should I update the README, or should I refactor part of the example to force the file extension?

Either way, it does not appear that the resulting example will be identical to the Pion example. Is that a problem?

Meeshbhoombah avatar Sep 06 '22 21:09 Meeshbhoombah

I'd just suggest updating the README.md to pass the arguments with the appropriate extensions

k0nserv avatar Sep 07 '22 08:09 k0nserv