Help - Search - Members - Calendar
Full Version: converting file with multiple chained streams?
Hydrogenaudio Forums > Lossy Audio Compression > Ogg Vorbis > Ogg Vorbis - General
ZYron
Hello...

is it possible to convert a file with multiple chained streams to a
normal Ogg without re encoding ? foobar got some problems with this file...


CODE
Processing file "(un)official FM4 Livestream.ogg"...

New logical stream (#1, serial: 0a728d2f): type vorbis
Vorbis headers parsed for stream 1, information follows...
Version: 0
Vendor: AO; aoTuV b2 [20040420]  (based on Xiph.Org's 1.0.1)
Channels: 2
Rate: 48000

Nominal bitrate: 160,003000 kb/s
Upper bitrate not set
Lower bitrate not set
User comments section follows...
      ARTIST=FM4
      TITLE=Livestream
Vorbis stream 1:
      Total data length: 322080 bytes
      Playback length: 0m:30.719s
      Average bitrate: 83,875000 kbps
Logical stream 1 ended
New logical stream (#2, serial: 1a812712): type vorbis
Vorbis headers parsed for stream 2, information follows...
Version: 0
Vendor: AO; aoTuV b2 [20040420]  (based on Xiph.Org's 1.0.1)
Channels: 2
Rate: 48000

Nominal bitrate: 160,003000 kb/s
Upper bitrate not set
Lower bitrate not set
User comments section follows...
      ARTIST=FM4
      TITLE=Livestream
Vorbis stream 2:
      Total data length: 521915 bytes
      Playback length: 0m:31.061s
      Average bitrate: 134,421789 kbps
Logical stream 2 ended
New logical stream (#3, serial: 1635506d): type vorbis
Vorbis headers parsed for stream 3, information follows...
Version: 0
Vendor: AO; aoTuV b2 [20040420]  (based on Xiph.Org's 1.0.1)
Channels: 2
Rate: 48000

Nominal bitrate: 160,003000 kb/s
Upper bitrate not set
Lower bitrate not set
User comments section follows...
      ARTIST=FM4
      TITLE=Livestream
Vorbis stream 3:
      Total data length: 516178 bytes
      Playback length: 0m:30.719s
      Average bitrate: 134,421354 kbps
Logical stream 3 ended
New logical stream (#4, serial: 40b5311e): type vorbis
Vorbis headers parsed for stream 4, information follows...
Version: 0
Vendor: AO; aoTuV b2 [20040420]  (based on Xiph.Org's 1.0.1)
Channels: 2
Rate: 48000

Nominal bitrate: 160,003000 kb/s
Upper bitrate not set
Lower bitrate not set
User comments section follows...
      ARTIST=FM4
      TITLE=Livestream


Thx ZYron
yong
QUOTE
  Hello...

is it possible to convert a file with multiple chained streams to a
normal Ogg without re encoding ? foobar got some problems with this file...


May be you should use Hex editor to "cut" it...

It's quite easy,
one ogg vorbis file header will contain one [OggS](case sensitive) at first of file and three or four [vorbis] words IIRC and they are very near, you just search the word [vorbis] with 3 or 4 time at the same screen, after a large jump search, there will be a next ogg vorbis file , and search back the [OggS] one time, then delete the word from [OggS] (please backup your vorbis file!!!) until end of file, and save as the file to 01.ogg.
Repeat the step of search and delete and you will be able to extract all the files! smile.gif

I recommend you use this Hex editor. smile.gif

Sorry,if my post containt language error... tongue.gif
ZYron
Hi yong,

Thx for the tip, but i don't want to cut the file apart. I need to join the Streams.

Ciao ZYron
yong
Hi ZYron,

Now i'm confuse... sweat.gif

Join the streams is easier than cut a file,
1. open the file with Hex editor, that you want to put it at the end of the stream,
2. Make sure the cursor is at the first word or hexadecimal number,
3. press ALT + F, and select insert, then select the file you want to join,
4. after insert all the file you want to join, then save.....

Easy right? hope that help. smile.gif
kalmark
Using the windows command line and typing
CODE
copy a.ogg+b.ogg+c.ogg chain.ogg
should do the same.
ZYron
Hello,

Sorry, have to sort out things a bit.

My ogg file is a saved stream of a web-radio Station. To get title
update working, the Broadcaster change the serial in the Stream every 30
Seconds. Looks like players need a change in serial to update title
information. The file is 3 hours long, so when i play this file in
foobar I got 360 playlist entry's and in Winamp I can't forward
or rewind with it. I don't want to cut the file apart nor join any ogg
files. I need a tool to make the serials in the file equal and
recalculate the CRC.

Thx for you're help

Ciao ZYron
yong
It seems no way to edit the Vorbis serail,
The only way is using fb2k to convert them to single audio file.. unsure.gif
oluv
may i ask which radio-station broadcasts in ogg?
ZYron
HI oluv

QUOTE (oluv @ Jan 20 2005, 10:12 AM)
may i ask which radio-station broadcasts in ogg?
*


FM4 ....

Cioa ZYron
krazy
I've got a similar problem to zyron.

I've got an album of ogg files, all of which have three streams.
How can I join the streams in each file without re-encoding, so that when I add a file to the PL in foobar, only one entry is shown?
OverPaw
QUOTE (krazy @ Jul 10 2005, 12:16 PM)
I've got a similar problem to zyron.

I've got an album of ogg files, all of which have three streams.
How can I join the streams in each file without re-encoding, so that when I add a file to the PL in foobar, only one entry is shown?
*

2All I have found a solution! Let's look at the examle. Suppose we have test.ogg containing 3 chained streams.

1. You need to save each stream to a separate file. Get oggsplit v0.1.0 from http://www.rarewares.org/files/ogg/oggsplit-0.1.0-1.0.1.zip
CODE
oggsplit --unchain test.ogg

test.c01.ogg, test.c02.ogg and test.c03.ogg will appear

2. Now the most interesting part. We will join these 3 files into one valid ogg file without any chained streams! Get OGMerger v0.9a5 from http://cyrius.bunkus.org/OGMerger_0.9a5.rar and vorbis dlls from http://www.rarewares.org/files/ogg/oggvorbis-dlls1.1.1.zip
For some reason OGMerger works correctly only with 2 input files, but this is not a big problem - we'll use it multiple times.
CODE
OGMerger test.c01.ogg test.c02.ogg -o merge12.ogg
OGMerger merge12.ogg test.c03.ogg -o merge123.ogg

Done! The result is in merge123.ogg

Sorry for my English. It is not my native language.
elicit ginger
QUOTE (OverPaw @ Jul 12 2005, 07:32 PM)
I have found a solution! Let's look at the examle. [...] Done! The result is in merge123.ogg
...and very likely that result will have duration slightly more than sum of its parts. I have similar problem (see http://www.hydrogenaudio.org/forums/index....showtopic=35265), and resulting soundtrack has desync of about 400 milliseconds blink.gif
QUOTE
Sorry for my English. It is not my native language.
Me too wink.gif
OverPaw
QUOTE (elicit ginger @ Jul 13 2005, 12:00 AM)
...and very likely that result will have duration slightly more than sum of its parts. I have similar problem (see http://www.hydrogenaudio.org/forums/index....showtopic=35265), and resulting soundtrack has desync of about 400 milliseconds blink.gif

Yes, this is a little disadvantage of my method. But I think that there is no other tool than OGMerger with similar purpose :-(

Merging of ogg files is a well known problem and it was discussed long before us http://forum.doom9.org/archive/index.php/t-21180.html The problem consists in widespread belief that copy /b is universal solution, but it isn't. Let's hope that developers will hear us and create some OggJoin utility. Until then, question you've asked stays open.

QUOTE (elicit ginger @ Jul 3 2005, 01:56 AM)
how can I paste Vorbis chained streams (vcut'ed precisely to within sample)  into one logical stream, with same precision? Or, how can I mux .OGG soundtrack with chained streams into OGM or MKV a/v container?
krazy
Thanks very much for your replies people!

I can use OverPaw's method for now. Hopefully a better solution will emerge soon. smile.gif
walla
I've exactly the same problem like krazy:
QUOTE (krazy @ Jul 10 2005, 10:16) *
I've got an album of ogg files, all of which have three streams.
How can I join the streams in each file without re-encoding, so that when I add a file to the PL in foobar, only one entry is shown?

Is any better solution for merging the chains available yet?
The method with oggsplit and OGMerger seems not to be optimal.
andixx
I have the same problem with the FM4-Stream. I rip a 700 MB ogg file that includes hundrets of 30 second long chained streams.

On Linux, i found a easy way to split an cat the Stream.

I do this on a Debian Based system. I don't know if it works on other platforms...

1. Download this binary of oggsplit: http://homepage.ntlworld.com/jfe1205/OggVo...0.1.0-1.0.1.zip
Don't wonder it has a .exe at the end, it is still a linux file. This was the key if i found that out because the oggsplit is no longer in the linux vorbis-tools package and it was hard to find a running binary.

2. Unzip and put the file in a Directory.

3. Add the Subdirectorys input and output to the directory.

4. Create the file myfm4cutter.sh an put the following source:

CODE
#/bin/bash

inputdir="input"
outputdir="output"
inputfile=$(ls -1 ./$inputdir)



echo "Schritt 1."
echo "Zerlege $inputfile"

./oggsplit.exe -c ./$inputdir/$inputfile > /dev/null

echo "Splitten beendet"
echo " "
echo "Schritt 2."
echo "Dateien Zusammenfügen"

files=$(ls -1v ./$inputdir/*.c*.*)

ogmcat -v -o ./$outputdir/$inputfile $files

echo "Fertig..."
echo " "
echo "Splitfiles löschen"
rm ./$inputdir/*.c*.*


5. chmod the script and oggsplit.

6. Be shure, the package ogmtools is installed.

7. Put only ONE File in the input Folder.

8. Start the myfm4cutter.sh and it works.

I hope this is an Helpful thing for some linux users they know how to work on the Shell.

Last: My English is soo bad crying.gif I always sleep in Shool at English heh

andixx
Saoshyant
QUOTE (andixx @ Apr 12 2008, 09:35) *
This was the key if i found that out because the oggsplit is no longer in the linux vorbis-tools package and it was hard to find a running binary.


oggsplit and oggmerge are part of ogg-tools, not vorbis-tools. Xiph does not officially provide binaries for these because ogg-tools is no longer maintained. If you want Linux binaries, I can compile them for you. Just give the word.

What you guys are looking for, by the way, is a package called oggz-tools (yes, with a "z"), as it's likely to have win32 binaries somewhere. oggz-tools has really cool tools to cut, split and merge Vorbis streams like oggzsplit, oggzchop, and oggzrip. Look into that.
andixx
Hi.

QUOTE (Saoshyant @ Apr 13 2008, 00:27) *
oggsplit and oggmerge are part of ogg-tools, not vorbis-tools. Xiph does not officially provide binaries for these because ogg-tools is no longer maintained. If you want Linux binaries, I can compile them for you. Just give the word.


I know, that is the problem.

QUOTE
What you guys are looking for, by the way, is a package called oggz-tools (yes, with a "z"), as it's likely to have win32 binaries somewhere. oggz-tools has really cool tools to cut, split and merge Vorbis streams like oggzsplit, oggzchop, and oggzrip. Look into that.


The oggzsplit in the oggz-tools package is not the same as the old oggsplit because there is no --unchain function. The only thing you can do with oggzsplit is to cut in small peaces of same size but not automaticaly found cutpoint or unchain the chained streams.
If I'm disunderstod, please show me the correct syntax to do the same as the old oggsplit do.

Finaly, in my distribution (Ubuntu Hardy Heron 8.04) is no oggzsplit. ?

The method i posted below works good for me.

I have some additional info for my last posting: If you cut and cat a large file, you must set the number of open files up to a higher number by 'ulimit -n XXXX' where XXXX is the number. Second: The oggsplit.exe only run if you have wine installes.

@Saoshyant: It would be nice if you can compile me linux binarys to run without wine.

andixx
fm4_rulez
Saoshyant
QUOTE (andixx @ Jun 7 2008, 13:04) *
The oggzsplit in the oggz-tools package is not the same as the old oggsplit


Yes, for that you want ogg chop. It's more advanced as far as I know. You can also try vcut from the vorbis-tools package.

QUOTE (andixx @ Jun 7 2008, 13:04) *
Finaly, in my distribution (Ubuntu Hardy Heron 8.04) is no oggzsplit. ?


sudo apt-get install oggz-tools

QUOTE (andixx @ Jun 7 2008, 13:04) *
It would be nice if you can compile me linux binarys to run without wine.


Happy to help. Don't forget to aid us promote Vorbis and Ogg in general by placing a link to Spread Open Media in your blog or whatever.
PatchWorKs
I used chained streams in the past to put whole albums on official bands websites.
To prevent the splitting (and to optimize the compression) now I prefer to rip into a unique WAV/CUE and after convertion to 32Khz/mono/Vorbis -q0 add a chapter for any song. This optimizes the TAGS management/duplication too.

The unique problem is to find a compatible audio player... FB2K don't support ogg chapters.

BTW now files are more "protected" to me...
LordWarlock
Oggscissors should work in this case, but it's a pain to make it work on Windows as it's a Python script and requires pyogg and pyvorbis (only source is available), you could probably compile it with Cygwin.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.