Re: [Interest] mirroring and reversing QMovie

2016-07-13 Thread Frank Rueter | OHUfx

Yeah, true.
It may not be an issue though, as this is to preview a bunch of small, 
animated thumbnails of fairly short video clips for a library interface, 
not for playing back long, high resolution, high quality movies.


However, if there are ideas on how to make this more efficient I'd be 
more than happy to learn.

This is what I got for so far:
https://gitlab.com/snippets/22447


Cheers,
frank

On 07/14/2016 12:18 PM, Thiago Macieira wrote:

Em quinta-feira, 14 de julho de 2016, às 11:41:12 PDT, Frank Rueter | OHUfx
escreveu:

Thanks.
What I'm currently exploring is using QImageReader, caching the frames
via read() and basically implementing basic play back functions with
timers in a custom paintEvent. That way I should have full control over
which image is displayed when.
Probably won't be the most efficient considering my lack of experience
with those sort of things but I will cross that bridge when I get there :)

No, it's not.

You're basically describing MJPEG, a movie format made up of a sequence of
JPEG-compressed frames. That's older than and produces movies that are less
well compressed than MPEG1, which in turn is older than MPEG 2 (used on DVDs
and most of the world's digital TV broadcasts), which is older than MPEG 4,
which in turn is not as efficient than MPEG 4 Advanced Video Codec a.k.a. H.264.
You'll get none of the improvements made over the last 20 years of video
coding.



___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] mirroring and reversing QMovie

2016-07-13 Thread Thiago Macieira
Em quinta-feira, 14 de julho de 2016, às 11:41:12 PDT, Frank Rueter | OHUfx 
escreveu:
> Thanks.
> What I'm currently exploring is using QImageReader, caching the frames
> via read() and basically implementing basic play back functions with
> timers in a custom paintEvent. That way I should have full control over
> which image is displayed when.
> Probably won't be the most efficient considering my lack of experience
> with those sort of things but I will cross that bridge when I get there :)

No, it's not.

You're basically describing MJPEG, a movie format made up of a sequence of 
JPEG-compressed frames. That's older than and produces movies that are less 
well compressed than MPEG1, which in turn is older than MPEG 2 (used on DVDs 
and most of the world's digital TV broadcasts), which is older than MPEG 4, 
which in turn is not as efficient than MPEG 4 Advanced Video Codec a.k.a. 
H.264. 
You'll get none of the improvements made over the last 20 years of video 
coding.

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center

___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] mirroring and reversing QMovie

2016-07-13 Thread Frank Rueter | OHUfx

Thanks.
What I'm currently exploring is using QImageReader, caching the frames 
via read() and basically implementing basic play back functions with 
timers in a custom paintEvent. That way I should have full control over 
which image is displayed when.
Probably won't be the most efficient considering my lack of experience 
with those sort of things but I will cross that bridge when I get there :)


Cheers,
frank

On 14/07/16 3:46 am, Thiago Macieira wrote:

Em quarta-feira, 13 de julho de 2016, às 14:09:33 PDT, Frank Rueter | OHUfx
escreveu:

Yup, I know all that, but once you cache a movie you can do that though
(because it takes care of what you describe).
It's a feature I need, and it will cost memory for sure, but that's the
app I need to write.

QMovie can't do that.

You probably need to go down to the video decoder API yourself and see if it
has an API to cache hundreds of frames in some way.

It might not even be permitted by DRM on your OS.



--
ohufxLogo 50x50 

*vfx for storytellers *

*vfx compositing  | 
*workflow customisation & consulting 
**


*W E L L I N G T O N|N E W   Z E A L A N D *

___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] mirroring and reversing QMovie

2016-07-13 Thread Thiago Macieira
Em quarta-feira, 13 de julho de 2016, às 14:09:33 PDT, Frank Rueter | OHUfx 
escreveu:
> Yup, I know all that, but once you cache a movie you can do that though
> (because it takes care of what you describe).
> It's a feature I need, and it will cost memory for sure, but that's the
> app I need to write.

QMovie can't do that.

You probably need to go down to the video decoder API yourself and see if it 
has an API to cache hundreds of frames in some way.

It might not even be permitted by DRM on your OS.

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center

___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] mirroring and reversing QMovie

2016-07-13 Thread Frank Rueter | OHUfx
Yup, I know all that, but once you cache a movie you can do that though 
(because it takes care of what you describe).
It's a feature I need, and it will cost memory for sure, but that's the 
app I need to write.



Cheers,
frank

On 12/07/16 5:38 pm, Thiago Macieira wrote:

On terça-feira, 12 de julho de 2016 15:48:47 PDT Frank Rueter | OHUfx wrote:

Hi all,

I am wondering how to mirror a cached QMovie object horizontally and
vertically and how to play it in reverse.
Is this even achievable with QMovie? If not could it be achieved by
manipulating the IODevice somehow?
I can't find a single thing online about this sort of thing.

Forget about playing it in reverse. Movie files are encoded in such a way that
the frame N+1 depends on the rendering of frame N. To play in reverse, you
need to render all of the non-key frames, store them in memory, then display
them.

That's why rewinding on moving players is usually choppy, while fast-forward
can be smooth: rewinding often simply displays the key frames.



--
ohufxLogo 50x50 

*vfx for storytellers *

*vfx compositing  | 
*workflow customisation & consulting 
**


*W E L L I N G T O N|N E W   Z E A L A N D *

___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] mirroring and reversing QMovie

2016-07-11 Thread Thiago Macieira
On terça-feira, 12 de julho de 2016 15:48:47 PDT Frank Rueter | OHUfx wrote:
> Hi all,
> 
> I am wondering how to mirror a cached QMovie object horizontally and
> vertically and how to play it in reverse.
> Is this even achievable with QMovie? If not could it be achieved by
> manipulating the IODevice somehow?
> I can't find a single thing online about this sort of thing.

Forget about playing it in reverse. Movie files are encoded in such a way that 
the frame N+1 depends on the rendering of frame N. To play in reverse, you 
need to render all of the non-key frames, store them in memory, then display 
them.

That's why rewinding on moving players is usually choppy, while fast-forward 
can be smooth: rewinding often simply displays the key frames.

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center

___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] mirroring and reversing QMovie

2016-07-11 Thread Frank Rueter | OHUfx

Hi all,

I am wondering how to mirror a cached QMovie object horizontally and 
vertically and how to play it in reverse.
Is this even achievable with QMovie? If not could it be achieved by 
manipulating the IODevice somehow?

I can't find a single thing online about this sort of thing.

Cheers,
frank

--
ohufxLogo 50x50  	*vfx compositing 
 | *workflow customisation 
and consulting * *


___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest