Author Topic: PCL: Blink module  (Read 71385 times)

Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 7111
    • http://pixinsight.com/
Re: PCL: Blink module
« Reply #75 on: 2012 June 18 08:32:40 »
I have never tried to do this, so I'm not sure if it will work. Try this:

ImageWindow blinkScreen
// ...
blinkScreen.SetViewportPosition( blinkScreen.ViewportPosition() );


If this doesn't work, try this one:

blinkScreen.SetViewportPosition( blinkScreen.ViewportPosition()+1 );
blinkScreen.SetViewportPosition( blinkScreen.ViewportPosition()-1 );


Let me know if it works. Anyway, I'll add this functionality to pcl::ImageWindow in version 1.8.
Juan Conejero
PixInsight Development Team
http://pixinsight.com/

Offline Philippe B.

  • PixInsight Old Hand
  • ****
  • Posts: 399
    • CIEL AUSTRAL
Re: PCL: Blink module
« Reply #76 on: 2012 June 18 08:58:19 »
Hi folks

Something which should be very very very... nice should to have possibility to save a ANIMATED GIF file from the BLINK menu (or another new PI module)

I explain : we can easily make BLINK with this wonderful module. This will help to see difference between images. But, often, we want to save this blink as a GIF file, animated to show on website or forum a process difference...

So we have to save each PNG file and use a ANIMATED GIF program to generate the animated gig. Too complicated...

If PI could do this, it should be usefull

Thanks !
Philippe


Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 7111
    • http://pixinsight.com/
Re: PCL: Blink module
« Reply #77 on: 2012 June 18 10:11:09 »
That's a powerful idea :)

But I don't like GIF. It is an obsolete format that supports only 256 colors and no transparency.

How about a movie? How about calling ffmpeg or mencoder from the Blink process with a list of frames (in PNG format for example), to create a movie (.ogv, .avi, .mov, etc)? That would be an absolute BOMB!

Nikolay?  >:D
Juan Conejero
PixInsight Development Team
http://pixinsight.com/

Offline vicent_peris

  • PTeam Member
  • PixInsight Padawan
  • ****
  • Posts: 988
    • http://www.astrofoto.es/
Re: PCL: Blink module
« Reply #78 on: 2012 June 18 10:39:52 »
That's a powerful idea :)

But I don't like GIF. It is an obsolete format that supports only 256 colors and no transparency.

How about a movie? How about calling ffmpeg or mencoder from the Blink process with a list of frames (in PNG format for example), to create a movie (.ogv, .avi, .mov, etc)? That would be an absolute BOMB!

Nikolay?  >:D


This would be very nice six months ago. ;)

I was thinking also on this solution. On one hand, it would be useful to save all the transformed images *separately* in the chosen format. On the other hand, you can also output a movie... The problem is the incoding: relying in an external software package can be problematic. Mencoder and FFMpeg are available under Linux and can be commanded through command; could be this a problem under Windows or OSX?? Also is not very nice the idea of asking the user to install two external programs...


Regards,
V.

Offline georg.viehoever

  • PTeam Member
  • PixInsight Jedi Master
  • ******
  • Posts: 2132
Re: PCL: Blink module
« Reply #79 on: 2012 June 18 11:06:56 »
There are enough programs out there than can create a video from a sequence of images. IMHO, let's PI do what it can do best, and leave the other things to other expert programs.
Georg (6 inch Newton, unmodified Canon EOS40D+80D, unguided EQ5 mount)

Offline vicent_peris

  • PTeam Member
  • PixInsight Padawan
  • ****
  • Posts: 988
    • http://www.astrofoto.es/
Re: PCL: Blink module
« Reply #80 on: 2012 June 18 11:25:00 »
There are enough programs out there than can create a video from a sequence of images. IMHO, let's PI do what it can do best, and leave the other things to other expert programs.


Anyway, it would be good if it can export the images with the applied HT.

V.

Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 7111
    • http://pixinsight.com/
Re: PCL: Blink module
« Reply #81 on: 2012 June 18 11:33:08 »
ffmpeg has been ported to Windows. The same is true for mplayer (which contains mencoder). As Georg says, there are other alternatives too.

On Mac OS X, both applications can be built without problems since OS X is a UNIX OS.

Of course, writing the individual images should also be easy and a useful option.

Quote
not very nice the idea of asking the user to install two external programs...

We can distribute a compiled version of the video encoder for each platform, as part of the PI distribution. This is very easy with the update system.
Juan Conejero
PixInsight Development Team
http://pixinsight.com/

Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 7111
    • http://pixinsight.com/
Re: PCL: Blink module
« Reply #82 on: 2012 June 18 11:35:25 »
Georg,

Quote
let's PI do what it can do best, and leave the other things to other expert programs.

In the case of video encoding, I have to agree with you completely.
Juan Conejero
PixInsight Development Team
http://pixinsight.com/

Offline vicent_peris

  • PTeam Member
  • PixInsight Padawan
  • ****
  • Posts: 988
    • http://www.astrofoto.es/
Re: PCL: Blink module
« Reply #83 on: 2012 June 18 11:41:27 »
The license of ffmpeg and mencoder allows to distribute them with PixInsight??

In the (near?) future it would be great to use them to *decode* videos.


V.

ffmpeg has been ported to Windows. The same is true for mplayer (which contains mencoder). As Georg says, there are other alternatives too.

