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

Mailing List Archive: MythTV: Dev

Commercial skipping: Can I get the byte position in a recording instead of the frame?

 

 

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


maclaren at tulane

Jan 19, 2007, 1:59 PM

Post #1 of 4 (512 views)
Permalink
Commercial skipping: Can I get the byte position in a recording instead of the frame?

I am trying to add commercial skipping to the mythroku frontend. To skip in the video steam the roku requires the number of bytes to skip rather than the number of frames. This is a result of the roku’s libraries for video streaming which I cannot change. Obviously for fixed bit rate recordings the conversion is no problem, and for vbr you could guess based upon the average bit rate. I have successfully queried my backend and got all the commercial breaks (in frames). Is there any way to get that data in terms of bytes in the steam?

Thanks




--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.432 / Virus Database: 268.16.14/637 - Release Date: 1/18/2007 1:03 PM



--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.432 / Virus Database: 268.16.14/637 - Release Date: 1/18/2007 1:03 PM


cpinkham at bc2va

Jan 19, 2007, 8:57 PM

Post #2 of 4 (499 views)
Permalink
Re: Commercial skipping: Can I get the byte position in a recording instead of the frame? [In reply to]

* On Fri Jan 19, 2007 at 03:59:01PM -0600, Maclaren, James M wrote:
> I am trying to add commercial skipping to the mythroku frontend.
> To skip in the video steam the roku requires the number of bytes to
> skip rather than the number of frames. This is a result of the roku?s
> libraries for video streaming which I cannot change. Obviously for fixed

You're going to have to look at the the recordedmarkup table (recordedseek
in current SVN) table to get the byte position of the keyframes then
seek to the nearest keyframe. There isn't any easy way to get the byte
position of the exact frame so you'll only get seeking to keyframes unless
you can tell the library to not display a frame in which case you could seek
to the closest prior keyframe then skip frames up until the one you need.

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


maclaren at tulane

Jan 22, 2007, 9:40 AM

Post #3 of 4 (478 views)
Permalink
Re: Commercial skipping: Can I get the byte position in a recording instead of the frame? [In reply to]

>> I am trying to add commercial skipping to the mythroku frontend.
>> To skip in the video steam the roku requires the number of bytes to
>> skip rather than the number of frames. This is a result of the roku?s

>> libraries for video streaming which I cannot change. Obviously for
fixed

>You're going to have to look at the the recordedmarkup table
(recordedseek
>in current SVN) table to get the byte position of the keyframes then
>seek to the nearest keyframe. There isn't any easy way to get the byte
>position of the exact frame so you'll only get seeking to keyframes
unless
>you can tell the library to not display a frame in which case you could
seek
>to the closest prior keyframe then skip frames up until the one you
need.



Let me first state I do not have a very detailed knowledge about the
innards of the mythbackend, and I got what I needed from reading the
backend mainserver.cpp code. I suspect the answer is no but, can I get
this keyframe information by sending a message to the backend as I did
with a QUERY_COMMBREAK to get the commercial starts and stops. This
send me back a list of frame numbers, or do I need to access the
database to get the data from the recordedseek table (use the svn code).
I really have no idea how to access it rermotely. If someone can direct
me to the routines in mythtv where this goes on so I can look at how
it's done. Given the size of the mythtv code as a beginner I feel it's
somewhat like searching for a needle in a haystack. Any
pointers/guidance as to how to get byte information out for the roku
remote frontend from the mythtv experts would be appreciated.

Thanks


--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.432 / Virus Database: 268.16.14/637 - Release Date:
1/18/2007 1:03 PM



--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.432 / Virus Database: 268.16.14/637 - Release Date:
1/18/2007 1:03 PM


cpinkham at bc2va

Jan 29, 2007, 10:50 PM

Post #4 of 4 (439 views)
Permalink
Re: Commercial skipping: Can I get the byte position in a recording instead of the frame? [In reply to]

* On Mon Jan 22, 2007 at 11:40:07AM -0600, Maclaren, James M wrote:
> backend mainserver.cpp code. I suspect the answer is no but, can I get
> this keyframe information by sending a message to the backend as I did
> with a QUERY_COMMBREAK to get the commercial starts and stops. This

I don't believe so. I think you're going to have to hit the recordedseek
table directly right now. Are you using direct SQL access to the
database at all right now?

MythTV loads the seektable for a file inside libs/libmythtv/programinfo.cpp
in ProgramInfo::GetPositionMap(). In this method, we take this info and
store it in a keyframe number to byte position map. A lot of the seeking
is handled inside libs/libmythtv/decoderbase.cpp if you want to look at
that code.

Basically, if the video has keyframes every 15 frames and the user wants to
seek to frame #50, we'd seek to the byte position of the 3rd keyframe
then seek forward frame by frame until we hit frame number 50 then we'd
resume playback. I don't know if you'll be able to do such granular seeking
on the Roku or if you'll have to settle for seeking to keyframes only.

--
Chris
_______________________________________________
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.