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

Mailing List Archive: MythTV: Dev

Transcode first/last frame problem [patch to v0.19]

 

 

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


amb at gedanken

May 11, 2006, 1:03 AM

Post #1 of 8 (1240 views)
Permalink
Transcode first/last frame problem [patch to v0.19]

One of the problems with mythtranscode is that even when the cutlist
specifies that the first and last frames are to be cut out they appear
in the output.

If the cut list is "0-x,y-end" where 'x' and 'y' are arbitrary and
'end' is the last frame in the recording (e.g. if only transcoding a
section from the middle) then the first and the last frames still
appear in the transcode output.

The patch for this is in NuppelVideoPlayer.cpp and makes sure that if
the first or last frame are cut then they are not output.

-------------------- NuppelVideoPlayer.cpp patch --------------------
diff -u NuppelVideoPlayer.orig.cpp NuppelVideoPlayer.cpp
--- NuppelVideoPlayer.orig.cpp 2006-05-11 08:55:40.000000000 +0100
+++ NuppelVideoPlayer.cpp 2006-05-11 08:52:40.000000000 +0100
@@ -4346,7 +4346,8 @@

if (honorCutList && (!deleteMap.isEmpty()))
{
- if (videoOutput->GetLastDecodedFrame()->frameNumber >= dm_iter.key())
+ if (videoOutput->GetLastDecodedFrame()->frameNumber >= dm_iter.key() ||
+ (videoOutput->GetLastDecodedFrame()->frameNumber == -1 && dm_iter.key() == 0))
{
while((dm_iter.data() == 1) && (dm_iter != deleteMap.end()))
{
@@ -4355,6 +4356,8 @@
dm_iter++;
msg += QString(" to %1").arg((int)dm_iter.key());
VERBOSE(VB_GENERAL, msg);
+ if(dm_iter.key() == GetTotalFrameCount())
+ return false;
GetDecoder()->DoFastForward(dm_iter.key());
GetDecoder()->ClearStoredData();
ClearAfterSeek();
-------------------- NuppelVideoPlayer.cpp patch --------------------

--
Andrew.
----------------------------------------------------------------------
Andrew M. Bishop amb[at]gedanken.demon.co.uk
http://www.gedanken.demon.co.uk/
_______________________________________________
mythtv-dev mailing list
mythtv-dev[at]mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev


nigel at ind

May 15, 2006, 7:32 PM

Post #2 of 8 (1162 views)
Permalink
Re: Transcode first/last frame problem [patch to v0.19] [In reply to]

> One of the problems with mythtranscode is that even when the cutlist
> specifies that the first and last frames are to be cut out they appear
> in the output.

It comes down to semantics.


In the UI, it says "Delete before this frame",
which to my way of thinking _includes_ the current frame.

In transcode and the DB, that data is called "cutlist",
which usually means remove that frame.


I would prefer to keep it as is.

--
Nigel Pearson, nigel[at]ind.tansu.com.au|"Peacemaking is our profession"
Telstra Net. Eng., Sydney, Australia | Motto of Burpelson Airforce Base
Office: 9202 3900 Fax: ???? ???? | Commanded by Gen. Jack D. Ripper
Mobile: 0408 664435 Home: 9792 6998 | Dr Strangelove

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


adeffs.mythtv at gmail

May 15, 2006, 8:47 PM

Post #3 of 8 (1150 views)
Permalink
Re: Transcode first/last frame problem [patch to v0.19] [In reply to]

On 5/15/06, Nigel Pearson <nigel[at]ind.tansu.com.au> wrote:
> > One of the problems with mythtranscode is that even when the cutlist
> > specifies that the first and last frames are to be cut out they appear
> > in the output.
>
> It comes down to semantics.
>
>
> In the UI, it says "Delete before this frame",
> which to my way of thinking _includes_ the current frame.

in my thinking "Delete before this frame" does *not* include the
current frame...


> In transcode and the DB, that data is called "cutlist",
> which usually means remove that frame.

cutlist could just mean, stuff to cut. no reference to relationships
to current frames.

> I would prefer to keep it as is.


I don't care how it is, as long as whether the current frame is
included or not is clear to the user.

--
Steve
Before you ask, read the FAQ!
http://www.mythtv.org/wiki/index.php/Frequently_Asked_Questions
then search the Wiki, and this list,
http://www.gossamer-threads.com/lists/mythtv/
Mailinglist etiquette -
http://www.mythtv.org/wiki/index.php/Mailing_List_etiquette
_______________________________________________
mythtv-dev mailing list
mythtv-dev[at]mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev


nigel at ind

May 15, 2006, 9:52 PM

Post #4 of 8 (1150 views)
Permalink
Re: Transcode first/last frame problem [patch to v0.19] [In reply to]

>> In the UI, it says "Delete before this frame",
>> which to my way of thinking _includes_ the current frame.
>
> in my thinking "Delete before this frame" does *not* include the
> current frame...

Hmmm. OK, includes was a bad word. Change to:
"my thinking ... keeps the current frame"




> I don't care how it is, as long as whether the current frame is
> included or not is clear to the user.

Agreed. We could add "(keeps this frame)" or
"(deletes this frame) in the editing popup messages,
but that would look rather ugly.



There are also other, small, issues.

1) The editor lets you delete before the first frame,
and after the last frame. Which seems to indicate
the generated cutlist _does_ remove the current frame?

2) In the editor, the first frame is 0:00:00.1
and this sequence (in PAL land) goes up 0.24
before incrementing the seconds.
So the first second has 24 frames, not 25?
Assume NTSC recordings go up to 0.29?


This may all be related to the cutlist format change
(from test field in recorded, to records in recordedmarkup)
or it may have always been vaguely defined.


Not quite sure where to go from here.

--
Nigel Pearson, nigel[at]ind.tansu.com.au|"Beware - I am a carrier
Telstra Net. Eng., Sydney, Australia | of surrealism"
Office: 9202 3900 Fax: ???? ???? | D A
Mobile: 0408 664435 Home: 9792 6998 | L I

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


adeffs.mythtv at gmail

May 16, 2006, 4:50 AM

Post #5 of 8 (1142 views)
Permalink
Re: Transcode first/last frame problem [patch to v0.19] [In reply to]

On 5/16/06, Nigel Pearson <nigel[at]ind.tansu.com.au> wrote:
> >> In the UI, it says "Delete before this frame",
> >> which to my way of thinking _includes_ the current frame.
> >
> > in my thinking "Delete before this frame" does *not* include the
> > current frame...
>
> Hmmm. OK, includes was a bad word. Change to:
> "my thinking ... keeps the current frame"

Ok, I wonder if anyone interprets the wording to mean it includes the
current frame?
To me the 'before' modifier implies the current frame is kept. This
may be a needless discussion.


> > I don't care how it is, as long as whether the current frame is
> > included or not is clear to the user.
>
> Agreed. We could add "(keeps this frame)" or
> "(deletes this frame) in the editing popup messages,
> but that would look rather ugly.

Does it currently delete the current frame as well? I never put a cut
point at frame 0, I just put a "delete before" marker as my first
point. It seems to work, though I've yet to check if it keeps the
first frame or not.


--
Steve
Before you ask, read the FAQ!
http://www.mythtv.org/wiki/index.php/Frequently_Asked_Questions
then search the Wiki, and this list,
http://www.gossamer-threads.com/lists/mythtv/
Mailinglist etiquette -
http://www.mythtv.org/wiki/index.php/Mailing_List_etiquette
_______________________________________________
mythtv-dev mailing list
mythtv-dev[at]mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev


amb at gedanken

May 19, 2006, 9:46 AM

Post #6 of 8 (1086 views)
Permalink
Re: Transcode first/last frame problem [patch to v0.19] [In reply to]

"Steven Adeff" <adeffs.mythtv[at]gmail.com> writes:

> On 5/16/06, Nigel Pearson <nigel[at]ind.tansu.com.au> wrote:
> > >> In the UI, it says "Delete before this frame",
> > >> which to my way of thinking _includes_ the current frame.
> > >
> > > in my thinking "Delete before this frame" does *not* include the
> > > current frame...
> >
> > Hmmm. OK, includes was a bad word. Change to:
> > "my thinking ... keeps the current frame"
>
> Ok, I wonder if anyone interprets the wording to mean it includes the
> current frame?
> To me the 'before' modifier implies the current frame is kept. This
> may be a needless discussion.
>
>
> > > I don't care how it is, as long as whether the current frame is
> > > included or not is clear to the user.
> >
> > Agreed. We could add "(keeps this frame)" or
> > "(deletes this frame) in the editing popup messages,
> > but that would look rather ugly.
>
> Does it currently delete the current frame as well? I never put a cut
> point at frame 0, I just put a "delete before" marker as my first
> point. It seems to work, though I've yet to check if it keeps the
> first frame or not.

This is the whole point of the patch. If you use a "delete before"
marker as the first one then the first frame appears in the output.
The same as when a "delete after" is the last marker; the last frame
appears in the output.

If this patch doesn't go in then it means that transcoded videos
contain one frame of unwanted video at the beginning and the end (if
using "delete before" as the first marker and "delete after" as the
last one).

This isn't a patch about the GUI definition of "before this frame" or
"after this frame" (although it would be nice to be able to do frame
precise cuts without the ambiguity).

--
Andrew.
----------------------------------------------------------------------
Andrew M. Bishop amb[at]gedanken.demon.co.uk
http://www.gedanken.demon.co.uk/
_______________________________________________
mythtv-dev mailing list
mythtv-dev[at]mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev


david.whyte at gmail

May 20, 2006, 6:41 AM

Post #7 of 8 (1092 views)
Permalink
Re: Transcode first/last frame problem [patch to v0.19] [In reply to]

>
> This is the whole point of the patch. If you use a "delete before"
> marker as the first one then the first frame appears in the output.
> The same as when a "delete after" is the last marker; the last frame
> appears in the output.
>
> If this patch doesn't go in then it means that transcoded videos
> contain one frame of unwanted video at the beginning and the end (if
> using "delete before" as the first marker and "delete after" as the
> last one).
>

Please allow this patch! I hate those first and last frames that get
left in the transcoded files...even when exporting with Nuvexport!!

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


adeffs.mythtv at gmail

May 20, 2006, 7:09 AM

Post #8 of 8 (1087 views)
Permalink
Re: Transcode first/last frame problem [patch to v0.19] [In reply to]

On 5/20/06, David Whyte <david.whyte[at]gmail.com> wrote:
> >
> > This is the whole point of the patch. If you use a "delete before"
> > marker as the first one then the first frame appears in the output.
> > The same as when a "delete after" is the last marker; the last frame
> > appears in the output.
> >
> > If this patch doesn't go in then it means that transcoded videos
> > contain one frame of unwanted video at the beginning and the end (if
> > using "delete before" as the first marker and "delete after" as the
> > last one).
> >
>
> Please allow this patch! I hate those first and last frames that get
> left in the transcoded files...even when exporting with Nuvexport!!

Lets hope Isaac or Daniel have time to look the patch over soon then
(and include it in fixes as well please =D

--
Steve
Before you ask, read the FAQ!
http://www.mythtv.org/wiki/index.php/Frequently_Asked_Questions
then search the Wiki, and this list,
http://www.gossamer-threads.com/lists/mythtv/
Mailinglist etiquette -
http://www.mythtv.org/wiki/index.php/Mailing_List_etiquette
_______________________________________________
mythtv-dev mailing list
mythtv-dev[at]mythtv.org
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 lists@gossamer-threads.com
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.