Tuesday, September 27, 2005

No dice

Mythtv upgrade successful, but lost audio on some recordings persists. Try kernel upgrade (with built-in hd3000 drivers) next.

Saturday, September 24, 2005

Upgrade mythtv in hopes of fixing lost audio

# yum install subversion

[root@myth mythtv]# svn co http://svn.mythtv.org/svn/branches/release-0-18-fixes/mythtv

"Checked out revision 7307."

Configure options:

[root@myth mythtv]# ./configure --help

Usage: configure [options]
Options: [defaults in brackets after descriptions]

Standard options:
--help print this message
--compile-type=CTYPE one of release, profile, debug [release]
--prefix=PREFIX install in PREFIX [/usr/local]
--disable-ccache disable compiler cache (ccache)
--disable-distcc disable distributed compilation (distcc)
Advanced compile options (experts only):
--extra-cflags=ECFLAGS add ECFLAGS to list of flags for C compile
--extra-cxxflags=ECXFLAGS add ECXXFLAGS to list of flags for C++ compile
--cpu=CPU only use instructions available on CPU [i686]
--tune=CPU tune instruction usage for a particular CPU [gene
ric]
--arch=CPU equivalent to "--cpu=CPU --tune=CPU"
--enable-proc-opt enable processor specific compilation
--disable-mmx disable mmx usage
--disable-altivec disable AltiVec usage
Advanced features (experts only):
--disable-audio-oss disable OSS audio support
--disable-audio-alsa disable ALSA audio support
--disable-audio-arts disable aRts audio support
--disable-audio-jack disable JACK audio support
--disable-lirc disable lirc support (Infrared Remotes)
--disable-joystick-menu disable joystick menu
--disable-firewire disable support for FireWire cable boxes
--disable-ivtv disable ivtv support (PVR-250, PVR-350)
--enable-dvb enable DVB support (must supply header directory)
--dvb-path=HDRLOC location of directory containing
'linux/dvb/frontend.h', not the
directory with frontend.h [/usr/src/linux-2.6.11-1.14_FC3/include]
--enable-dvb-eit enable DVB EIT support (--enable-dvb is required)
--disable-x11 disable X11 support
--disable-xrandr disable X11 resolution switching
--disable-xv disable XVideo (X11 video output accel.)
--enable-xvmc enable XvMC (Linux/BSD MPEG accel.)
--disable-xvmc-vld disable XvMC-VLD (VIA Epia MPEG accel.)
--enable-opengl-vsync enable OpenGL vsync method
--enable-directfb enable DirectFB (Linux non-X11 video)
--enable-directx enable DirectX (Microsoft video)
[root@myth mythtv]#


Run configure:

[root@myth mythtv]# ./configure --disable-lirc --disable-joystick-menu
# Basic Settings
Compile type release
Compiler cache no
DistCC no
Install prefix /usr/local
CPU x86 (athlon)
Big Endian no
MMX enabled yes
Vector Builtins no

# Input Support
Joystick menu no
lirc support no
ivtv support yes
FireWire support no
DVB support no [/usr/src/linux-2.6.11-1.14_FC3/include]

# Sound Output Support
OSS support yes
ALSA support yes
aRts support no
JACK support no

# Video Output Support
x11 support yes
xrandr support yes
xv support yes
XvMC support no
XvMC VLD support no
OpenGL vsync no
DirectFB no

Creating config.mak and config.h
[root@myth mythtv]#


***NOTE! I forgot to compile with DVB support (see below).

Run qmake and make:
$ qmake mythtv.pro
[make clean, if necessary to clear previous compile]
$ make

Install:
su
make install

nohup mythbackend > /tmp/mythbackend.log 2>&1 &

---

