Split into ogg files
Tim-Philipp Müller
t.i.m at zen.co.uk
Fri Mar 25 12:38:24 UTC 2022
On Fri, 2022-03-25 at 10:01 +0000, Diogo Rodrigues via gstreamer-devel
wrote:
Hi,
> I would like to create a pipeline that takes in a single mp3 audio
> file and splits it into several 10-second vorbis/ogg files, but I'm
> having issues linking the elements.
>
> I have already made a similar pipeline that takes a single mp3 audio
> file and splits it into several 10-second mp3 files with Xing headers
> by using lamemp3enc instead of vorbisenc, and xingmux instead of
> oggmux. The mp3-to-mp3 pipeline works just fine, but the mp3-to-ogg
> is not doing so well, because splitmuxsink is not being able to link
> the muxer (vorbisenc) with the sink (oggmux+filesink).
Theoretically splitmuxsink should be able to do just that.
Unfortunately it looks like there's a bug in splitmuxsink that's
specific to Vorbis/Ogg (vorbisenc will output a few header packets
without a timestamp), so you get this:
gst-launch-1.0 uridecodebin uri=file:///path/to/foo.mp3 ! audioconvert
! vorbisenc ! mux.audio_%u splitmuxsink muxer-factory=oggmux name=mux
ERROR: from element /GstPipeline:pipeline0/GstSplitMuxSink:mux:
Timestamping error on input streams
Additional debug info:
../gst/multifile/gstsplitmuxsink.c(2594): handle_gathered_gop ():
/GstPipeline:pipeline0/GstSplitMuxSink:mux:
Queued GOP time is negative +99:99:99.999999999
Needs fixing I'm afraid, but it looks like you can work around it with
an identity element like this:
gst-launch-1.0 uridecodebin uri=file:///path/to/foo.mp3 ! audioconvert
! vorbisenc ! identity drop-buffer-flags=header ! mux.audio_%u
splitmuxsink muxer-factory=oggmux name=mux max-size-time=10000000000
location=file-%02u.ogg
Cheers
Tim
More information about the gstreamer-devel
mailing list