[MEncoder-users] Have Not Been Able to Use mencoder on Hauppauge 1950 Output (-oac copy -ovc copy)

Nicholas Oleksinski noleksin at gmail.com
Sun Feb 27 19:47:30 CET 2011


Hi:
I'm trying to use the composite inputs of my Hauppauge 1950 to convert some
VHS to digital video, and from here I'd like to make clips and such that I
can eventually make into a DVD with titles, chapters, etc.
The OS version I'm using is Ubuntu Linux 10.04.  Once I set up the composite
inputs I just do this:

cat /dev/video0 > capture.mpg

When playing this stream live (using vlc pvr:///dev/video0) it shows the
following stats for the stream:

Stream 0:
  Type: Video
  Codec: MPEG-1/2 Video (mpgv)
  Resolution: 720x480
  Frame rate: 59.940059
Stream 1
  Type: Audio
  Codec: MPEG Audio layer 1/2/3 (mpga)
  Channels: Stereo
  Sample rate: 48000 Hz
  Bitrate: 224 kb/s

I guess I don't really get the container format from this, but I'm guessing
it's MPEG-2 maybe?
Other videos that I capture, for instance from TiVo, can be clipped using a
command like this:

mencoder video.mpg -of lavf -lavfopts format=mp4 -ovc copy -oac copy -o
clip_2_27_13_27.mp4 -ss 3421 -endpos 570

But, when I use mencoder in the same way here I get an exit:

mencoder tuner_capture_2_27_13_14.mpg -of lavf -lavfopts format=mp4 -ovc
copy -oac copy -o clip_2_27_13_35.mp4 -ss 0

MEncoder SVN-r32760-4.4.3 (C) 2000-2010 MPlayer Team
success: format: 0  data: 0x0 - 0x399c000
MPEG-PS file format detected.
VIDEO:  MPEG2  720x480  (aspect 2)  29.970 fps  10000.0 kbps (1250.0
kbyte/s)
[V] filefmt:2  fourcc:0x10000002  size:720x480  fps:29.970  ftime:=0.0334
==========================================================================
Opening audio decoder: [mp3lib] MPEG layer-2, layer-3
AUDIO: 48000 Hz, 2 ch, s16le, 224.0 kbit/14.58% (ratio: 28000->192000)
Selected audio codec: [mp3] afm: mp3lib (mp3lib MPEG layer-2, layer-3)
==========================================================================
** MUXER_LAVF
*****************************************************************
REMEMBER: MEncoder's libavformat muxing is presently broken and can generate
INCORRECT files in the presence of B-frames. Moreover, due to bugs MPlayer
will play these INCORRECT files as if nothing were wrong!
*******************************************************************************
OK, exit.
videocodec: framecopy (720x480 24bpp fourcc=10000002)
audiocodec: framecopy (format=50 chans=2 rate=48000 bits=16 B/s=28000
sample-1)
VIDEO CODEC ID: 2
AUDIO CODEC ID: 15000, TAG: 0
Writing header...
[mp4 @ 0xaf6bf30] Codec for stream 0 does not use global headers but
container format requires global headers
[mp4 @ 0xaf6bf30] Codec for stream 1 does not use global headers but
container format requires global headers
[mp4 @ 0xaf6bf30] track 1: codec frame size is not set


I guess if I understood a little more about global headers and why they
exist in the TiVo file but not the Hauppage file, I'd be better able to
figure this out.
Anyway, I'm trying to come up with a solution that will work with both file
types and does the minimum of video and audio stream reprocessing for
frames, bitrate, etc.  I want to leave that kind of processing work to the
DVD programs.
I have also not been able to successfully use the mpeg or other container
options in -of lavf.  Maybe someone has a recommendation on a reliable
container and related options that would let me use -oac copy and -ovc copy?
I know this is probably an easy problem to solve.  I mean it's not like this
is an H.264 stream or anything like that.
Thanks!

-Nick

P.S. Here is output from the TiVo run (which works):

MEncoder SVN-r32760-4.4.3 (C) 2000-2010 MPlayer Team
success: format: 0  data: 0x0 - 0xb3a4745b
MPEG-PS file format detected.
VIDEO:  MPEG2  480x480  (aspect 2)  29.970 fps  9000.0 kbps (1125.0 kbyte/s)
[V] filefmt:2  fourcc:0x10000002  size:480x480  fps:29.970  ftime:=0.0334
==========================================================================
Opening audio decoder: [mp3lib] MPEG layer-2, layer-3
AUDIO: 48000 Hz, 2 ch, s16le, 192.0 kbit/12.50% (ratio: 24000->192000)
Selected audio codec: [mp3] afm: mp3lib (mp3lib MPEG layer-2, layer-3)
==========================================================================
** MUXER_LAVF
*****************************************************************
REMEMBER: MEncoder's libavformat muxing is presently broken and can generate
INCORRECT files in the presence of B-frames. Moreover, due to bugs MPlayer
will play these INCORRECT files as if nothing were wrong!
*******************************************************************************
OK, exit.
videocodec: framecopy (480x480 24bpp fourcc=10000002)
audiocodec: framecopy (format=50 chans=2 rate=48000 bits=16 B/s=24000
sample-1)
VIDEO CODEC ID: 2
AUDIO CODEC ID: 15000, TAG: 0
Writing header...
[mp4 @ 0x95af340] Codec for stream 0 does not use global headers but
container format requires global headers
[mp4 @ 0x95af340] Codec for stream 1 does not use global headers but
container format requires global headers
Pos:   0.7s     22f (85%)  0.00fps Trem:   0min   0mb  A-V:0.070 [0:192]

Skipping frame!
Pos:   1.0s     32f (85%)  0.00fps Trem:   0min   0mb  A-V:0.070 [4235:192]

Skipping frame!
Pos:   1.3s     42f (85%)  0.00fps Trem:   0min   0mb  A-V:0.070 [4355:192]

Skipping frame!
Pos:   1.8s     59f (85%)  0.00fps Trem:   0min   1mb  A-V:0.067 [4648:192]

Skipping frame!
Pos: 570.0s  17087f (99%) 733.82fps Trem:   0min 409mb  A-V:0.049
[5819:192]]
Writing index...

Video stream: 5819.387 kbit/s  (727423 B/s)  size: 414633318 bytes  570.003
secs  17087 frames

Audio stream:  192.000 kbit/s  (24000 B/s)  size: 13680000 bytes  570.000
secs


More information about the MEncoder-users mailing list