Date: Thu, 29 May 2008 21:39:01 +0200 From: usleepless@gmail.com To: rick-freebsd@kiwi-computer.com Cc: freebsd-multimedia@freebsd.org Subject: Re: pvrxxx recording Message-ID: <c39ec84c0805291239h4f9a357o449dc58b6026d33@mail.gmail.com> In-Reply-To: <20080529170858.GA70632@keira.kiwi-computer.com> References: <80f4f2b20805290402w84c3f4k3f302385396b6b1c@mail.gmail.com> <20080529170858.GA70632@keira.kiwi-computer.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Rick, Jim, List, On Thu, May 29, 2008 at 7:08 PM, Rick C. Petty <rick-freebsd@kiwi-computer.com> wrote: > On Thu, May 29, 2008 at 07:02:48AM -0400, Jim Stapleton wrote: >> OK, I got my pvrxxx problems fixed (I apparantly had my ffmpeg line wrong). >> >> I'm having trouble getting a decent recording though. The uncompressed >> stream is too large for comfort. > > Uncompressed, it should be. > >> $ cat /dev/cxm0 | ffmpeg -i - -vcodec $v -acoded $a -f $f out.mpeg >> $ ffmpeg -i /dev/cxm0 -vcodec $v -acoded $a -f $f out.mpeg > > So you're fine with a multi-step process? BTW, you might get better > performance if your first command is: > > ffmpeg -i /dev/cxm0 -vcodec $v ... > >> Note: 'cat /dev/cxm0 > out.mpeg' works fine, and looks great - it's >> just huge (3-4GB/hr). > > That's not that huge. > >> Does anyone know of a format that should work well? The computer is a >> Optron 185 (dual core, 2.4Ghz), with 3GB memory, and a 7200RPM hard >> drive. > > Your computer is too slow to do a live decode/encode of an MPEG2 stream. > Since you don't mind a multi-step process, why don't you record at the > standard bitrate and do a post-process step? That's what I do. I actually > have my own cxm_record program which calls the setchannel command and then > performs a cat(1) equivalent. After the recording is finished, I use > multimedia/avidemux to select cut/edit points and a custom script to > convert the avidemux project to a multimedia/dvbcut project. I've found > dvbcut does a better job of cutting the MPEG2 streams and does a minimum > recoding process (only at the edit points). From there I run a custom > script to furthur compress the MPEG2 stream and turn it into a DVD VOB. > This script may be of interest to you and your issue, so I'll describe it > here. > > I demultiplex the audio & video streams separately using multimedxa/mpgtx: > > mpgdemux -b $TMP_PREFIX $OUTPUT_FROM_DVBCUT > > Then, in parallel, I convert & compress the audio and video streams. For > the audio, I make a named pipe and decode using audio/lame: > > mkfifo $TMP_PREFIX.wav > lame --decode $TMP_PREFIX.mp2 $TMP_PREFIX.wav > > then encode into AC3 using multimedia/ffmpeg: > > ffmpeg -i $TMP_PREFIX.wav -y -vn -ab 192000 -acodec ac3 -ar 48000 -ac 2 \ > $TMP_PREFIX.ac3 > > For the video, I requantize the video by a factor of 3:2 using > multimedia/transcode: > > tcrequant -f 1.5 < $TMP_PREFIX-0.m2v > $TMP_PREFIX-1.m2v > > After both are finished, I multiplex the streams together into a > dvdauthor-ready VOB using multimedia/mjpegtools: > > mplex -v 0 -V -M -f 8 -o $OUTPUT.vob $TMP_PREFIX.ac3 $TMP_PREFIX-1.m2v > > The end result is a file that's just over half the size of the original > without appreciable loss of quality. Rick, thanks for outlining your procedure. I had no idea that people were postprocessing their recordings. I recently adjusted the bitrate for my profile from ~10Mbit to ~5MBit. I hardly notice a difference except for fast moving sports such as tennis and motorsports. Unfortunatly you need to edit the source of the driver and rebuild it. The relevant parameters are at the top of cxm.c. You need to edit the "dvd_full_d1_(pal|ntsc)_profile": /* 9.52 Mb/s peak limit to keep bbdmux followed by mplex -f 8 happy */ #ifdef _original_ { 0, 9000000, 9520000 }, /* 1 hour on 4.7 GB media */ #else { 0, 4000000, 4520000 }, /* 4 hours on 8.54 GB media */ #endif regards, usleep
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?c39ec84c0805291239h4f9a357o449dc58b6026d33>