Hi,<div><br></div><div>You should decode the video/audio and then re-encode them to separate files.</div><div>the pipe may look like</div><div><br></div><div>gstlaunch filesrc ! demux ! video_decoder ! queue ! encode ! mux ! filesink</div>
<div><br></div><div>-Ashwini<br><br><div class="gmail_quote">On Thu, Nov 24, 2011 at 6:23 PM, Raymond18 <span dir="ltr"><<a href="mailto:yhung124@gmail.com">yhung124@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Hi all,<br>
<br>
Can anyone help me to know how to split a mkv(AVC+AAC) file to pure video<br>
and audio files by using gst-launch-0.10?<br>
<br>
The information of the mkv file is as following,<br>
<br>
----------------------------------------------<br>
General<br>
Unique ID :<br>
194281003365095078203371305786156002599 (0x92292902E8CC2D8396BA1C4306EC2D27)<br>
Complete name : test.mkv<br>
Format : Matroska<br>
Format version : Version 2<br>
File size : 432 MiB<br>
Duration : 26mn 59s<br>
Overall bit rate : 2 237 Kbps<br>
Encoded date : UTC 2011-11-04 19:32:20<br>
Writing application : mkvmerge v5.0.1 ('Es ist Sommer')<br>
built on Oct 9 2011 11:55:43<br>
Writing library : libebml v1.2.2 + libmatroska<br>
v1.3.0<br>
<br>
Video<br>
ID : 1<br>
Format : AVC<br>
Format/Info : Advanced Video Codec<br>
Format profile : High@L3.1<br>
Format settings, CABAC : Yes<br>
Format settings, ReFrames : 1 frame<br>
Format settings, GOP : M=1, N=30<br>
Codec ID : V_MPEG4/ISO/AVC<br>
Duration : 26mn 59s<br>
Width : 1 280 pixels<br>
Height : 720 pixels<br>
Display aspect ratio : 16:9<br>
Frame rate mode : Variable<br>
Frame rate : 30.303 fps<br>
Color space : YUV<br>
Chroma subsampling : 4:2:0<br>
Bit depth : 8 bits<br>
Scan type : Progressive<br>
Language : Japanese<br>
Default : Yes<br>
Forced : No<br>
<br>
Audio<br>
ID : 2<br>
Format : AAC<br>
Format/Info : Advanced Audio Codec<br>
Format profile : LC<br>
Codec ID : A_AAC<br>
Duration : 26mn 59s<br>
Channel(s) : 2 channels<br>
Channel positions : Front: L R<br>
Sampling rate : 44.1 KHz<br>
Compression mode : Lossy<br>
Language : Japanese<br>
Default : Yes<br>
Forced : No<br>
<br>
----------------------------------------------<br>
<br>
And I want to split it to pure video and audio file by using gst-launch as<br>
following, (I made it by a GUI tool in Windows )<br>
<br>
----------------------------------------------<br>
Complete name : /home/test_track1_jpn.h264<br>
Format : AVC<br>
Format/Info : Advanced Video Codec<br>
File size : 402 MiB<br>
<br>
Video<br>
Format : AVC<br>
Format/Info : Advanced Video Codec<br>
Format profile : High@L3.1<br>
Format settings, CABAC : Yes<br>
Format settings, ReFrames : 1 frame<br>
Format settings, GOP : M=1, N=30<br>
Width : 1 280 pixels<br>
Height : 720 pixels<br>
Display aspect ratio : 16:9<br>
Frame rate mode : Variable<br>
Color space : YUV<br>
Chroma subsampling : 4:2:0<br>
Bit depth : 8 bits<br>
Scan type : Progressive<br>
<br>
----------------------------------------------<br>
<br>
and<br>
<br>
----------------------------------------------<br>
General<br>
Complete name : from_matro.aac<br>
Format : ADTS<br>
Format/Info : Audio Data Transport Stream<br>
File size : 29.8 MiB<br>
Overall bit rate mode : Variable<br>
<br>
Audio<br>
Format : AAC<br>
Format/Info : Advanced Audio Codec<br>
Format version : Version 4<br>
Format profile : LC<br>
Bit rate mode : Variable<br>
Channel(s) : 2 channels<br>
Channel positions : Front: L R<br>
Sampling rate : 44.1 KHz<br>
Compression mode : Lossy<br>
Stream size : 29.8 MiB (100%)<br>
<br>
----------------------------------------------<br>
<br>
<br>
I try to use following comands, but they are useless, can somebody tell me<br>
the right pipeline I should use?<br>
<br>
# gst-launch-0.10 filesrc location=/home/test.mkv ! matroskademux name=d<br>
d.video_00 ! filesink location=from_matro.h264<br>
# gst-launch-0.10 filesrc location=/home/test.mkv ! matroskademux name=d<br>
d.audio_00 ! filesink location=from_matro.aac<br>
<span class="HOEnZb"><font color="#888888"><br>
<br>
<br>
<br>
--<br>
View this message in context: <a href="http://gstreamer-devel.966125.n4.nabble.com/How-to-split-a-mkv-AVC-AAC-file-to-pure-video-and-audio-files-by-using-gst-launch-tp4103663p4103663.html" target="_blank">http://gstreamer-devel.966125.n4.nabble.com/How-to-split-a-mkv-AVC-AAC-file-to-pure-video-and-audio-files-by-using-gst-launch-tp4103663p4103663.html</a><br>
Sent from the GStreamer-devel mailing list archive at Nabble.com.<br>
_______________________________________________<br>
gstreamer-devel mailing list<br>
<a href="mailto:gstreamer-devel@lists.freedesktop.org">gstreamer-devel@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" target="_blank">http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a><br>
</font></span></blockquote></div><br></div>