From owner-freebsd-multimedia@FreeBSD.ORG Mon Sep 1 11:15:14 2003 Return-Path: Delivered-To: freebsd-multimedia@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E38E716A4BF for ; Mon, 1 Sep 2003 11:15:14 -0700 (PDT) Received: from smtp6.wanadoo.nl (smtp6.wanadoo.nl [194.134.35.177]) by mx1.FreeBSD.org (Postfix) with ESMTP id BE0BE44015 for ; Mon, 1 Sep 2003 11:13:51 -0700 (PDT) (envelope-from steve@sohara.org) Received: from ams-gw.sohara.org (p0881.nas2-asd6.dial.wanadoo.nl [62.234.215.119]) by smtp6.wanadoo.nl (Postfix) with SMTP id 72D8B776F5; Mon, 1 Sep 2003 20:13:45 +0200 (CEST) Date: Mon, 1 Sep 2003 20:13:41 +0200 From: Steve O'Hara-Smith To: sugiura@kt.rim.or.jp (Sugiura Shiro) Message-Id: <20030901201341.1e6ff86d.steve@sohara.org> In-Reply-To: <200309011352.WAA07523@mail5.rim.or.jp> References: <200309011352.WAA07523@mail5.rim.or.jp> X-Mailer: Sylpheed version 0.9.4 (GTK+ 1.2.10; i386-portbld-freebsd4.8) X-Face: %]+HVL}K`P8>+8ZcY-WGHP6j@&mxMo9JH6_WdgIgUGH)JX/usO0%jy7T~IVgqjumD^OBqX,Kv^-GM6mlw(fI^$"QRKyZ$?xx/ Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit cc: freebsd-multimedia@freebsd.org Subject: Re: How to make high quality MPEG4 video X-BeenThere: freebsd-multimedia@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Multimedia discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Sep 2003 18:15:15 -0000 On Mon, 1 Sep 2003 22:52:57 +0900 (JST) sugiura@kt.rim.or.jp (Sugiura Shiro) wrote: SS> I want to record and encode high quality video(MPEG4/DivX) SS> 640x480@29.97fps from TV using bt878 chip(PVR951). I tried to use SS> ffmpeg0.4.6, 0.4.7 and mencoder , but not so good. With that 2.8GHZ P4 you should be able to go direct. I can quite easily record PAL 720x576@25fps in mpeg4 or mpeg1 on my AMD XP2000 in realtime with ffmpeg alone running like this: ffmpeg -s 768x576 -tvstd pal -vcodec mpeg4 -b 2000 -acodec mp3 -ac 2 \ -ab 128 -f avi -t $DURATION -y $NAME.avi It uses about 60% CPU on average, adding -hq pushes it to a bit over 70%. I have never noticed any effect from the deinterlace flag so I tend not to bother with it. To my eye the result of these settings is a little blurry so generally I use something more like this: ffmpeg -s 768x576 -tvstd pal -vcodec mpeg1video -b 6400 -acodec mp2 \ -ac 2 -ab 160 -f mpeg -t $DURATION -y $NAME.avi IME high bandwidth mpeg1 is nicer than high bandwidth mpeg4 but it reverses at low bandwidth. SS> Step1: record rawvideo SS> % ffmpeg -r 29.97 -s 640x480 -ac 2 -ar 48000 -ab 256 -acodec mp3 SS> -vcodec \ SS> rawvideo -tvstd ntsc -deinterlace raw.avi SS> SS> I sometimes found "SLEPT NO signals - xxxxx microseconds late" error . Don't worry, it's not an error, it's a warning that there was no frame sync detected by the time the timer expired and so you may get a slightly messy frame in the sequence. One day I'll take these messages out, when I'm sure I've finished fiddling with that bit (I think I have). SS> Step2-1: mpeg4 encode by mencoder(very quick , but not so good) SS> % mencoder raw.avi -oac copy -ovc lavc -ofps 29.97 lavc=2000:29.97 \ SS> -lavcopts vcodec=mpeg4:vqscale=31:vme=5:vhq:vbitrate=2000 -o tv.mpg _____________________________^^^^^^^^^^ The indicated bit fixes the quality at very very low, remove it for better results and longer processing. SS> Step2-2: mpeg4 encode by ffmpeg(strange out put) SS> % ffmpeg -i raw.avi -vcodec mpeg4 -r 29.97 -me full -re -b 2000 SS> -acodec \ SS> copy -deinterlace tv.avi Strange how ? -- C:>WIN | Directable Mirrors The computer obeys and wins. |A Better Way To Focus The Sun You lose and Bill collects. | licenses available - see: | http://www.sohara.org/