Re: [SLUG] I wanna...

From: Daniel Holth (dholth@fastmail.fm)
Date: Sat Aug 16 2003 - 01:59:45 EDT


On Fri, 2003-08-15 at 22:56, Eben King wrote:
> I'm far from an expert but...
>
> If they're like MP3s, then the only way that I know of to combine them is
> to do something like:
>
> { decode $first_file ; decode $second_file ; } | encode > $combined_file
>
> but that involves another decode-encode cycle, which is a Bad Thing.

I think a benchmark is in order...

My machine is an AthlonXP 1600+ with 256 megs of ram. Assume I want to
combine Holst's Mars, the Bringer of War with Weird Al Yankovic's My
Bologna. This sums to about 9 1/2 minutes of audio.

Method A:
        time ogg123 -d raw -f - 01\ Mars\,_the_bringer_of_war.ogg
        ../Weird_Al_Yankovic/My_Bologna.07.ogg.ogg | oggenc -q3 -r - >
        /tmp/MarsBologna.ogg
        
        (encoding/decoding output)
        
        real 1m45.706s
        user 1m25.329s
        sys 0m3.423s
        
        File size: 7.1 megabytes

Method B:
        time cat 01\ Mars\,_the_bringer_of_war.ogg
        ../Weird_Al_Yankovic/My_Bologna.07.ogg.ogg >
        /tmp/MarsBolognaB.ogg
         
        real 0m0.167s
        user 0m0.004s
        sys 0m0.100s

        File size: 11 megabytes

As you can see, the second approach is about 632.97 times faster. The
resulting file is larger because I encode my ripped CDs at quality 5
instead of 3 [ripped with the excellent abcde]. The 'cat' approach also
doesn't degrade the quality of the output. Only you can decide which
way fits your needs!

- Daniel Holth

-----------------------------------------------------------------------
This list is provided as an unmoderated internet service by Networked
Knowledge Systems (NKS). Views and opinions expressed in messages
posted are those of the author and do not necessarily reflect the
official policy or position of NKS or any of its employees.



This archive was generated by hypermail 2.1.3 : Fri Aug 01 2014 - 17:26:21 EDT