tail -f mythbackend.log
2005-09-24 17:59:40.468 New DB connection, total: 1
Starting up as the master server.
2005-09-24 17:59:40.569 New DB connection, total: 2
2005-09-24 17:59:40.646 ERROR: DVB Card configured on 0, but MythTV was not compiled
with DVB support. Please, recompile MythTV with DVB support
or remove the card from configuration and restart MythTV.
2005-09-24 17:59:40.649 ERROR: DVB Card configured on 1, but MythTV was not compiled
with DVB support. Please, recompile MythTV with DVB support
or remove the card from configuration and restart MythTV.
2005-09-24 17:59:40.650 New DB scheduler connection
2005-09-24 17:59:40.680 mythbackend version: 0.18.1.20050523-1 www.mythtv.org
2005-09-24 17:59:40.680 Enabled verbose msgs : important general
2005-09-24 17:59:42.663 Reschedule requested for id -1.
2005-09-24 17:59:43.600 Scheduled 145 items in 0.9 = 0.42 match + 0.52 place
2005-09-24 17:59:43.623 Recording starts soon, AUTO-Startup assumed
2005-09-24 17:59:43.626 Started recording "NBC Nightly News" on channel: 1039 on cardid:
1, sourceid 1
2005-09-24 17:59:50.683 New DB connection, total: 3
2005-09-24 18:00:02.682 Started recording "CBS Evening News" on channel: 1034 on cardid:
2, sourceid 1



---
Recompile with DVB support:

make clean

[root@myth mythtv]# ./configure --disable-lirc --disable-joystick-menu --enable-dvb
DVB location does not contain linux/dvb/frontend.h [/usr/src/linux-2.6.11-1.14_FC3/include]

Find frontend.h:
[root@myth tmp]# find /usr -name "frontend.*" -print
/usr/include/linux/dvb/frontend.h
[root@myth tmp]#

Configure again:

[root@myth mythtv]# ./configure --disable-lirc --disable-joystick-menu --enable-dvb --dvb-path=/usr/include
# Basic Settings
Compile type release
Compiler cache no
DistCC no
Install prefix /usr/local
CPU x86 (athlon)
Big Endian no
MMX enabled yes
Vector Builtins no

# Input Support
Joystick menu no
lirc support no
ivtv support yes
FireWire support no
DVB support yes [/usr/include]

# Sound Output Support
OSS support yes
ALSA support yes
aRts support no
JACK support no

# Video Output Support
x11 support yes
xrandr support yes
xv support yes
XvMC support no
XvMC VLD support no
OpenGL vsync no
DirectFB no

Creating config.mak and config.h

---
How did I get the dvb .h files? file timestamps are:

[root@myth dvb]# ls -l
total 52
-rw-r--r-- 1 root root 4605 May 18 11:28 audio.h
-rw-r--r-- 1 root root 3150 May 18 11:28 ca.h
-rw-r--r-- 1 root root 4227 May 18 11:28 dmx.h
-rw-r--r-- 1 root root 7194 May 18 11:28 frontend.h
-rw-r--r-- 1 root root 1598 May 18 11:28 net.h
-rw-r--r-- 1 root root 5937 May 18 11:28 osd.h
-rw-r--r-- 1 root root 1017 May 18 11:28 version.h
-rw-r--r-- 1 root root 6855 May 18 11:28 video.h

From http://www.linuxtv.org :
"The LinuxTV project develops and maintains the DVB driver subsystem which is included in the Linux 2.6.x kernel."

Ah ha, May 18th was kernel upgrade to 2.6.11 so got .h files when that happened.

---
make clean
qmake mythtv.pro
make
make install


nohup mythbackend > /tmp/mythbackend.log 2>&1 &

