LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 02-18-2004, 02:56 AM   #1
Berng
Member
 
Registered: Dec 2003
Location: Siberia,Russia
Distribution: Basically RedHat
Posts: 34

Rep: Reputation: 15
MP3-files frame sizes


Could anybody help to understand, how mp3-encoder determine frame sizes (when packing music files), do their have some standart sizes and how i could determine this size?
Thanks a lot,
Oleg.
 
Old 02-18-2004, 06:42 AM   #2
PSIplus
Member
 
Registered: Feb 2004
Location: Vienna/Austria
Distribution: Debian Unstable
Posts: 36

Rep: Reputation: 15
Most mp3 de- and encoding libraries have functions for it. You don't have to do the low-level work then (otherwise you wouldn't require the lib ;-) )

If you want to encode, liblame is a good choice.
For decoding I use mpeglib...

If you just want to play audio-data, you can use the SDL or something like this:

Code:
pid_x=fork();
if(!pid_x)
{
	stdin=freopen("/dev/null","r+",stdin);
	stdout=freopen("/dev/null","w+",stdout);
	stderr=freopen("/dev/null","w+",stderr);
	execlp("/usr/bin/mpg123","/usr/bin/mpg123","/path/to/your/mp3/file.mp3",NULL);
	printf("Error: Unable to execute the player!\n");
	exit(1);
}
Easy but nice solution used in many apps :-)
 
  


Reply



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
For people how want to play WMA files without converting MP3 files waelaltaqi Linux - Software 15 11-17-2005 08:30 AM
Able to write files to MP3 player but no files written into actual device? olnex Linux - Hardware 0 11-11-2005 06:32 AM
Files sizes? hgnoel1980 Linux - General 2 05-17-2005 07:49 AM
calling a frame from another frame : JAVA randomx Programming 0 10-07-2004 02:49 PM
Finding files of particular sizes jISV Linux - General 1 04-30-2002 12:06 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 02:52 AM.

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
Open Source Consulting | Domain Registration