LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-26-2015, 07:59 AM   #1
Don Graham
Member
 
Registered: Apr 2014
Location: Bangsaen Beach, Thailand
Distribution: Ubuntu 15.04 & Mint 17.1
Posts: 124

Rep: Reputation: Disabled
Question How to shrink a large audio ogg file


I would like to learn how to create a zip file. The word zip file is a Windows/Microsoft word. I do not know what word is used in Linux OS.
What I am trying to do is send a copy of an internet radio show. The show is two hours long. When I try to attach the audio file to an email. I am told the file is too large.
I have permission from the host of the radio show to make a copy and send it to a friend.
 
Old 03-26-2015, 08:17 AM   #2
maples
Member
 
Registered: Oct 2013
Location: IN, USA
Distribution: Arch, Debian Jessie
Posts: 811

Rep: Reputation: 264Reputation: 264Reputation: 264
If it's 2 hours, I doubt we'll be able to get it under that 25 MB limit. But, we can stilll try, although you're likely to lose sound quality. In most cases, you should still hear what the radio show host saying, it will just sound "wrong."

Try running
Code:
ffmpeg -i <input file> -c:a libvorbis -qscale 1 output.ogg
This will convert it to the smallest possible size using OGG (variable bitrate).

If that doesn't work, you can try resampling with a low sample rate. This will also severely decrease quality (make it sound like an old AM radio) but it should still be understandable.
Code:
ffmpeg -i <input file> -c:a libvorbis -qscale 1 -ar 8000 output.ogg
As far as compressing the resulting audio file, it depends on if the recipient has a Linux box or not. If (s)he does, then you can try various things such as .tar.gz, .tar.xz, and others. If they use Windows, you're likely stuck with plain zip, which (in my experience) doesn't help much.

Hope this helps!

Last edited by maples; 03-26-2015 at 08:19 AM.
 
Old 03-26-2015, 08:23 AM   #3
camorri
LQ Guru
 
Registered: Nov 2002
Location: Somewhere inside 9.9 million sq. km. Canada
Distribution: Slackware 14.1, 14.2
Posts: 5,123

Rep: Reputation: 495Reputation: 495Reputation: 495Reputation: 495Reputation: 495
Quote:
I would like to learn how to create a zip file. The word zip file is a Windows/Microsoft word. I do not know what word is used in Linux OS.
This is not much different in linux. There are several ways to compress a file. At the command line, gzip and gunzip, 'man gzip' at the command line will give you the syntax.

Ogg files are compressed. Attempting to compress it more probably will not reduce the file size by very much, if at all.

The problem you have run into is the restrictions mail systems place on file size. There are a least tow approaches you could try. One is to use the 'split' command to break the file into more manageable size, small enough your mail system can handle several smaller files. I have done this with text files, never tried it with audio files. The receiver would have to use the 'join' command to put things back together. You can see man pages for both commands, 'man split and man join'.

Another approach is to use a service like DropBox. You copy the file onto a remote server, the other user downloads the file. It takes some setting up, but once done, you can share all kinds of files with friends and family. Dropbox is only one service like this. See www.dropbox.com as an example. This gets around the mail restrictions on file size.
 
Old 03-26-2015, 09:14 AM   #4
seasons
Member
 
Registered: Dec 2014
Distribution: siduction
Posts: 221

Rep: Reputation: 54
If you don't mind the loss in quality, you could try encoding to HE-AACv2. It may be able to come in under 25MB.

Get fdkaac from: https://launchpad.net/~mc3man/+archi...fdkaac-encoder
Also, make sure vorbis-tools is installed:
Code:
sudo apt-get install vorbis-tools
Code:
oggdec example.ogg -o example.wav
fdkaac -p 29 -b 24000 example.wav
Now, you should have example.m4a file (hopefully) under 25MB
 
Old 03-26-2015, 10:23 AM   #5
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 8,652

Rep: Reputation: 2501Reputation: 2501Reputation: 2501Reputation: 2501Reputation: 2501Reputation: 2501Reputation: 2501Reputation: 2501Reputation: 2501Reputation: 2501Reputation: 2501
just an idea, you have probably downloaded that file, probably you can send the link to your friend. Or you can upload that file somewhere and just send the link again...
 
