Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: MythTV: Dev

running encoder in realtime

 

 

MythTV dev RSS feed   Index | Next | Previous | View Threaded


ajlill at ajlc

Jan 16, 2006, 9:28 PM

Post #1 of 4 (616 views)
Permalink
running encoder in realtime

I'd like to try to run the thread(s) that transfers the data from the
video device to the file in realtime mode to try and get rid of the
ivtv0 warning: ENC Stream 0 OVERFLOW messages.

Is Ringbuffer.cpp the right place to do it? It seems to spawn a couple
of threads to read and write stuff. Or is there some other place that
does actual fileio when recording?
--
Tony Lill, Tony.Lill [at] AJLC
President, A. J. Lill Consultants fax/data (519) 650 3571
539 Grand Valley Dr., Cambridge, Ont. N3H 2S2 (519) 241 2461
--------------- http://www.ajlc.waterloo.on.ca/ ----------------
"Welcome to All Things UNIX, where if it's not UNIX, it's CRAP!"
_______________________________________________
mythtv-dev mailing list
mythtv-dev [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev


danielk at cuymedia

Jan 17, 2006, 6:02 AM

Post #2 of 4 (570 views)
Permalink
Re: running encoder in realtime [In reply to]

On Tue, 2006-01-17 at 00:28 -0500, Tony Lill wrote:
> I'd like to try to run the thread(s) that transfers the data from the
> video device to the file in realtime mode to try and get rid of the
> ivtv0 warning: ENC Stream 0 OVERFLOW messages.
>
> Is Ringbuffer.cpp the right place to do it? It seems to spawn a couple
> of threads to read and write stuff. Or is there some other place that
> does actual fileio when recording?

Yup, the MpegRecorder in the case of ivtv. There is a DeviceReadBuffer
class that functions like a RingBuffer for device reads, but it is not
used by MpegRecorder.

-- Daniel



_______________________________________________
mythtv-dev mailing list
mythtv-dev [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev


ijr at case

Jan 17, 2006, 7:24 AM

Post #3 of 4 (569 views)
Permalink
Re: running encoder in realtime [In reply to]

On Tuesday 17 January 2006 09:02, Daniel Kristjansson wrote:
> On Tue, 2006-01-17 at 00:28 -0500, Tony Lill wrote:
> > I'd like to try to run the thread(s) that transfers the data from the
> > video device to the file in realtime mode to try and get rid of the
> > ivtv0 warning: ENC Stream 0 OVERFLOW messages.
> >
> > Is Ringbuffer.cpp the right place to do it? It seems to spawn a couple
> > of threads to read and write stuff. Or is there some other place that
> > does actual fileio when recording?
>
> Yup, the MpegRecorder in the case of ivtv. There is a DeviceReadBuffer
> class that functions like a RingBuffer for device reads, but it is not
> used by MpegRecorder.

mpegrecorder really shouldn't need one, since it's not really doing much
parsing of the stream - it's passing off to the RingBuffer class quickly.
The ringbuffer has its own level of buffering for the disk output (in
ThreadedFileWriter), so you could probably get the same effect by just
increasing that buffer size.

Isaac
_______________________________________________
mythtv-dev mailing list
mythtv-dev [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev


danielk at cuymedia

Jan 17, 2006, 7:52 AM

Post #4 of 4 (575 views)
Permalink
Re: running encoder in realtime [In reply to]

On Tue, 2006-01-17 at 10:24 -0500, Isaac Richards wrote:
> On Tuesday 17 January 2006 09:02, Daniel Kristjansson wrote:
> mpegrecorder really shouldn't need one, since it's not really doing much
> parsing of the stream - it's passing off to the RingBuffer class quickly.
> The ringbuffer has its own level of buffering for the disk output (in
> ThreadedFileWriter), so you could probably get the same effect by just
> increasing that buffer size.

MpegRecorder can choke on data before it gets buffered by
ThreadedFileWriter if it has problems writing the key-frame
map to the database. This can happen if the DB is on the
same disk as the MythTV video store. This is usually not a
problem for two or three ivtv cards unless you don't have
hard disk DMA transfers enabled, also have HDTV cards
installed and streaming to disk, or perform a huge file
transfer outside of MythTV.

That reminds me of a couple problems Tony might want to look at...
1/ If you have the popular Via brand SATA chipset, it has a bug that
requires a one second timeout on writes which causes problems for
ThreadedFileWriter.
2/ Also make sure you use XFS or JFS as your file system for the video
store, other file systems tend to deal badly with streaming data.
Brandon Beattie had serious streaming problems that were greatly
reduced by changing from RieserFS3 to XFS.

-- Daniel

_______________________________________________
mythtv-dev mailing list
mythtv-dev [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev

MythTV dev RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.