LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
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
 
LinkBack Search this Thread
Old 12-04-2006, 06:34 AM   #1
unabia
LQ Newbie
 
Registered: Nov 2006
Posts: 12

Rep: Reputation: 0
Question get or calculate mp3 songs time


i am using FC5 and i have installed realplayer

i want to know if i have an mp3 file how can i calculate the time period of that song

because i have made a small program to call real player and play a song and i want to the real player to close when the song finishes

how can i do that

help
 
Old 12-04-2006, 06:47 AM   #2
vkmgeek
Member
 
Registered: Feb 2006
Location: Ahmedabad
Distribution: rhel5
Posts: 185
Blog Entries: 2

Rep: Reputation: 31
Real player must be showing time for that mp3 song.... or else from the bit rate and thw sze of file you can calculate time of the song....
 
Old 12-04-2006, 06:36 PM   #3
scm86
Member
 
Registered: Feb 2003
Location: Florida
Distribution: Fedora Core 5 2.6.16-1.2133_FC5smp
Posts: 96

Rep: Reputation: 15
From unit analysis, you have bits/second, and bytes, and want to get seconds, so multiply the bitrate by the number of bits in the file (convert bytes to bits), this leaves you with inverse seconds, (1/s), about useless, so take its inverse to get to seconds over 1, or just plain old seconds.

That said, can you borrow code from one of the players to ask the ID3 tag how long the file is? Does the file itself even know how long it is?

Scott
 
Old 12-04-2006, 07:29 PM   #4
unSpawn
Moderator
 
Registered: May 2001
Posts: 26,534
Blog Entries: 51

Rep: Reputation: 2604Reputation: 2604Reputation: 2604Reputation: 2604Reputation: 2604Reputation: 2604Reputation: 2604Reputation: 2604Reputation: 2604Reputation: 2604Reputation: 2604
realplay --quit "Quit when playback is completed"
 
  


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
I am not able to play Mp3 Songs In Red Hat 9,How To Play The Songs? vlovevj_patel Linux - General 10 03-23-2008 11:45 PM
how to play mp3 songs in rhel-4 santhosh tr Linux - Enterprise 8 10-27-2007 06:43 AM
how to mp3 songs from cd in fedora mueen Linux - Newbie 1 11-02-2006 04:03 PM
.mp3 songs alpeshprajapati Linux - Newbie 3 09-19-2005 09:09 AM
mp3 songs in fc2 kshatriyarules Linux - Newbie 2 10-12-2004 10:29 AM


All times are GMT -5. The time now is 11:42 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration