How to split a mkv(AVC+AAC) file to pure video and audio files by using gst-launch?

Mailing List SVR lists at svrinformatica.it
Thu Nov 24 23:43:19 PST 2011


Il 24/11/2011 13:53, Raymond18 ha scritto:
> Hi all,
>
> Can anyone help me to know how to split a mkv(AVC+AAC) file to pure video
> and audio files by using gst-launch-0.10?
>
> The information of the mkv file is as following,
>
> ----------------------------------------------
> General
> Unique ID                                :
> 194281003365095078203371305786156002599 (0x92292902E8CC2D8396BA1C4306EC2D27)
> Complete name                            : test.mkv
> Format                                   : Matroska
> Format version                           : Version 2
> File size                                : 432 MiB
> Duration                                 : 26mn 59s
> Overall bit rate                         : 2 237 Kbps
> Encoded date                             : UTC 2011-11-04 19:32:20
> Writing application                      : mkvmerge v5.0.1 ('Es ist Sommer')
> built on Oct  9 2011 11:55:43
> Writing library                          : libebml v1.2.2 + libmatroska
> v1.3.0
>
> Video
> ID                                       : 1
> Format                                   : AVC
> Format/Info                              : Advanced Video Codec
> Format profile                           : High at L3.1
> Format settings, CABAC                   : Yes
> Format settings, ReFrames                : 1 frame
> Format settings, GOP                     : M=1, N=30
> Codec ID                                 : V_MPEG4/ISO/AVC
> Duration                                 : 26mn 59s
> Width                                    : 1 280 pixels
> Height                                   : 720 pixels
> Display aspect ratio                     : 16:9
> Frame rate mode                          : Variable
> Frame rate                               : 30.303 fps
> Color space                              : YUV
> Chroma subsampling                       : 4:2:0
> Bit depth                                : 8 bits
> Scan type                                : Progressive
> Language                                 : Japanese
> Default                                  : Yes
> Forced                                   : No
>
> Audio
> ID                                       : 2
> Format                                   : AAC
> Format/Info                              : Advanced Audio Codec
> Format profile                           : LC
> Codec ID                                 : A_AAC
> Duration                                 : 26mn 59s
> Channel(s)                               : 2 channels
> Channel positions                        : Front: L R
> Sampling rate                            : 44.1 KHz
> Compression mode                         : Lossy
> Language                                 : Japanese
> Default                                  : Yes
> Forced                                   : No
>
> ----------------------------------------------
>
> And I want to split it to pure video and audio file by using gst-launch as
> following, (I made it by a GUI tool in Windows )
>
> ----------------------------------------------
> Complete name                            : /home/test_track1_jpn.h264
> Format                                   : AVC
> Format/Info                              : Advanced Video Codec
> File size                                : 402 MiB
>
> Video
> Format                                   : AVC
> Format/Info                              : Advanced Video Codec
> Format profile                           : High at L3.1
> Format settings, CABAC                   : Yes
> Format settings, ReFrames                : 1 frame
> Format settings, GOP                     : M=1, N=30
> Width                                    : 1 280 pixels
> Height                                   : 720 pixels
> Display aspect ratio                     : 16:9
> Frame rate mode                          : Variable
> Color space                              : YUV
> Chroma subsampling                       : 4:2:0
> Bit depth                                : 8 bits
> Scan type                                : Progressive
>
> ----------------------------------------------
>
> and
>
> ----------------------------------------------
> General
> Complete name                            : from_matro.aac
> Format                                   : ADTS
> Format/Info                              : Audio Data Transport Stream
> File size                                : 29.8 MiB
> Overall bit rate mode                    : Variable
>
> Audio
> Format                                   : AAC
> Format/Info                              : Advanced Audio Codec
> Format version                           : Version 4
> Format profile                           : LC
> Bit rate mode                            : Variable
> Channel(s)                               : 2 channels
> Channel positions                        : Front: L R
> Sampling rate                            : 44.1 KHz
> Compression mode                         : Lossy
> Stream size                              : 29.8 MiB (100%)
>
> ----------------------------------------------
>
>
> I try to use following comands, but they are useless, can somebody tell me
> the right pipeline I should use?
>
> # gst-launch-0.10 filesrc location=/home/test.mkv ! matroskademux name=d
> d.video_00 ! filesink location=from_matro.h264

try adding a parser, for example h264parse before filesink, I suggest to 
add a muxer too, for example:

gst-launch-0.10 filesrc location=/home/test.mkv ! matroskademux ! h264parse ! matroskamux ! filesink location=from_matro_h264.mkv



> # gst-launch-0.10 filesrc location=/home/test.mkv ! matroskademux name=d
> d.audio_00 ! filesink location=from_matro.aac

same as for the video, this time use aacparse,

Nicola

>
>
>
>
> --
> View this message in context: 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
> Sent from the GStreamer-devel mailing list archive at Nabble.com.
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>



More information about the gstreamer-devel mailing list