2005-09-24 18:56:07.925 New DB connection, total: 1
Starting up as the master server.
2005-09-24 18:56:07.937 New DB connection, total: 2
2005-09-24 18:56:07.944 DVB#0 DVB SI Table Parser Started
2005-09-24 18:56:07.945 DVB#0 Using DVB card 0, with frontend pcHDTV HD3000 HDTV.
2005-09-24 18:56:07.947 New DB connection, total: 3
2005-09-24 18:56:09.204 DVB#0 DVB signal cf9c | snr f927 | ber 0 | unc 0
2005-09-24 18:56:09.205 DVB#0 Status: LOCK.
2005-09-24 18:56:09.205 DVB#0 Multiplex Locked
2005-09-24 18:56:10.301 DVB#0 Successfully tuned to channel 11_1.
2005-09-24 18:56:10.308 DVB#1 DVB SI Table Parser Started
2005-09-24 18:56:10.308 DVB#1 Using DVB card 1, with frontend pcHDTV HD3000 HDTV.
2005-09-24 18:56:10.593 DVB#1 DVB signal 3999 | snr dedb | ber 0 | unc 0
2005-09-24 18:56:10.593 DVB#1 Status: LOCK.
2005-09-24 18:56:10.593 DVB#1 Multiplex Locked
2005-09-24 18:56:11.602 DVB#1 Successfully tuned to channel 11_1.
2005-09-24 18:56:11.606 New DB scheduler connection
2005-09-24 18:56:11.611 mythbackend version: 0.18.1.20050523-1 www.mythtv.org
2005-09-24 18:56:11.611 Enabled verbose msgs : important general
2005-09-24 18:56:13.612 Reschedule requested for id -1.
2005-09-24 18:56:13.999 Scheduled 142 items in 0.4 = 0.06 match + 0.33 place
2005-09-24 18:56:14.002 Recording starts soon, AUTO-Startup assumed
2005-09-24 18:56:14.005 Started recording "CBS 5 Eyewitness News at 6:30PM" on channel: 1
034 on cardid: 1, sourceid 1
2005-09-24 18:56:14.754 DVB#0 DVB signal b0e4 | snr f809 | ber 0 | unc 0
2005-09-24 18:56:14.755 DVB#0 Status: LOCK.
2005-09-24 18:56:14.755 DVB#0 Multiplex Locked
2005-09-24 18:56:15.745 DVB#0 Successfully tuned to channel 5_1.
2005-09-24 18:56:15.816 Changing from None to RecordingOnly
2005-09-24 18:56:15.865 DVB#0 Recorder: Card opened successfully (using PS mode).
2005-09-24 18:56:15.874 DVB#0 Data read from DMX - This is for debugging with transform.c
2005-09-24 19:00:00.002 Finished recording CBS 5 Eyewitness News at 6:30PM on channel: 10
34
2005-09-24 19:00:00.053 Changing from RecordingOnly to None
2005-09-24 19:00:00.062 Closing DVB recorder
2005-09-24 19:00:02.529 Started recording "The King of Queens" on channel: 1034 on cardid
: 1, sourceid 1
2005-09-24 19:00:02.680 Changing from None to RecordingOnly
2005-09-24 19:00:02.698 DVB#0 Recorder: Card opened successfully (using PS mode).
2005-09-24 19:00:02.703 DVB#0 Data read from DMX - This is for debugging with transform.c
2005-09-24 19:00:03.531 Reschedule requested for id 0.
2005-09-24 19:00:03.902 Scheduled 142 items in 0.4 = 0.00 match + 0.37 place

Friday, September 23, 2005

Use DVB drivers built-in kernel now, instead of 2.0 drivers

pchdtv.com :: View topic - pchdtv 3000, drivers 2.0, kernel 2.6.11.6 - Does this Work?: "I feel your pain. The problem is that the '2.0' drives are strickly short term solution (until the distributions upgrade to the latest kernel).

My suggestion would be to just dump the pcHDTV drivers in exchange for 'officially supported by the linux community' drivers. Meaning don't install the drivers from pcHDTV's website.

You have two choices if you want to use the drivers that are included in the linux kernel (and will be supported in the future):


1) Upgrade your dvb subsystem without upgrading your kernel. This option is not for the faint of heart. Directions are at http://www.xmission.com/~pchdtv/forum/viewtopic.php?p=3303#3303 .


