|
This post was updated on .
So far I have worked mostly by copying pieces of code from the internet and try them and keep what worked but I need a more wider and general understanding of video decoding and gstreamer.
I need a pipeline to decode the most common video containers and re-encode them into mp4 As far as I have understood so far on media encoding theory, this pseudo pipeline should work:
filesrc --> DEMUXER(matroskademux, qtdemux, ...) --> branch1 and branch2
branch1 (audio) --> PARSER (aacparse, mp3parse, ...) --> DECODER (faad, maad, ...) --> ENCODER --> (lamemp3enc) --> MERGE_BRANCH
branch2 (video) --> PARSER(h264parse, ..., ...) --> DECODER(ffdec_h264) --> ENCODER (x264enc) --> MERGE_BRANCH
MERGE_BRANCH (final branch) --> MUXER(mp4mux) --> filesink
----------------------------------------------------------------------------------------------------------------------
The point is: to correctly transform my audio and video I need
- a parser
- a decoder
- an encoder
... right?
At the end I can just merge everything into a unique mp4 file.
This must work perfectly for any video container format. All metadata must be preserved. The final files must be correctly readable and ready to be played and streamed.
Can you please correct any mistake I might have made? Am I missing any element, any piece of pipeline?
|