LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 01-26-2012, 11:46 PM   #1
dEnDrOn
Member
 
Registered: Jun 2011
Location: oMNipre$ent
Distribution: fedora
Posts: 511
Blog Entries: 12

Rep: Reputation: Disabled
please teach me exact command to remove a part of audio


I use ffmpeg to convert my mp4 videos to mp3 using this command....

Code:
ffmpeg -i 'input file.mp4' -acodec libmp3lame -ab 64k -ar 44100 -ac 2 'output file.mp3'
there are some videos that have some starting dialogues and i need to remove audio for those particular seconds using ffmpeg.
How to do that ?
i want to keep same audio settings after cropping it.

Please show me what command do i use to do it...i can't figure it out using man page of ffmpeg
 
Old 01-27-2012, 12:13 AM   #2
troop
Member
 
Registered: Feb 2010
Distribution: gentoo, arch, fedora, freebsd
Posts: 379

Rep: Reputation: 96
ffmpeg -ss starttime -t totalseconds
 
Old 01-27-2012, 12:15 AM   #3
dEnDrOn
Member
 
Registered: Jun 2011
Location: oMNipre$ent
Distribution: fedora
Posts: 511
Blog Entries: 12

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by troop View Post
ffmpeg -ss starttime -t totalseconds
1) please quote the original format...if have to keep an audio from 20 seconds to 2min49 seconds
2) does it keeps the audio quality and bit rate same ?
 
Old 01-27-2012, 01:52 AM   #4
cascade9
Senior Member
 
Registered: Mar 2011
Location: Brisneyland
Distribution: Debian, aptosid
Posts: 3,753

Rep: Reputation: 934Reputation: 934Reputation: 934Reputation: 934Reputation: 934Reputation: 934Reputation: 934Reputation: 934
Quote:
Originally Posted by dEnDrOn View Post
2) does it keeps the audio quality and bit rate same ?
Impossible to keep the quality the same, even if you convert to the same bitrate.

Lossy codecs different the information they 'throw away' to reduce the filesize. AAC (the audio codec normally used in 'MP4' files) is a different codec to MP3, yeah, there will be audio quality loss.

If you really care about quality, MP4 isnt a very good choice, the audio is mostly about 128K/sec in MP4 files. A 128k/sec AAC file will sound better than a 128k/sec MP3 file, but neither are very good quality.
 
Old 01-27-2012, 01:54 AM   #5
dEnDrOn
Member
 
Registered: Jun 2011
Location: oMNipre$ent
Distribution: fedora
Posts: 511
Blog Entries: 12

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by cascade9 View Post
Impossible to keep the quality the same, even if you convert to the same bitrate.

Lossy codecs different the information they 'throw away' to reduce the filesize. AAC (the audio codec normally used in 'MP4' files) is a different codec to MP3, yeah, there will be audio quality loss.

If you really care about quality, MP4 isnt a very good choice, the audio is mostly about 128K/sec in MP4 files. A 128k/sec AAC file will sound better than a 128k/sec MP3 file, but neither are very good quality.
no...i mean audio quality as compared to the mp3 file i am inputting...
i'm not comparing it to the original mp4 file....i need the same quality after cropping the audio as it was before cropping it.
Can it be done ?
 
Old 01-27-2012, 05:29 AM   #6
dEnDrOn
Member
 
Registered: Jun 2011
Location: oMNipre$ent
Distribution: fedora
Posts: 511
Blog Entries: 12

Original Poster
Rep: Reputation: Disabled
so, i figured it out finally....

correct command is ...

Code:
ffmpeg -ss 30 -acodec copy -i inputfile.mp3 outputfile.mp3

it copies the same setting as of original file and crops first 30 seconds of it.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
script to exact audio from avi then move all mp3 ... air4time Linux - Newbie 4 10-20-2010 07:39 PM
[SOLVED] Remove exact matching word using sed kushalkoolwal Programming 2 08-20-2009 05:15 PM
command for grep the exact word nagendrar Linux - Newbie 7 04-29-2009 02:33 PM
Slack, Wine and Exact Audio Copy simonb1975uk Slackware 10 09-03-2007 05:42 AM
Exact Copy Audio Music CD Help Requested cscott Linux - Software 3 08-26-2004 06:21 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 08:30 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration