How to get a file frequency?

The place for "I can't figure out how to..." questions.

How to get a file frequency?

Postby tfevan » Fri May 15, 2015 5:39 pm

I run a file with demo.browse.php which source_sample_freq is 44.1 kHz. I wanna show it in my page. I use this code
Code: Select all
$ThisFileInfo['audio']['source_sample_freq']
but thats now working. I need to fix the code. Need help to fix.
tfevan
User
 
Posts: 8
Joined: Thu May 14, 2015 11:34 am

Re: How to get a file frequency?

Postby James Heinrich » Fri May 15, 2015 5:44 pm

It should be
Code: Select all
$ThisFileInfo['audio']['sample_rate']
(source_sample_freq) is stored by some MP3 encoders to keep a record of what sample rate the source file was before encoding, which may or may not be the same as the encoded file)
James Heinrich
getID3() v1 developer
 
Posts: 1411
Joined: Fri May 04, 2001 4:00 pm
Location: Northern Ontario, Canada

Re: How to get a file frequency?

Postby tfevan » Fri May 15, 2015 5:54 pm

It works. Thanks a lot for your help :)
tfevan
User
 
Posts: 8
Joined: Thu May 14, 2015 11:34 am

Re: How to get a file frequency?

Postby tfevan » Wed May 20, 2015 6:00 am

sample_rate default unit is 'kbps'. I wanna change it to 'hz'. How to change?
tfevan
User
 
Posts: 8
Joined: Thu May 14, 2015 11:34 am

Re: How to get a file frequency?

Postby James Heinrich » Wed May 20, 2015 10:26 am

Sample Rate is always Hertz. It cannot be measured in anything else. Why do you think it's kbps?
James Heinrich
getID3() v1 developer
 
Posts: 1411
Joined: Fri May 04, 2001 4:00 pm
Location: Northern Ontario, Canada


Return to Support 1.x

Who is online

Users browsing this forum: No registered users and 2 guests

cron