Friday, March 20, 2009

Splitting videos with mencoder

YouTube does not allow videos to be longer than 10 minutes. I really have the need to split videos... Googling for this issue brought me to MisterHowTo.com.

Splitting a video looks like this (first 6 minutes and 5 seconds):

$ mencoder -endpos 00:06:05 -ovc copy -oac copy leeuw-tuominen_0-2.AVI -o leeuw-tuominen_0-2_a.avi
MEncoder 1.0rc1-4.1.2 (C) 2000-2006 MPlayer Team
CPU: Intel(R) Core(TM)2 CPU T5500 @ 1.66GHz (Family: 6, Model: 15, Stepping: 2)
CPUflags: Type: 6 MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 1
Compiled for x86 CPU with extensions: MMX MMX2 3DNow 3DNowEx SSE SSE2

success: format: 0 data: 0x0 - 0x2e8da65c
AVI file format detected.
VIDEO: [MJPG] 640x480 24bpp 30.000 fps 9219.7 kbps (1125.4 kbyte/s)
[V] filefmt:3 fourcc:0x47504A4D size:640x480 fps:30.00 ftime:=0.0333
videocodec: framecopy (640x480 24bpp fourcc=47504a4d)
audiocodec: framecopy (format=1 chans=1 rate=16000 bits=8 B/s=16000 sample-1)
Writing header...
ODML: Aspect information not (yet?) available or unspecified, not writing vprp header.
Writing header...
ODML: Aspect information not (yet?) available or unspecified, not writing vprp header.
Writing index...51f (54%) 3343.82fps Trem: 0min 744mb A-V:0.033 [9219:128]
Writing header...
ODML: Aspect information not (yet?) available or unspecified, not writing vprp header.

Video stream: 9219.507 kbit/s (1152438 B/s) size: 420678432 bytes 365.033 secs 10951 frames

Audio stream: 128.000 kbit/s (16000 B/s) size: 5840000 bytes 365.000 secs


And the second part with offset 6 minutes 5 seconds:

$ mencoder -ss 00:06:05 -ovc copy -oac copy leeuw-tuominen_0-2.AVI -o leeuw-tuominen_0-2_b.avi
MEncoder 1.0rc1-4.1.2 (C) 2000-2006 MPlayer Team
CPU: Intel(R) Core(TM)2 CPU T5500 @ 1.66GHz (Family: 6, Model: 15, Stepping: 2)
CPUflags: Type: 6 MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 1
Compiled for x86 CPU with extensions: MMX MMX2 3DNow 3DNowEx SSE SSE2

success: format: 0 data: 0x0 - 0x2e8da65c
AVI file format detected.
VIDEO: [MJPG] 640x480 24bpp 30.000 fps 9219.7 kbps (1125.4 kbyte/s)
[V] filefmt:3 fourcc:0x47504A4D size:640x480 fps:30.00 ftime:=0.0333
==========================================================================
Opening audio decoder: [pcm] Uncompressed PCM audio decoder
AUDIO: 16000 Hz, 1 ch, u8, 128.0 kbit/100.00% (ratio: 16000->16000)
Selected audio codec: [pcm] afm: pcm (Uncompressed PCM)
==========================================================================
videocodec: framecopy (640x480 24bpp fourcc=47504a4d)
audiocodec: framecopy (format=1 chans=1 rate=16000 bits=8 B/s=16000 sample-1)
Writing header...
ODML: Aspect information not (yet?) available or unspecified, not writing vprp header.
Writing header...
ODML: Aspect information not (yet?) available or unspecified, not writing vprp header.
Writing index...90f (100%) 377.05fps Trem: 0min 337mb A-V:0.033 [9219:128]
Writing header...
ODML: Aspect information not (yet?) available or unspecified, not writing vprp header.

Video stream: 9219.688 kbit/s (1152460 B/s) size: 349195660 bytes 303.000 secs 9090 frames

Audio stream: 128.000 kbit/s (16000 B/s) size: 4848059 bytes 303.004 secs


After uploading these videos they will be available in their own playlist.

Squash for 2016

It would be great if squash becomes an Olympic sport in 2016!

More promotion at http://squash2016.info.