2) Upgrade your kernel to 2.6.11-rc1 or higher (2.6.12-rc2 recommended). This is the recommended option.


There are many ways to upgrade your kernel. You can:


a) Grap an rpm of the latest kernel. Google will find your many sources for pre-compiled kernels for SuSE 9.2. For example, you can download the rpm for SuSE 9.2 kernel from http://ftp.gwdg.de/pub/linux/suse/apt/SuSE/9.2-i386/RPMS.kernel-of-the-day/ .

b) You can compile your kernel rpm. I have written directions for Fedora Core 3 at http://www.xmission.com/~pchdtv/forum/viewtopic.php?p=3661#3661 . You will have to modify the paths from 'redhat' to 'suse'. But that should get you started on the right path.


Bottom line: Try using the 'dvb' drivers that are included with the (latest) kernel and fully supported by linux software (such as Myhttv and freevo).

You will find life to be a lot less frustrating.

Hope this helps,
-HDTV Buff"

Tuesday, September 20, 2005

View VOB file with mplayer, xine

#!/bin/bash
mount -t iso9660 /dev/hdb /cdrom
mplayer p101.vob -fs -zoom -monitoraspect 16:9 -vo xv -ao alsa:device=digital2c -aid 128

---
XINE:
xine -pfhq --no-splash --verbose file://cdrom/foo.vob

Friday, September 16, 2005

NUV playback (worked on ibm thinkpad)

NOTE: Playing nuv files with 'mpg' extension with VLC Player works the best [5/30/2007]

Y:\>c:\bin\mplayer\mplayer.exe -vo directx -demuxer 2 1054_20050910233000_20050911010100.nuv

Put Windows 'essentials' codecs in mplayer\codecs

Codecs:
http://mplayerhq.hu/homepage/design7/codecs.html

Play nuv with mplayer

Convert from Showshifter .ssf + .ssf.00 - DVB Owners Discussion Forum - dvbowners.com: "I figured out how to force it to play as an mpeg-ts file ..

mplayer -demuxer joined.ts

is documented in libmpdemux/demuxer.h

MPEG_ES=1
MPEG_PS=2
MPEG_TS=29"

Thursday, September 15, 2005

NUV and mplayer

Reading PX-TV402U/MythTV files in Windows - Topic Powered by Groupee Community: "The PVR-250 and similar devices output an MPEG Transport Stream, which is also a container format like NUV. This is why you're able to run 'cat /dev/video0 >movie.mpg' and mplayer will happily play it. When MythTV records from a PVR-250, it puts the MPEG-TS into the NUV, creating a 'container-in-a-container' file. You can play these NUV files in MPlayer because MPlayer simply ignores the NUV data and extracts the MPEG-TS directly. This doesn't work with NUV files from the ConvertX because NUV is the only container format in use, so the NUV metadata is critical to playing the file, and MPlayer doesn't know how to read NUV files."

mplayer and NUV

pchdtv.com :: View topic - Playback of .AVI file recorded on HD-3000 in WinXP: "The video stream captured from HD-3000 card is mpeg trasnport streams. (.ts) I'd try a player capable of that first. You can try MPlayer, there is a windows version and it will most likely handle whatever codec it is. [http://www.mplayerhq.hu/]"

DCL notes: On my myth BE, the nuv files are mpeg-ps (not ts).

2.6.12 kernel and built-in driver

pchdtv.com :: View topic - ANNOUNCE: pcHDTV 2000 & 3000 drivers included in the ker: "If you're using the drivers in the 2.6.12 kernel, so you don't need
cx88-atsc, instead to load the module for DVB you would use
Code:

modprobe -v cx88-dvb "

Monday, September 12, 2005

A/V out of sync due to dropped frames

[mythtv-users] A/V out of sync due to dropped frames: "If you use Windows, there's an application called PVAStrumento that does
the same thing as ProjectX. Recent versions of PVAStrumento have
restored audio sync in 100% of the files I have used it on. I just use
the default settings; select the .nuv file, 'make ps', set the output
file, set 2048 as the packet size, and 'Start'.

