Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: Size of *.wav on disk 'v' on cd

by Khen1950fx (Canon)
on Nov 26, 2011 at 18:25 UTC ( [id://940195]=note: print w/replies, xml ) Need Help??


in reply to Size of *.wav on disk 'v' on cd

Instead of thinking in terms of on-cd size, I would concentrate on determining the total time in seconds and then get the total number of minutes involved. An audio cd can only record a certain number of minutes, (somewhere between 70+ to 84?). I tried getting the metadata and seconds using Audio::Scan and Audio::Wav::Read.
#!/usr/bin/perl -l use strict; use Audio::Wav; use Audio::Scan; use Data::Dumper::Concise; my $file = '/root/Desktop/explode.wav'; my $info = Audio::Scan->scan_info( $file ); print Dumper( $info ); my $wav = new Audio::Wav; my $read = $wav->read( $file ); my $audio_seconds = $read->length_seconds(); print "Total number of seconds: ", Dumper( $audio_seconds );

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://940195]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (5)
As of 2024-04-24 00:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found