On Mac OS X, both applications can be built without problems since OS X is a UNIX OS.

Of course, writing the individual images should also be easy and a useful option.

Quote
not very nice the idea of asking the user to install two external programs...

We can distribute a compiled version of the video encoder for each platform, as part of the PI distribution. This is very easy with the update system.

Offline NKV

  • PTeam Member
  • PixInsight Guru
  • ****
  • Posts: 677
Re: PCL: Blink module
« Reply #84 on: 2012 June 18 20:51:07 »
blinkScreen.SetViewportPosition( blinkScreen.ViewportPosition() );
doesn't work
Quote
blinkScreen.SetViewportPosition( blinkScreen.ViewportPosition()+1 );
blinkScreen.SetViewportPosition( blinkScreen.ViewportPosition()-1 );

doesn't work

nice should to have possibility to save a ANIMATED GIF file from the BLINK menu (or another new PI module)
Of course i can integrate video coding to Blink. But why inside Blink? I think it should be independent PI module. Also BachFormatConverter much better place. ;)


Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 7111
    • http://pixinsight.com/
Re: PCL: Blink module
« Reply #85 on: 2012 June 19 01:40:24 »
Quote
doesn't work
doesn't work

I was afraid that would be the case ... was just a shot in the dark :) Anyway, I'll implement this functionality in version 1.8. Right now this can't be done, or at least I'm not aware of a way to do it. If I discover one, I'll let you know.

Quote
Of course i can integrate video coding to Blink

No! Please don't do that! The idea is to invoke an external application to perform the video encoding task (divide and conquer strategy). It is basically a two-step procedure:

- Generate a set of video frames at a user-selected resolution. Wikipedia has a nice chart in SVG format that compares all standard resolutions. These video frames could be generated as PNG images on a working directory; that's super easy to do with PCL. I'd include the possibility to select a region of interest. Note also that in order to create smooth transitions at video rates of 25 fps or more, this may involve generation of intermediate video frames by interpolation from images loaded in Blink.

- From the Blink module, invoke a command line application to perform the video encoding work.

- Optionally, delete the working frames once a video has been successfully encoded. Or leave them in case the user wants to use them later (see Vicent's comments).

I think ffmpeg is our best option. It is cross-platform, works extremely well, and is released under LGPL license, which allows us to include it in PI distributions.

Now the only problem is that PCL does not currently support execution of external processes (the PJSR does support it for JavaScript scripts). However if there is interest in this development line, I can push inclusion of this functionality in PCL and the core application.

Quote
But why inside Blink?

Because Blink is already a perfect movie maker/previewer. Note the icon that I drew for your module :)
Juan Conejero
PixInsight Development Team
http://pixinsight.com/

Offline georg.viehoever

  • PTeam Member
  • PixInsight Jedi Master
  • ******
  • Posts: 2132
Re: PCL: Blink module
« Reply #86 on: 2012 June 19 01:54:53 »
...
Now the only problem is that PCL does not currently support execution of external processes (the PJSR does support it for JavaScript scripts). However if there is interest in this development line, I can push inclusion of this functionality in PCL and the core application.
...

I definitely would like to see the ability to launch(+kill) exterrnal processes in PCL, optionally with control of stdin/out/err. Using PI to drive other tools is certainly interesting in a number of cases.
Georg
Georg (6 inch Newton, unmodified Canon EOS40D+80D, unguided EQ5 mount)

Offline mschuster

  • PTeam Member
  • PixInsight Jedi
  • *****
  • Posts: 1087
Re: PCL: Blink module
« Reply #87 on: 2012 June 19 10:04:08 »
Nikolay, a couple convenient features I want to suggest:

- Add image views as well as files to the list.

- Reload views and files if they change. Maybe a "Reload" button?

Mike

Offline Philippe B.

  • PixInsight Old Hand
  • ****
  • Posts: 399
    • CIEL AUSTRAL
Re: PCL: Blink module
« Reply #88 on: 2012 June 20 09:23:56 »


nice should to have possibility to save a ANIMATED GIF file from the BLINK menu (or another new PI module)
Of course i can integrate video coding to Blink. But why inside Blink? I think it should be independent PI module. Also BachFormatConverter much better place. ;)

Goal is to get directly an ANIMATED GIF from the blink. No need to go in another process because animated GIF is only possible if BLINK needed.
If you want to make a BatchFormat for GIF, why not, but you need to add the option ANIMATED (put all frame together in a GIF file with delay inside) so I think only BLINK process can fully do this 



That's a powerful idea :)

But I don't like GIF. It is an obsolete format that supports only 256 colors and no transparency.

How about a movie? How about calling ffmpeg or mencoder from the Blink process with a list of frames (in PNG format for example), to create a movie (.ogv, .avi, .mov, etc)? That would be an absolute BOMB!

Nikolay?  >:D

Yes, Juan, it is a nice idea too, but sometimes, you need to show on forum some BLINK effect to compare process for example, then animated GIF is supported in all forums
AVI is more complicated (you need video viewer to open file, file can be huge in size...)

Cheers

Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 7111
    • http://pixinsight.com/
Re: PCL: Blink module
« Reply #89 on: 2012 June 20 12:44:46 »
Philippe,

Note that ffmpeg can generate animated GIFs (GIF is just one of the output file formats supported). So movie generation does not exclude this possibility.
Juan Conejero
PixInsight Development Team
http://pixinsight.com/