[MPlayer-users] Extract h.264 stream to switch container

Krzysztof Duchnowski amidk75 at gmail.com
Sat Mar 24 09:39:02 CET 2012


On 23.03.2012 19:23, Armelius Cameron wrote:
> Hello,
> I have .mov files with h264 video. I want to move this to MP4 or MKV container 
> but I don't want to re-encode the video. I am trying to use mplayer / mencoder 
> to extract the stream so that I can use MP4Box from gpac or mkvtools to add 
> the stream to the container, but I am having trouble figuring out how. 
> Is this possible at all ? How to do it ?


Last time I've checked (today), it worked that way:

> $ MP4Box -add bbc-blue_m1080p.mov bbc.mp4
> IsoMedia import - track ID 1 - Audio (SR 44100 - 2 channels)
> IsoMedia import - track ID 2 - Video (size 1920 x 1072)   
> Saving to bbc.mp4: 0.500 secs Interleaving



And you could check whatever GPAC recognizes streams in your file by:

> $ MP4Box -info bbc-blue_m1080p.mov
> * Movie Info *
> 	Timescale 600 - Duration 00:03:22.165
> 	Fragmented File no - 2 track(s)
> 	File suitable for progressive download (moov before mdat)
> 	File Brand qt   - version 537199360
> 	Created: GMT Fri May  4 18:32:15 2007
> 
> File has no MPEG4 IOD/OD
> 
> Track # 1 Info - TrackID 1 - TimeScale 44100 - Duration 00:03:22.176
> Media Info: Language "Undetermined" - Type "soun:mp4a" - 8707 samples
> MPEG-4 Config: Audio Stream - ObjectTypeIndication 0x40
> MPEG-4 Audio MPEG-4 Audio AAC LC - 2 Channel(s) - SampleRate 44100
> Self-synchronized
> 
> Track # 2 Info - TrackID 2 - TimeScale 600 - Duration 00:03:22.165
> Media Info: Language "Undetermined" - Type "vide:avc1" - 6065 samples
> Visual Track layout: x=0 y=0 width=1920 height=1072
> MPEG-4 Config: Visual Stream - ObjectTypeIndication 0x21
> AVC/H264 Video - Visual Size 1920 x 1072
> 	AVC Info: 1 SPS - 1 PPS - Profile Main @ Level 4.1
> 	NAL Unit length bits: 32
> Synchronized on stream 1



So extracting just a video stream would be:

> $ MP4Box -add bbc-blue_m1080p.mov#video h264.mp4
> IsoMedia import - track ID 2 - Video (size 1920 x 1072)
> Saving to h264.mp4: 0.500 secs Interleaving

-- 
Krzysztof 'DK75' Duchnowski
GetFirefox - http://www.getfirefox.net/
Konfiguracja UTF-8 dla czytników - http://evil.pl/pip/utf/


More information about the MPlayer-users mailing list