Link: http://www.offeryn.de/dv.htm"

Sunday, September 11, 2005

Remove commercials before transcoding

The PVR Guide - help me install mythtv and VDR :: View topic - How to compile commercial_cut: "> Try avidemux.

Well, after a period of stubborness, I finally DID try avidemux.
And that worked, really well.

Commercial_cut worked too, but when I tried to use it on the
program with the musical clip I wanted, it turned out a 38-byte
file. Of course, 38 bytes is just a tad short of enough to hold
a five-minute video clip.

Thanks for your two-word message of advice. It turned out to be
THE answer. "

First transcode to divx

Where would you like to export the files to? [.] /tmp/
Enable Myth cutlist? [Yes] n
Enable noise reduction (slower, but better results)? [Yes] n
Enable deinterlacing? [Yes] n
Crop broadcast overscan (2% border)? [Yes]
Audio bitrate? [128]
Variable bitrate video? [Yes]
Multi-pass (slower, but better quality)? [Yes] n
VBR quality/quantisation (1-31)? [6]
Video bitrate? [960]
Default resolution based on 16:9 aspect ratio.
Width? [624] 320
Height? [176]

NOTE: THIS WIDTH/HEIGHT IS TOO SMALL (file size was 314M)

Now encoding: Oprah Winfrey: Untitled
Encode started: Sun Sep 11 03:10:53 2005
Waiting for mythtranscode to set up the fifos.
Waiting for mythtranscode to set up the fifos.
Starting ffmpeg.
processed: 218506 of 3430755 frames (6.37%), 25.01 fps
mythtranscode finished.
processed: 218506 of 3430755 frames (6.37%), 25.01 fps
ffmpeg finished.

Encode finished: Sun Sep 11 05:36:31 2005
Encode lasted: 2h 25m 38s

nuvexport install

Got ffmpeg binary:
# yum install ffmpeg

Got nuvexport tar ball, extracted, and cd to dir.

