Subject: pkg/24358: multimedia/mplayer-share, multiple problems with WinTV support
To: None <>
From: None <>
List: netbsd-bugs
Date: 02/08/2004 10:21:33
>Number:         24358
>Category:       pkg
>Synopsis:       multimedia/mplayer-share, multiple problems with WinTV support
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Feb 08 10:22:00 UTC 2004
>Originator:     Kai Puolamaki
>Release:        1.6.1
NetBSD winnie.localdomain 1.6.1 NetBSD 1.6.1 (WINNIE) #0: Sat Jan 31 12:28:48 EET 2004     root@winnie.localdomain:/usr/src/sys/arch/i386/compile/WINNIE i386

TV viewing and recording with mplayer/mencoder 1.0rc3 and Hauppauge
WinTV Express (Brooktree 878 based card) does not work in NetBSD. With
the help of Google I managed to make the mplayer to show TV programs,
but there is still a mysterious problems with recording. Specifically,
I had three separate problems, at least one of which I managed to

1. I was unable to view TV programs (solved)
2. Audio recording did not work (partially solved)
3. Mencoder stops recording after a random interval (unsolved)

These are also discussed in my mail to mplayer-users on 1 February 2004, including mencoder output:

More detailed discussion of the problems:

1. Mplayer only shows only one distorted frame when viewing a TV
program. The problem is discussed in FreeBSD Problem Report
ports/59946, see:

2. There are problems with recording and mencoder. Mencoder is unable
to capture the audio stream. The solution to this turned out to be
simple. Mencoder looks for audio device named /dev/dsp (given in
libmpdemux/tvi_bsdbt848.c). However, the name of the device in NetBSD
is /dev/sound. 

3. When I try to record a TV program with mencoder it seems to work
fine for a random time period (from 0.1s to couple of minutes). Then
the recording just stops. Sometimes there is a complaint of a "invalid
frame duration value", e.g.:

Pos:   2.0s     49f ( 0%)  25fps Trem:   0min   0mb  A-V:0.000
Invalid frame duration value (2.059/2.034 => -0.024). Defaulting to
0.055 sec.
^CPos:   2.4s    113f ( 0%)  23fps Trem:   0min   0mb  A-V:0.000

Initially the time and frame counters run normally. Then the time
counter stops permanently, the output AVI file stops growing and the
frame counter continues running. The resulting AVI file contains the
program only to the point where the time counter stopped. The stopping
seems to correlate with various system activity (saving a file or
loading a web page or something), the longest recording I managed to
make was something between one and two minutes.

The problem 1 is fixed by replacing
multimedia/mplayer-share/patches/patch-ae with the following patch
(derived from the FreeBSD PR):

I solved the problem 2 by making a symlink (ln -s sound
/dev/dsp). With the symlink the recording with mencoder seems to work, but with symlink mplayer shows no video image (without symlink there are no problems). Removing the symlink restores the video
image with mplayer. Apparently /dev/dsp and /dev/sound are
not totally compatible. Go figure...

I have no clue of a solution to the problem 3. The problem may be
NetBSD specific, or not. The closest thing to this I could find with Google is (I have no idea whether this relevant or not):