Extracting audio from the middle of a video file

Microsoft Windows specific usage questions
Forum rules
Please post only Windows specific questions in this forum category. If you don't know where to post, please read the different forums' rules. Thanks.
aitte
Cone that earned his stripes
Cone that earned his stripes
Posts: 310
Joined: 28 Feb 2012 00:26

Extracting audio from the middle of a video file

Postby aitte » 13 Aug 2014 00:25

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.

Lotesdelere
Cone Master
Cone Master
Posts: 9846
Joined: 08 Sep 2006 04:39
Location: Europe

Re: Extracting audio from the middle of a video file

Postby Lotesdelere » 13 Aug 2014 09:52

It would be easier and faster to use a dedicated audio editor, such as Audacity with the FFmpeg library or Ocenaudio.

Ludrax
Big Cone-huna
Big Cone-huna
Posts: 568
Joined: 07 Jul 2010 14:28

In the Middle

Postby Ludrax » 13 Aug 2014 16:38

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 :-|
An' if ain't broke, then don't try to fix it...

aitte
Cone that earned his stripes
Cone that earned his stripes
Posts: 310
Joined: 28 Feb 2012 00:26

Re: Extracting audio from the middle of a video file

Postby aitte » 13 Aug 2014 17:56

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:

aitte
Cone that earned his stripes
Cone that earned his stripes
Posts: 310
Joined: 28 Feb 2012 00:26

Re: Extracting audio from the middle of a video file

Postby aitte » 13 Aug 2014 19:45

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.

Ludrax
Big Cone-huna
Big Cone-huna
Posts: 568
Joined: 07 Jul 2010 14:28

start/stop-time

Postby Ludrax » 13 Aug 2014 22:04

you can try nightly like in Transcode with cmd line duplicates image
An' if ain't broke, then don't try to fix it...

aitte
Cone that earned his stripes
Cone that earned his stripes
Posts: 310
Joined: 28 Feb 2012 00:26

Re: Extracting audio from the middle of a video file

Postby aitte » 13 Aug 2014 22:48

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.


Return to “VLC media player for Windows Troubleshooting”

Who is online

Users browsing this forum: No registered users and 13 guests