I want to convert a FLAC file to a MP3 (and Vorbis, in a second time) file.
These MP3/Vorbis streams are then transmitted, raw, to a second device that decodes them.
Depending on the quality of the transmission, I want to be able to change the bitrate on-the-fly.
The change must be gapless (hence the "in the PLAYING state" in the title).
The specific encoders are lamemp3enc
and vorbisenc
(and cannot be changed).
To my knowledge, changing the bitrate while playing is actually not possible with these codecs.
But I guess there are clean and simple ways to change the bitrate without introducing any gap in the stream: I'd like to learn about any of them.
(NB: I did write any, not all, I am not asking for the "best" way, I am not asking for a review, I just want something that works.)
Read through this ..
You will:
You can inspire yourself with the example from the link above.. However you are not doing any removing and adding new elements.. Do not forget to set it to NULL state as it will discard all internal states (well hopefully if its not buggy). Then You would just change the parameters with g_object_set
...
Also I never did this so you may also ask on IRC of #gstreamer at freenode if you are stuck or not sure.
HTH