Output of 'make install':
[root@myth nuvexport-0.2]# make install
# First the binaries
`mpeg2cut' -> `/usr/local/bin/mpeg2cut'
`nuvexport' -> `/usr/local/bin/nuvexport'
`nuvinfo' -> `/usr/local/bin/nuvinfo'
# Then the config file(s)
`nuvexportrc' -> `/etc/nuvexportrc'
# Install the mode symlinks
# Install the modules
/usr/bin/install: creating directory `/usr/local/share/nuvexport'
/usr/bin/install: creating directory `/usr/local/share/nuvexport/export'
`export/generic.pm' -> `/usr/local/share/nuvexport/export/generic.pm'
`export/ffmpeg.pm' -> `/usr/local/share/nuvexport/export/ffmpeg.pm'
`export/transcode.pm' -> `/usr/local/share/nuvexport/export/transcode.pm'
`export/mencoder.pm' -> `/usr/local/share/nuvexport/export/mencoder.pm'
`export/MPEG2_cut.pm' -> `/usr/local/share/nuvexport/export/MPEG2_cut.pm'
`export/NUV_SQL.pm' -> `/usr/local/share/nuvexport/export/NUV_SQL.pm'
/usr/bin/install: creating directory `/usr/local/share/nuvexport/export/transcode'
`export/transcode/DVCD.pm' -> `/usr/local/share/nuvexport/export/transcode/DVCD.pm'
`export/transcode/DVD.pm' -> `/usr/local/share/nuvexport/export/transcode/DVD.pm'
`export/transcode/SVCD.pm' -> `/usr/local/share/nuvexport/export/transcode/SVCD.pm'
`export/transcode/VCD.pm' -> `/usr/local/share/nuvexport/export/transcode/VCD.pm'
`export/transcode/XviD.pm' -> `/usr/local/share/nuvexport/export/transcode/XviD.pm'
/usr/bin/install: creating directory `/usr/local/share/nuvexport/export/ffmpeg'
`export/ffmpeg/XviD.pm' -> `/usr/local/share/nuvexport/export/ffmpeg/XviD.pm'
`export/ffmpeg/DivX.pm' -> `/usr/local/share/nuvexport/export/ffmpeg/DivX.pm'
`export/ffmpeg/MP3.pm' -> `/usr/local/share/nuvexport/export/ffmpeg/MP3.pm'
`export/ffmpeg/ASF.pm' -> `/usr/local/share/nuvexport/export/ffmpeg/ASF.pm'
`export/ffmpeg/SVCD.pm' -> `/usr/local/share/nuvexport/export/ffmpeg/SVCD.pm'
`export/ffmpeg/DVCD.pm' -> `/usr/local/share/nuvexport/export/ffmpeg/DVCD.pm'
`export/ffmpeg/DVD.pm' -> `/usr/local/share/nuvexport/export/ffmpeg/DVD.pm'
`export/ffmpeg/VCD.pm' -> `/usr/local/share/nuvexport/export/ffmpeg/VCD.pm'
`export/ffmpeg/PSP.pm' -> `/usr/local/share/nuvexport/export/ffmpeg/PSP.pm'
/usr/bin/install: creating directory `/usr/local/share/nuvexport/export/mencoder'
`export/mencoder/XviD.pm' -> `/usr/local/share/nuvexport/export/mencoder/XviD.pm'
/usr/bin/install: creating directory `/usr/local/share/nuvexport/mythtv'
`mythtv/nuvinfo.pm' -> `/usr/local/share/nuvexport/mythtv/nuvinfo.pm'
`mythtv/db.pm' -> `/usr/local/share/nuvexport/mythtv/db.pm'
`mythtv/recordings.pm' -> `/usr/local/share/nuvexport/mythtv/recordings.pm'
/usr/bin/install: creating directory `/usr/local/share/nuvexport/nuv_export'
`nuv_export/help.pm' -> `/usr/local/share/nuvexport/nuv_export/help.pm'
`nuv_export/shared_utils.pm' -> `/usr/local/share/nuvexport/nuv_export/shared_utils.pm'
`nuv_export/task.pm' -> `/usr/local/share/nuvexport/nuv_export/task.pm'
`nuv_export/cli.pm' -> `/usr/local/share/nuvexport/nuv_export/cli.pm'
`nuv_export/ui.pm' -> `/usr/local/share/nuvexport/nuv_export/ui.pm'
# Install the man page
/usr/bin/install: creating directory `/usr/local/man'
/usr/bin/install: creating directory `/usr/local/man/man1'
`man/nuvexport.1' -> `/usr/local/man/man1/nuvexport.1'
`man/nuvexport-svcd.1' -> `/usr/local/man/man1/nuvexport-svcd.1'
`man/nuvexport-vcd.1' -> `/usr/local/man/man1/nuvexport-vcd.1'
`man/nuvexport-xvid.1' -> `/usr/local/man/man1/nuvexport-xvid.1'

man page for nuvexport says other programs are needed:

Install version of xvfb that is same rev as my x11:
# yum install xorg-x11-Xvfb-6.8.1-12

Perl module for high resolution time:
# yum install perl-Time-HiRes

Saturday, September 10, 2005

Mpeg2 nuv files

[mythtv] Mpeg2 nuv files: "> I think i got the mpeg2 stuff working in my windows filters.
>
> I'm no mpeg2 expert so i have some questions.
>
> Is it safe to asume that if a *.nuv file is not a nupplevideo typ file its
> in mpeg2? Thats the only two formats mythtv uses right?

Yes and yes.

> Is all the mpeg2 .nuv files a program stream?

Streams from the pchdtv cards will be transport streams, streams from DVB will
be either program or transport streams, and streams from the pvr-250 can be
either as well (though I'd assume most people will use program streams)."