Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs

Dashboard
Notifications
Mark all as read
Q&A

How do I cut out a section of audio from a larger one, with VLC?

+3
−0

How do I cut out/trim/split a section of audio (or video) from a larger one, with VLC?

I'm not trying to transcode, just extract a piece, ideally from the command-line.

Why does this post require moderator attention?
You might want to add some details to your flag.
Why should this post be closed?

0 comment threads

1 answer

+2
−0

The answer is pretty straightforward, just a few arguments:

nvlc -I dummy input_file.mp3 --start-time 30 --stop-time 35 --sout file/mp3:output_file.mp3 vlc://quit

where input_file.mp3 and output_file.mp3 are the input and output files, as would be expected. The --start-time and --stop-time arguments are in seconds (can be sub-second if desired) since the beginning of the file. So in this example, the resulting file will be just 5 seconds long. The -I dummy disables the UI, while the trailing vlc://quit avoids needing to force-quit it after it finishes the conversion.

You can listen to the file first to figure out the start and stop times.

Why does this post require moderator attention?
You might want to add some details to your flag.

0 comment threads

Sign up to answer this question »

This community is part of the Codidact network. We have other communities too — take a look!

You can also join us in chat!

Want to advertise this community? Use our templates!

Like what we're doing? Support us! Donate