Old 03-26-2015, 10:32 AM   #6
maples
Member
 
Registered: Oct 2013
Location: IN, USA
Distribution: Arch, Debian Jessie
Posts: 811

Rep: Reputation: 264Reputation: 264Reputation: 264
Quote:
Originally Posted by pan64 View Post
just an idea, you have probably downloaded that file, probably you can send the link to your friend. Or you can upload that file somewhere and just send the link again...
That would be the best option, if you can do that.
 
Old 03-26-2015, 01:36 PM   #7
metaschima
Senior Member
 
Registered: Dec 2013
Distribution: Slackware
Posts: 1,982

Rep: Reputation: 491Reputation: 491Reputation: 491Reputation: 491Reputation: 491
Quote:
Originally Posted by pan64 View Post
just an idea, you have probably downloaded that file, probably you can send the link to your friend. Or you can upload that file somewhere and just send the link again...
I agree. You may want to put a password on the download tho, so that only the recipient can access it. Depending on the size of the file, you can also make a multi-part zip or 7zip archive and send multiple e-mails.
 
Old 03-26-2015, 04:57 PM   #8
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,020

Rep: Reputation: 2455Reputation: 2455Reputation: 2455Reputation: 2455Reputation: 2455Reputation: 2455Reputation: 2455Reputation: 2455Reputation: 2455Reputation: 2455Reputation: 2455
Quote:
I would like to learn how to create a zip file.
you do it THE EXACT SAME WAY AS ON WINDOWS!!!!!
r-click on the file and use the archive manager in that menu JUST LIKE ON WINDOWS!!!! B


Quote:
The word zip file is a Windows/Microsoft word
?? no !!!

Quote:
I do not know what word is used in Linux OS
THE EXACT SAME AS ON WINDOWS !!!! ZIP !!!
 
Old 03-26-2015, 10:18 PM   #9
Don Graham
Member
 
Registered: Apr 2014
Location: Bangsaen Beach, Thailand
Distribution: Ubuntu 15.04 & Mint 17.1
Posts: 124

Original Poster
Rep: Reputation: Disabled
Thanks guys for all the information. I have decided to use Dropbox, as there is no loss of sound quality and no size problem.
 
Old 03-27-2015, 03:32 AM   #10
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 8,652

Rep: Reputation: 2501Reputation: 2501Reputation: 2501Reputation: 2501Reputation: 2501Reputation: 2501Reputation: 2501Reputation: 2501Reputation: 2501Reputation: 2501Reputation: 2501
if you want to say thanks just press yes....
 
Old 03-27-2015, 12:34 PM   #11
Gerard.M.Frey
LQ Newbie
 
Registered: Mar 2015
Posts: 12

Rep: Reputation: Disabled
Quote:
Originally Posted by Don Graham View Post
Thanks guys for all the information. I have decided to use Dropbox, as there is no loss of sound quality and no size problem.
I see you decided to use dropbox to insure the audio quality. That's fine.

I do what to throw my in the reducing the audio file size. Ffmpeg has a -fs switch in which you tell ffmpeg what the final size should be.

So, for example, if you want the file size to be 25M and not a bit more, type this

Code:
ffmpeg -i <inputfile> -fs 25M <outputfile>
ffmpeg will calculate the required values to keep the file size close to 25M.

Last edited by Gerard.M.Frey; 03-27-2015 at 12:44 PM.
 
  


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
Shell Session Crashing when cat'ing a large file, tar'ing a large file, etc. newmanium2001 Linux - General 3 12-22-2012 10:32 PM
Saving Ratings in an MP3 or OGG Audio File in Banshee 2.4.0 wmeler Linux - Software 0 06-23-2012 10:33 AM
How to shrink the size of a very large IMAP maildir ? busquelo Linux - Server 8 08-08-2008 09:11 AM
HNYear , audio (mp3 , ogg ) editing ???? maheshadadrsh Linux - Software 1 01-01-2008 07:31 AM
Ogg/Vorbis - Is there a Audio Normalizer? bkeating Linux - Software 4 01-11-2003 12:03 AM


All times are GMT -5. The time now is 07:37 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