Page 1 of 1

Extracting audio from the middle of a video file

Posted: 13 Aug 2014 00:25
by aitte
Hi !

I'm trying to extract audio from a MP4 video using VLC on Windows. I tried several things and couldn't get them to work. I've seen some information on that topic on the wiki but couldn't make it work for my particular case. Would someone mind either giving me a step by step or the command line needed ?

As I said the video is a MP4. It lasts about 10 minutes. The audio I need is only a small part of it in the middle, e.g. it starts at 4 minutes and 4 seconds and ends at 5:15.

The format for the resulting audio file can be MP3 or anything, I mean I'm fine with the encoding used in the video file.

Thanks if you can help me figure it out, either through the GUI or the command line.

Re: Extracting audio from the middle of a video file

Posted: 13 Aug 2014 09:52
by Lotesdelere
It would be easier and faster to use a dedicated audio editor, such as Audacity with the FFmpeg library or Ocenaudio.

In the Middle

Posted: 13 Aug 2014 16:38
by Ludrax
As I said the video is a MP4. It lasts about 10 minutes. The audio I need is only a small part of it in the middle, e.g. it starts at 4 minutes and 4 seconds and ends at 5:15.
or record that segment(View-Advanced Controls) which later... can be converted using Media-Convert/Save :-|

Re: Extracting audio from the middle of a video file

Posted: 13 Aug 2014 17:56
by aitte
I have Mixcraft that could possibly do the trick but since I'm not that used to it, I went with Ludrax' idea.

Saving the required portion was a little tricky since it didn't want to start exactly as I instructed it too (I guess because VLC reads files per packet), but it didn't take long.

For some reason I just can't seem to save the sound to disk as a file though. I managed to make an item in the playlist that when played shows just what I want: Only sound is kept and the video was ditched. But for some reason it doesn't want to save to disk. I'm probably doing it wrong as I have done this a handful of times in the past, but nothing seems to work this time.

So I guess a quick step by step could serve or something... Sorry, I know these are annoying to write :roll:

Re: Extracting audio from the middle of a video file

Posted: 13 Aug 2014 19:45
by aitte
Yeah I can't get anything to work. Both OGG and WAV encapsulating fail. WAV, FLAC and "Audio MP3 (MP4)" save nothing to disk, and OGG saves a corrupt file that VLC can read correctly for a couple seconds.

All of those are played correctly to the end as diffused items on the playlist when I enable output stream displaying in the Convert options.

Stumped.

start/stop-time

Posted: 13 Aug 2014 22:04
by Ludrax
you can try nightly like in Transcode with cmd line duplicates image

Re: Extracting audio from the middle of a video file

Posted: 13 Aug 2014 22:48
by aitte
That sounded overkill, at this rate I thought I might as well spend the time on Mixcraft.

Fortunately there was a dumb solution: Disabling the video channel and using the record button, saving just the passage I wanted. I got a small sound file that is an MP4 with no video, that's good to me :)

Thanks guys for your suggestions.

I wish I could make VLC work properly but oh well. I think something changed since 2.0 or so and I can't save files from the interface like I used to, the record button is needed now.