09-12-2008
calculating frame size of MPEG file
Read the BitRate, SampleRate and Padding (as value of one or zero) of the frame header and use the formula:
FrameSize = 144 * BitRate / SampleRate + Padding
[B]Example: BitRate = 128000, SampleRate=441000, Padding=0 ==> FrameSize=417 bytes
what does 144 corresponds to ?
Last edited by shashi; 09-12-2008 at 04:17 AM..
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello guys
I want to retrieve two data from a file, like this:
bash-2.03$ cat numtest
123456
123457
bash-2.03$ more ./test_num
#!/bin/bash
num1=
num2=
cnt=1
while read x
do
num${cnt}=$x
cnt=$(($cnt+1))
done <$1
echo $num1 "\n" $num2
But when i executed this script, error... (2 Replies)
Discussion started by: tpltp
2 Replies
2. Shell Programming and Scripting
I have a file with data extracted, and need to insert a header with a constant string, say: H|PayerDataExtract
if i use sed, i have to redirect the output to a seperate file like
sed ' sed commands' ExtractDataFile.dat > ExtractDataFileWithHeader.dat
the same is true for awk
and... (10 Replies)
Discussion started by: deepaktanna
10 Replies
3. UNIX for Advanced & Expert Users
How to write a shell script to retrieve datas from database after that this database are redirect to a excell sheet and then i got a mail that gives details about the database with the column name and data..
I m using oracle 9i...
Thanks,
Anup Das (2 Replies)
Discussion started by: anupdas
2 Replies
4. Shell Programming and Scripting
Hello, I have a lot of mp3 in a various directory. My goal is a command that find all mp3 file and move the files and directory where is the mp3 file to a destination folder.
Is it possible?
Thanks in advance (7 Replies)
Discussion started by: giangi007
7 Replies
5. Shell Programming and Scripting
Hi all,
I have one file with IDs
Q8NDM7
P0C1S8
Q8TF30
Q9BRP8
O00258
Q6AWC2
Q9ULE0
Q702N8
A4UGR9
Q13426
Q6P2D8
Q9ULM3
A8MXQ7
I want to compare ID file with another file which has complete information about these IDs and also about other IDs which are not in the above ID file. As... (10 Replies)
Discussion started by: kaav06
10 Replies
6. Shell Programming and Scripting
Hi, Great minds, I have some files, in fact header files, of CTD profiler, I tried a lot C programming, could not get output as I was expected, because my programming skills are very poor, finally, joined unix forum with the hope that, I may get what I want, from you people,
Here I have attached... (17 Replies)
Discussion started by: nex_asp
17 Replies
7. Shell Programming and Scripting
XYZNA0000778800Z
16123000012300321000000008000000000000000
16124000012300322000000007000000000000000
17234000012300323000000005000000000000000
17345000012300324000000004000000000000000
17456000012300325000000003000000000000000
9
XYZNA0000778900Z
16123000012300321000000008000000000000000... (8 Replies)
Discussion started by: later_troy
8 Replies
8. Shell Programming and Scripting
The below bash is a file validation check executed that will verify the correct header count of 10 and the correct data type in each field of the tab-delimited file. The key has the data type of each field in it. My real data has 58 headers in it but only the header and next row need to be... (6 Replies)
Discussion started by: cmccabe
6 Replies
9. UNIX for Beginners Questions & Answers
I am having trouble matching *two* strings from one file anywhere in a line of a second file, and could use some help getting this figured out. My preference would be to use grep for this because I would like to take advantage of its -A option. The latter is due to the fact that I would like both... (2 Replies)
Discussion started by: jvoot
2 Replies
10. Shell Programming and Scripting
I've been struggling with this one for quite a while and cannot seem to find a solution for this find/replace scenario. Perhaps I'm getting rusty.
I have a file that contains a number of metrics (exactly 3 fields per line) from a few appliances that are collected in parallel. To identify the... (3 Replies)
Discussion started by: verdepollo
3 Replies
LEARN ABOUT CENTOS
afgetframesize
AFGETFRAMESIZE(3) AFGETFRAMESIZE(3)
NAME
afGetFrameSize - calculate the frame size in bytes for an audio track
SYNOPSIS
#include <audiofile.h>
float afGetFrameSize (AFfilehandle file, int track, int expand3to4);
PARAMETERS
file is a valid AFfilehandle.
track is an integer which refers to a specific audio track in the file. At present no supported audio file format allows for more than one
audio track within a file, so track should always be AF_DEFAULT_TRACK.
expand3to4 is a boolean-valued integer indicating whether frame size calculation will treat 24-bit data as having a size of 3 bytes or 4
bytes.
DESCRIPTION
afGetFrameSize returns the number of bytes in a frame in a given audio track.
A sample frame consists of one or more samples. For a monaural track, a sample frame will always contain one sample. For a stereophonic
track, a sample frame will always contain two samples, one for the left channel and one for the right channel.
A non-zero value of expand3to4 should be used when calculating the frame size for storage in memory (since 24-bit audio data is presented
in memory as a 4-byte sign-extended integer), while a value of zero should be used for calculating storage on disk where no padding is
added. The parameter expand3to4 is ignored unless the specified audio track contains 24-bit audio data.
AUTHOR
Michael Pruett <michael@68k.org>
Audio File Library 0.3.6 03/06/2013 AFGETFRAMESIZE(3)