Web lists-archives.com

Re: how to select part of old mp3 and create new one

On Thu, Feb 07, 2019 at 08:33:15AM +0000, mick crane wrote:
> On 2019-02-07 07:08, Long Wind wrote:
> >i want to copy part of old mp3 file and create a new oneat first, i
> >install lame, but it doesn't seem to have such abilityi try mencoder,
> >it doesn't eitherthen i try qmp3cut, it says "no valid header
> >found"though i can play the mp3 file and it's OK
> >what should i do next? Thanks!
> ffmpeg
> don't have exact syntax to hand

ffmpeg's man page is pretty complete, but pretty daunting too. Here's
a command line to help jump-start things (corrections/enhancements

  ffmpeg -i input.mp3 -ss 10 -t 20 -acodec mp3 output.mp3

This is assuming you want to have your result as .mp3 too (consider
a free codec like vorbis or flac, if you want lossless).

Here's a rundown of the above command line:

  -i input.mp3  -- the input file. Replace by "your" name

  -ss 10        -- the start time (in seconds). You can use a
                   duration in the hh:mm:ss.ffff format (cf.
                   man page ffmpeg-utils(1)

  -t 20         -- the duration (just leave it out if you want
                   copy all to the end). Format as above.

  -acodec mp3   -- the audio codec for output. See ffmpeg man
                   page for possibilities (audio & video codecs
                   have options of their own, lots of fun for
                   long winter afternoons :-)

  output.mp3    -- your desired output file name

-- t

Attachment: signature.asc
Description: Digital signature