Please support VectorLinux!

Author Topic: looking for some bash scripting or something to do  (Read 8494 times)

M0E-lnx

  • Administrator
  • Vectorian
  • *****
  • Posts: 3208
Re: looking for some bash scripting or something to do
« Reply #15 on: December 19, 2007, 06:24:45 am »
I was thinking a gambas GUI using gb.gui so that it looks nice in GTK and QT.
not sure what all we need in the background... but it should be able to do the same things k3b does
burn cd and dvd images
burn data discs, audio and video
maybe (lots of work alert) process audio and video (convert mp3 -> wav for cd's)
I'm sure we can probabbly use lots of existing libraries for it... just need to make the right calls


Triarius Fidelis

  • Vecteloper
  • Vectorian
  • ****
  • Posts: 2399
  • Domine, exaudi vocem meam
    • my website
Re: looking for some bash scripting or something to do
« Reply #16 on: December 19, 2007, 06:35:03 am »
I was thinking a gambas GUI using gb.gui so that it looks nice in GTK and QT.
not sure what all we need in the background... but it should be able to do the same things k3b does
burn cd and dvd images
burn data discs, audio and video
maybe (lots of work alert) process audio and video (convert mp3 -> wav for cd's)

Ah, interesting, but how would you estimate the size of the uncompressed audio?

If you can make a front-end and show me screencaps, I can deduce a spec from it and write the back-end. Deal?
"Leatherface, you BITCH! Ho Chi Minh, hah hah hah!"

Formerly known as "Epic Fail Guy" and "Döden" in recent months

Joe1962

  • Administrator
  • Vectorian
  • *****
  • Posts: 2499
    • Joe1962's Website
Re: looking for some bash scripting or something to do
« Reply #17 on: December 19, 2007, 10:53:10 am »
Ah, interesting, but how would you estimate the size of the uncompressed audio?
No estimation involved, 74 mins = 650 MB. Actually, that's an aproximation, but the point is that it is a constant ratio once uncompressed. You need to take into account the silence between tracks though, unless using crossfade.
O'Neill (RE the Asgard): "Usually they ask nicely before they ignore us and do what they damn well please."
http://joe1962.bigbox.info
Running: VL 7 Std 64 + self-cooked XFCE-4.10

M0E-lnx

  • Administrator
  • Vectorian
  • *****
  • Posts: 3208
Re: looking for some bash scripting or something to do
« Reply #18 on: December 19, 2007, 01:14:12 pm »
So that can be easily done by looking at each file's size attributes...

easuter

  • Global Moderator
  • Vectorian
  • *****
  • Posts: 2160
Re: looking for some bash scripting or something to do
« Reply #19 on: December 19, 2007, 01:31:40 pm »
So that can be easily done by looking at each file's size attributes...


Yep. An mp3 file *should* have a predictable compression ratio at a given bit-rate. Higher bit rates mean the file will be larger.

Quote from wikipedia:

Quote
In digital multimedia, bit rate often refers to the number of bits used per unit of time to represent a continuous medium such as audio or video after source coding (data compression). The size of a multimedia file in byte is the product of the bit rate (in bit/s) and the length of the recording (in seconds), times eight. In case of streaming multimedia, this bit rate measure is the goodput that is required to avoid interrupts.

Joe1962

  • Administrator
  • Vectorian
  • *****
  • Posts: 2499
    • Joe1962's Website
Re: looking for some bash scripting or something to do
« Reply #20 on: December 19, 2007, 01:40:07 pm »
Forget about compressed file size and bitrate, etc... Just find out the sound length in seconds.
O'Neill (RE the Asgard): "Usually they ask nicely before they ignore us and do what they damn well please."
http://joe1962.bigbox.info
Running: VL 7 Std 64 + self-cooked XFCE-4.10

easuter

  • Global Moderator
  • Vectorian
  • *****
  • Posts: 2160
Re: looking for some bash scripting or something to do
« Reply #21 on: December 19, 2007, 02:00:51 pm »
Forget about compressed file size and bitrate, etc... Just find out the sound length in seconds.

Heh...the simplest solution is always the best  :-X

M0E-lnx

  • Administrator
  • Vectorian
  • *****
  • Posts: 3208
Re: looking for some bash scripting or something to do
« Reply #22 on: December 19, 2007, 02:06:36 pm »
Forget about compressed file size and bitrate, etc... Just find out the sound length in seconds.

Heh...the simplest solution is always the best  :-X

That could be right... IIRC, in .wav format 1sec of audio is around 10mb or something like that

Joe1962

  • Administrator
  • Vectorian
  • *****
  • Posts: 2499
    • Joe1962's Website
Re: looking for some bash scripting or something to do
« Reply #23 on: December 19, 2007, 02:15:32 pm »
IIRC, in .wav format 1sec of audio is around 10mb or something like that
Exactly. It's a constant, just have to google it up or something... ;)

Think about VBR files... that would be a sort of nightmare to calculate otherwise... ;D
O'Neill (RE the Asgard): "Usually they ask nicely before they ignore us and do what they damn well please."
http://joe1962.bigbox.info
Running: VL 7 Std 64 + self-cooked XFCE-4.10

Triarius Fidelis

  • Vecteloper
  • Vectorian
  • ****
  • Posts: 2399
  • Domine, exaudi vocem meam
    • my website
Re: looking for some bash scripting or something to do
« Reply #24 on: December 19, 2007, 06:21:32 pm »
IIRC, in .wav format 1sec of audio is around 10mb or something like that
Exactly. It's a constant, just have to google it up or something... ;)

Even for different bit rates?

Edit: BTW, until I have a spec, I won't be able to do anything. I don't even know where to start.
« Last Edit: December 19, 2007, 06:31:54 pm by hanumizzle »
"Leatherface, you BITCH! Ho Chi Minh, hah hah hah!"

Formerly known as "Epic Fail Guy" and "Döden" in recent months

Joe1962

  • Administrator
  • Vectorian
  • *****
  • Posts: 2499
    • Joe1962's Website
Re: looking for some bash scripting or something to do
« Reply #25 on: December 19, 2007, 07:05:35 pm »
Even for different bit rates?
There are no different bitrates, audioCD is standard 44.1 KHz stereo.
O'Neill (RE the Asgard): "Usually they ask nicely before they ignore us and do what they damn well please."
http://joe1962.bigbox.info
Running: VL 7 Std 64 + self-cooked XFCE-4.10

Dweeberkitty

  • Packager
  • Vectorian
  • ****
  • Posts: 836
    • Multimedia Bonus Disc
Re: looking for some bash scripting or something to do
« Reply #26 on: December 23, 2007, 05:27:59 pm »
Hanumizzle,

If you are looking for some scripting to do, could you help me with this? I had posted this a while back but nobody replied. It would be a great help with the MMBD development.

http://www.vectorlinux.com/forum2/index.php?topic=4667.0

Thanks!
Registered Linux User #443399
Desktop: Intel Pentium D 3.33Ghz, 320GB hard drive, 2 gigs DDR2 533mhz RAM, NVIDIA Geforce 7800 GS, X2GEN 22" widescreen monitor;
Laptop: Dell Mini 9, Intel Atom 1.6Ghz, 1GB ram
Multimedia Bonus Disc website: http://www.vectorlinuxsolutions.com/

Toe

  • Member
  • *
  • Posts: 76
Re: looking for some bash scripting or something to do
« Reply #27 on: December 23, 2007, 06:53:25 pm »
Even for different bit rates?
There are no different bitrates, audioCD is standard 44.1 KHz stereo.
Well, there is one part you're forgetting here.  There's two things that determine the size of one channel of uncompressed audio: the sample rate and the sample size, in bits.

The full equation is like this: Sample rate * sample size * number of channels = bits per second.

Joe1962

  • Administrator
  • Vectorian
  • *****
  • Posts: 2499
    • Joe1962's Website
Re: looking for some bash scripting or something to do
« Reply #28 on: December 23, 2007, 08:04:47 pm »
I know, but the only need for audio conversions in a burner app is from any compressed format to Red Book audio CD specs. Well, actually there are couple of other standards, but I don't think they are relevant, since I don't suppose they will play on normal equipment. Anyway, I finally took the time to look up the specs:

Quote
2-channel signed 16-bit PCM sampled at 44 100 Hz.
Bit rate = 44,100 samples/sec × 16 bit/sample × 2 channels = 1,378.125 kbit/s (10.09 MByte per minute)

Source: http://en.wikipedia.org/wiki/Red_Book_(audio_CD_standard)

If you want to know about the other standards: http://en.wikipedia.org/wiki/Audio_CD
O'Neill (RE the Asgard): "Usually they ask nicely before they ignore us and do what they damn well please."
http://joe1962.bigbox.info
Running: VL 7 Std 64 + self-cooked XFCE-4.10