问题
The hardware on which we are working on doesnt support playing of mkv files. So i'm required to transcode Matroska (mkv) video filea to mp4 video file.
As I have understood from the material available online on transcoding,I'm required to do the following :
- separate out different streams of mkv file using matroskademux element.
- decode the audio and Video streams into raw format using available mkv decoder and
supply this data to the mp4 Muxer element and re-encode to required format.
Could anyone please tell me if I applying right approach? Any information/link on this would be very helpful.
vikram
回答1:
Depending on what is in the Matroska file you might not need to decode it at all, just remux.
I assume the video for instance is H264, so just remux that. Below is an example pipeline for gst-launch for remuxing a file with h264 and mp3.
gst-launch-0.10 -v filesrc location=$file \
! matroskademux name="demux" demux. ! h264parse ! queue \
! mp4mux name=mux ! filesink location=$file._out.mp4 demux. \
! mp3parse ! queue ! mux.`
You can also look at the Transmageddon transcoder (www.linuxrising.org) which should give you want you want.
来源:https://stackoverflow.com/questions/8412688/gstreamer-transcoding-matroska-video-to-mp4