How to make high quality MPEG4 video

Sugiura Shiro sugiura at kt.rim.or.jp
Mon Sep 1 06:53:01 PDT 2003


I want to record and encode high quality video(MPEG4/DivX) 640x480 at 29.97fps
from TV using bt878 chip(PVR951). I tried to use ffmpeg0.4.6, 0.4.7 and
mencoder , but not so good.

Step0: set up
1. add bktr_load="YES" in /boot/loader.conf
2. # sysctl hw.bt848.card=13
   # sysctl hw.bt848.tuner=4

Step1: record rawvideo 
% ffmpeg -r 29.97 -s 640x480 -ac 2 -ar 48000 -ab 256 -acodec mp3 -vcodec \
  rawvideo -tvstd ntsc -deinterlace raw.avi

I sometimes found "SLEPT NO signals - xxxxx microseconds late" error .


Step2-1: mpeg4 encode by mencoder(very quick , but not so good)
% mencoder raw.avi  -oac copy -ovc lavc  -ofps 29.97 lavc=2000:29.97 \
  -lavcopts vcodec=mpeg4:vqscale=31:vme=5:vhq:vbitrate=2000 -o tv.mpg

Step2-2: mpeg4 encode by ffmpeg(strange out put)
% ffmpeg -i raw.avi -vcodec mpeg4 -r 29.97 -me full -re -b 2000 -acodec \
  copy -deinterlace tv.avi

I want know how to make high quality MPEG4 video.
fxtv has not work well on my FreeBSD box.

CPU: Intel(R) Pentium(R) 4 CPU 2.80GHz (2806.38-MHz 686-class CPU)
bktr0: <BrookTree 878> mem 0xf7000000-0xf7000fff irq 10 at device 7.0 on pci2
bktr0: Card has no configuration EEPROM. Cannot determine card make.
bktr0: Pinnacle/Miro TV, Temic NTSC tuner.
ad0: 176700MB <IC35L180AVV207-1> [359010/16/63] at ata0-master UDMA100

% uname -r
5.1-CURRENT-20030812-JPSNAP
% iozone 2000
        46661984 bytes/second for writing the file
        46354470 bytes/second for reading the file

--  
Sugiura Shiro      E-mail : sugiura at kt.rim.or.jp


More information about the freebsd-multimedia mailing list