[theora] Add an intro to a theora file without re-encoding?
Michael Opdenacker
michael at free-electrons.com
Fri Jul 17 01:19:30 PDT 2009
On 07/17/2009 06:55 AM, yorn at gmx.net wrote:
> Hey Michael,
> How do you produce the "silence"? Sounds as if it was not a vorbis stream!?
>
> The message "We got a real problem ... " is a bit missleading ;-). This usually means the stream ends invalid (e.g. there is no End-Of-File indicator or a packet is corrupt because it is read from a livestream etc). oggCat tries (mostly successfully) to create a valid stream also in such situations.
>
Here's how I produce this file now. I found a silence file on the
Internet (http://free-electrons.com/issues/oggcat-jul17-2009/silence.wav
about 1 minute long), and I convert it to vorbis with the same bitrate
and sample rate as my main video:
oggenc --managed --bitrate=112 --resample 48000 silence.wav
Here's the result:
http://free-electrons.com/issues/oggcat-jul17-2009/silence.ogg
Now, I want to cut it to 6 seconds (that's the duration of my video intro):
oggCut -i silence.ogg -o silence6s.ogg -e 6000
However, the new file is shorter than 6s! (see
http://free-electrons.com/issues/oggcat-jul17-2009/silence6s.ogg)
> ogginfo silence6s.ogg
Processing file "silence6s.ogg"...
New logical stream (#1, serial: 476dbad9): type vorbis
Vorbis headers parsed for stream 1, information follows...
Version: 0
Vendor: Xiph.Org libVorbis I 20070622 (1.2.0)
Channels: 2
Rate: 48000
Nominal bitrate: 112.000000 kb/s
Upper bitrate not set
Lower bitrate not set
Vorbis stream 1:
Total data length: 537 bytes
Playback length: 0m:05.387s
Average bitrate: 0.797327 kb/s
Logical stream 1 ended
That's weird: even if I use "-s 10000", I still get this 5.387s lenght.
The input silence.ogg file looked good though:
> ogginfo silence.ogg
Processing file "silence.ogg"...
New logical stream (#1, serial: 628dbaa3): type vorbis
Vorbis headers parsed for stream 1, information follows...
Version: 0
Vendor: Xiph.Org libVorbis I 20070622 (1.2.0)
Channels: 2
Rate: 48000
Nominal bitrate: 112.000000 kb/s
Upper bitrate not set
Lower bitrate not set
Vorbis stream 1:
Total data length: 5952 bytes
Playback length: 0m:59.999s
Average bitrate: 0.793600 kb/s
Logical stream 1 ended
Any idea why?
> I have a small program to create silence (in wave). I then use oggenc with the same parameters as from the subsequent audio stream and I have had no problems. I've used that method for my video tutorial.
>
Is this program available somewhere? I'd love to try it too.
Many thanks for your help.
Cheers,
Michael.
--
Michael Opdenacker, Free Electrons
Kernel, drivers and embedded Linux development,
consulting, training and support.
http://free-electrons.com
+ 33 621 604 642
More information about the theora
mailing list