From owner-freebsd-multimedia@FreeBSD.ORG Fri May 30 22:48:37 2008 Return-Path: Delivered-To: freebsd-multimedia@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7B69C1065687 for ; Fri, 30 May 2008 22:48:37 +0000 (UTC) (envelope-from stapleton.41@gmail.com) Received: from py-out-1112.google.com (py-out-1112.google.com [64.233.166.182]) by mx1.freebsd.org (Postfix) with ESMTP id 51F998FC15 for ; Fri, 30 May 2008 22:48:37 +0000 (UTC) (envelope-from stapleton.41@gmail.com) Received: by py-out-1112.google.com with SMTP id p76so93188pyb.10 for ; Fri, 30 May 2008 15:48:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=6RWU+mej5V65wNSz/IoDDpFCRS/BPUOfuOYRWpUuxbU=; b=d0DXNhNcLQnv6pWLYWdHDzeEcQ0fIrx7WMlB2viXqkaTfc/mV9kZfEdY0pkCbj8bnspPkrqUwPjuSKKWnpX9jmOsI7ultryAjGpyvP5WxLQLuqeL3w0LCAfpIVLpHfqsamSZlEzkKDj+wPun6MdKQlgiROQPNwKlt49PSx5HKI8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=jG0ii0azN+LNhdR/U5M9CzKPKGgvF1tFJqzsQ7iw3VzyLU0+Vswm30Cyy6MwNG8X2NmZh4EWLlSjXQUmuveZZTeOZyYYlaghRk8dTadQOjfdYNLNy1vgmmVwvqGRSKITWyg7kzW1kpJJij9YyqPOnOMqEgIzuWkWejwNXkq6gI4= Received: by 10.114.195.19 with SMTP id s19mr6975574waf.58.1212187716172; Fri, 30 May 2008 15:48:36 -0700 (PDT) Received: by 10.114.150.14 with HTTP; Fri, 30 May 2008 15:48:35 -0700 (PDT) Message-ID: <80f4f2b20805301548x2e5e55d2g32267504797ffcdb@mail.gmail.com> Date: Fri, 30 May 2008 18:48:36 -0400 From: "Jim Stapleton" To: rick-freebsd@kiwi-computer.com In-Reply-To: <20080529170858.GA70632@keira.kiwi-computer.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <80f4f2b20805290402w84c3f4k3f302385396b6b1c@mail.gmail.com> <20080529170858.GA70632@keira.kiwi-computer.com> Cc: freebsd-multimedia@freebsd.org Subject: Re: pvrxxx recording X-BeenThere: freebsd-multimedia@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Multimedia discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 May 2008 22:48:37 -0000 On Thu, May 29, 2008 at 1:08 PM, Rick C. Petty 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 never said or insinuated that the stepwise process is functional (or not minded) on my computer. I simply said cat'ing the device to the drive causes a video that looks acceptable (actually good). The stepwise process is not feasable with my current setup/situation due to drive space, and the length of some of the recordings I want to do. Also, having tested it out, the coversion is actually worse in the stepwise process. the 720x488 image looks fairly decent for the most part doing on-the-fly encoding. The problem is, if there is much motion, the portions of the screen with motion tend to look like they are are appropriate for the image being in 72x49 resolution, rather than 720x488. The remain sections of the screen look like I would expect from, say, 360x244 (1/2 x 1/2), scaled to the player's size. When I have a stepped process (I cat my sample video to a file, then ffmpeg the file), I end up with something that looks like it's appropriate for a 180x122 (1/4 x 1/4 image), throughout the picture, but motion degredation is barely noticable. it's still too low for my comfort. The original file appears to be full quality. Also, in the stepped process * all the conversions took about 4-5 seconds for a 20 second video * my CPU was at fairly low utilization 45-65%. * At the time of the conversion/recording, my disk IO was being hogged by a compile and backup process. Is there extra overhead to compressing something straight out of the tuner? Using a similarly performing algorithm, (2x on each axis, 4x the power, right?) should be possible real-time with the same 45-65% CPU utilization.