Page 1 of 1

Extracting the audio track from a video faster

Posted: 23 Oct 2020 15:19
by Nico6687
Hello,

Is there a faster way to extract the audio from a video than playing the video and intercepting the PCM data in the audio play callback?
Basically, if I have a video which is 30 minutes long, how do I get the audio track without having to wait for 30 minutes?
For example, can I force the lib to send me the next audio buffer, then the next etc... or change the sample rate to be higher so I get more data per buffer?

(I am using libVLCSharp.WinForms in case it matters...)

Thank you!

Re: Extracting the audio track from a video faster

Posted: 26 Oct 2020 08:41
by mfkl
Basically, if I have a video which is 30 minutes long, how do I get the audio track without having to wait for 30 minutes?
Good question.. guess we need some specific docs on that.

Code: Select all

--sout-smem-time-sync, --no-sout-smem-time-sync Time Synchronized output (default enabled) Time Synchronisation option for output. If true, stream will render as usual, else it will be rendered as fast as possible.
from https://wiki.videolan.org/VLC_command-line_help

I've never tried this though.
(I am using libVLCSharp.WinForms in case it matters...)
It doesn't matter at all, libvlc is the underneath library used.