Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 28 Apr 2000 22:49:36 -0400
From:      Randall Hopper <aa8vb@ipass.net>
To:        "Jason J. Horton" <jason@intercom.com>
Cc:        multimedia@freebsd.org
Subject:   SBLive Audio Recording and Fxtv (was Re: FXTV question)
Message-ID:  <20000428224936.A9119@ipass.net>
In-Reply-To: <3908D5EA.DDA1637@intercom.com>; from jason@intercom.com on Thu, Apr 27, 2000 at 08:06:02PM -0400
References:  <3904E5F6.1CBF32BB@intercom.com> <20000426222526.A5678@ipass.net> <3908D5EA.DDA1637@intercom.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Jason J. Horton:
 |> Hope this helps.  Let me know how it goes!
 |
 |Just had a chance to test last night. Didnt test earlier because
 |I was previously using Linux. Finally found info to make a SoundBlaster
 |Live work with 4.0-STABLE, so I installed FreeBSD.

Cool.

 |Tried to do a capture with audio and kept getting the error
 |about not being able to open /dev/dsp or something simular.
 |Am having no problems playing audio via /dev/dsp, but this
 |is my first attempt to record via the SB Live.

Hmm.  Not being able to open the device sounds like permissions.  The user
you run fxtv as should have write access to the DSP device:

> ls -l /dev/dsp*
lrwxrwxrwx  1 root  wheel         4 Jan  4 21:50 /dev/dsp@ -> dsp0
crw-rw-rw-  1 root  wheel   30,   3 Apr 28 20:21 /dev/dsp0
lrwxrwxrwx  1 root  wheel         5 Jan  4 21:50 /dev/dspW@ -> dspW0
crw-rw-rw-  1 root  wheel   30,   5 Jan  4 21:50 /dev/dspW0

Try chmod 666 /dev/dsp* and see if that doesn't help.  You can tailor them
to taste if that gets you going.

 |If I do a capture without audio, everything seems fine. Recorded 30
 |minutes of video, and almost 7 gigs later, no problems. 2 hours of
 |encoding later and I have a MPEG 1 file that plays at aprox 29 fps in
 |mpeg_play. Major progress, seeing that under Linux, I couldnt get more
 |than a minute successfully captured and encoded.

Cool.  I've not done anything near that long.  Just a few minutes.

 |Also, is 7 gigs of data abit much for only 30 minutes of video sans
 |audio? I was capturing in RGB mode, is there a better format that will
 |still encode to MPEG with decent quality?

Depends on resolution, color depth, capture format, capture rate, drop
rate, MPEG frame pattern ... all kinds of things.

I know MPEG can get better compression than we're seeing with the default
fxtv/mpeg_encode configuration, but I'm no MPEG video expert.

One thing to look at tweaking is the MPEG frame pattern:

     PATTERN           IBPBIBPBPB  

(I-frames are fully encoded; and P and B frames are one and two-way
interpolated [I forget which is which]).  I just picked this because
mpeg_encode suggested it.  This may not be what's used in practice.
I frames may not be used as frequently for example.

Also, there are a load of options for mpeg_encode (man mpeg_encode).  I
basically just found a combo that worked (wasn't as easy as I thought) and
put it in as a default.  The quality isn't too hot given how big the stream
is; I know MPEG can do better.  If someone comes up with a better
combination, I'll certainly change the default to match!

To fiddle with the mpeg_encode options, record to disk without encoding
("MPEG Ready" target).  Then tweak options at the top of the .param file
and .sh file that're created.  Here are the current defaults:

   # 
   # "mpeg_encode" parameter file; generated by FreeBSD X TV
   # 

   PATTERN           IBPBIBPBPB  
   GOP_SIZE          10          
   SLICES_PER_FRAME  1           
   PIXEL             HALF        
   RANGE             8           
   PSEARCH_ALG       LOGARITHMIC 
   BSEARCH_ALG       SIMPLE      
   IQSCALE           8           
   PQSCALE           10          
   BQSCALE           25          
   FRAME_RATE        __FPS__     
   REFERENCE_FRAME   ORIGINAL    
   YUV_SIZE          __XRES__x__YRES__ 
   OUTPUT            __OUTFILE__'


Other things that would help: capture in YUV and feed YUV to mpeg_encode.
Problem is, I wasn't able to get mpeg_encode to take any YUV fxtv gives it
except at 320x240.  The rest yields rolling color patterns like a pitch is
wrong for the U and/or V components.  You might take a look at this --
maybe you can figure out what mpeg_encode wants.

Hope this helps.

Randall


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-multimedia" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000428224936.A9119>