[SciPy-User] ANN: imageio v1.1
Almar Klein
almar.klein at gmail.com
Sat Feb 7 11:20:17 EST 2015
> At least on linux it is definitively possible to set the fps via ffmpeg.
> The following command works fine on my computer:
> hkt at HP-Z200:~/.imageio/ffmpeg$ ./ffmpeg.linux64 -f v4l2 *-framerate 25*
> -video_size 640x480 -i /dev/video0 output.mkv
Great! Do you feel like submitting a pull request for this? Should be a
relatively easy one. The code should be somewhere in
imageio/plugins/ffmpeg.py.
Otherwise I can do it up when I have a chance.
- Almar
>
> I found the information at https://trac.ffmpeg.org/wiki/Capture/Webcam.
> It looks like it should work on windows too. But, I'm less certain about
> OS X.
>
> Best regards,
> Hjalmar
>
>
> On Thu, Feb 5, 2015 at 6:33 PM, Almar Klein <almar.klein at gmail.com
> <mailto:almar.klein at gmail.com>> wrote:
>
> Hi Hjalmar,
>
> Currently, there is no way to set fps for the webcam directly. You can
> set the size though, which is likely to affect the fps (smaller size ->
> higher fps. Just add e.g. ``size='768x576'`` to the arguments. Similarly
> you can set the pixelformat. See
> http://imageio.readthedocs.org/en/latest/format_ffmpeg.html
>
> I am not sure if setting fps directly is possible via ffmepg. You could
> look into it. I welcome a PR :)
>
> - Almar
>
>
> On 05-02-15 17:54, Hjalmar Turesson wrote:
> > Hi,
> >
> > It looks and works beautifully.
> > But... is there a way of setting the frame rate for webcams? I see that
> > one can set fps for a writer, but I cannot find a way to set fps for a
> > reader. And when using a webcam it makes sense to be able to control the
> > fps.
> >
> > Thanks a lot!
> > Hjalmar
> >
> > On Thu, Feb 5, 2015 at 6:40 AM, Christophe Bal <projetmbc at gmail.com <mailto:projetmbc at gmail.com>
> > <mailto:projetmbc at gmail.com <mailto:projetmbc at gmail.com>>> wrote:
> >
> > That's a very good point so I will play with your library which has
> > a so easy to use interface (I really like the way to walk through
> > the frames of video).
> >
> > Thanks a lot for your answers !
> >
> >
> > *Christophe BAL*
> > *Enseignant de mathématiques en Lycée **et développeur Python amateur*
> > *---*
> > *French math teacher in a "Lycée" **and **Python **amateur developer*
> >
> > 2015-02-05 10:37 GMT+01:00 Almar Klein <almar.klein at gmail.com <mailto:almar.klein at gmail.com>
> > <mailto:almar.klein at gmail.com <mailto:almar.klein at gmail.com>>>:
> >
> > > Working with pictures can be slow with Python so I would like to know if
> > > imageio is a fast, or a slow package, or a medium one ?
> >
> > Imageio only reads and writes images. It does that pretty fast. E.g.
> > png/jpg and other common formats are handled via the FreeImage
> > library.
> > Video via ffmpeg.
> >
> > When reading an image it yields a numpy array. For processing
> > the data,
> > you need to use other tools, e.g. scikit-image.
> >
> > - Almar
> >
> >
> >
> > >
> > > *Christophe BAL*
> > > *Enseignant de mathématiques en Lycée **et développeur Python amateur*
> > > *---*
> > > *French math teacher in a "Lycée" **and **Python **amateur developer*
> > >
> > > 2015-02-05 10:29 GMT+01:00 Almar Klein <almar.klein at gmail.com <mailto:almar.klein at gmail.com>
> <mailto:almar.klein at gmail.com <mailto:almar.klein at gmail.com>>
> > > <mailto:almar.klein at gmail.com
> <mailto:almar.klein at gmail.com> <mailto:almar.klein at gmail.com
> <mailto:almar.klein at gmail.com>>>>:
> > >
> > >
> > > > This looks nice. Is there some perfomance issue ?
> > >
> > > How do you mean?
> > >
> > > - Almar
> > >
> > >
> > > >
> > > >
> > > > *Christophe BAL*
> > > > *Enseignant de mathématiques en Lycée **et développeur Python
> > > amateur*
> > > > *---*
> > > > *French math teacher in a "Lycée" **and **Python **amateur developer*
> > > >
> > > > 2015-02-05 9:34 GMT+01:00 Philipp A. <flying-sheep at web.de <mailto:flying-sheep at web.de>
> <mailto:flying-sheep at web.de <mailto:flying-sheep at web.de>>
> > <mailto:flying-sheep at web.de <mailto:flying-sheep at web.de>
> <mailto:flying-sheep at web.de <mailto:flying-sheep at web.de>>>
> > > > <mailto:flying-sheep at web.de <mailto:flying-sheep at web.de>
> > <mailto:flying-sheep at web.de <mailto:flying-sheep at web.de>>
> <mailto:flying-sheep at web.de <mailto:flying-sheep at web.de>
> > <mailto:flying-sheep at web.de <mailto:flying-sheep at web.de>>>>>:
> > > >
> > > > this really fills a niche well. good job!
> > > >
> > > > Almar Klein <almar.klein at gmail.com <mailto:almar.klein at gmail.com>
> <mailto:almar.klein at gmail.com <mailto:almar.klein at gmail.com>>
> > > <mailto:almar.klein at gmail.com <mailto:almar.klein at gmail.com>
> > <mailto:almar.klein at gmail.com
> <mailto:almar.klein at gmail.com>>> <mailto:almar.klein at gmail.com
> <mailto:almar.klein at gmail.com>
> > <mailto:almar.klein at gmail.com <mailto:almar.klein at gmail.com>>
> > > <mailto:almar.klein at gmail.com
> <mailto:almar.klein at gmail.com> <mailto:almar.klein at gmail.com
> <mailto:almar.klein at gmail.com>>>>>
> > > > schrieb am Wed Feb 04 2015 at 15:43:47:
> > > >
> > > > Imageio is a Python library that provides
> an easy interface to
> > > > read and
> > > > write a wide range of image data,
> including animated images. video,
> > > > volumetric data, and scientific formats.
> It is cross-platform,
> > > > runs on
> > > > Python 2.x and 3.x, and is easy to install.
> > > >
> > > > More information:http://imageio.github.io/
> > > > Release notes:
> > >
> >http://imageio.readthedocs.__org/en/latest/releasenotes.__html
> > > >
> <http://imageio.readthedocs.org/en/latest/releasenotes.html>
> > > >
> > > > Regards,
> > > > Almar
> > > >
> _________________________________________________
> > > > SciPy-User mailing list
> > > >SciPy-User at scipy.org
> <mailto:SciPy-User at scipy.org> <mailto:SciPy-User at scipy.org
> <mailto:SciPy-User at scipy.org>>
> > <mailto:SciPy-User at scipy.org
> <mailto:SciPy-User at scipy.org> <mailto:SciPy-User at scipy.org
> <mailto:SciPy-User at scipy.org>>>
> > > <mailto:SciPy-User at scipy.org
> <mailto:SciPy-User at scipy.org>
> > <mailto:SciPy-User at scipy.org
> <mailto:SciPy-User at scipy.org>> <mailto:SciPy-User at scipy.org
> <mailto:SciPy-User at scipy.org>
> > <mailto:SciPy-User at scipy.org <mailto:SciPy-User at scipy.org>>>>
> > > >http://mail.scipy.org/mailman/__listinfo/scipy-user
> > > >
> <http://mail.scipy.org/mailman/listinfo/scipy-user>
> > > >
> > > >
> > > > _______________________________________________
> > > > SciPy-User mailing list
> > > >SciPy-User at scipy.org
> <mailto:SciPy-User at scipy.org> <mailto:SciPy-User at scipy.org
> <mailto:SciPy-User at scipy.org>>
> > <mailto:SciPy-User at scipy.org
> <mailto:SciPy-User at scipy.org> <mailto:SciPy-User at scipy.org
> <mailto:SciPy-User at scipy.org>>>
> > > <mailto:SciPy-User at scipy.org
> <mailto:SciPy-User at scipy.org>
> > <mailto:SciPy-User at scipy.org
> <mailto:SciPy-User at scipy.org>> <mailto:SciPy-User at scipy.org
> <mailto:SciPy-User at scipy.org>
> > <mailto:SciPy-User at scipy.org <mailto:SciPy-User at scipy.org>>>>
> > > > http://mail.scipy.org/mailman/listinfo/scipy-user
> > > >
> > > >
> > > >
> > > >
> > > > _______________________________________________
> > > > SciPy-User mailing list
> > > > SciPy-User at scipy.org
> <mailto:SciPy-User at scipy.org> <mailto:SciPy-User at scipy.org
> <mailto:SciPy-User at scipy.org>>
> > <mailto:SciPy-User at scipy.org
> <mailto:SciPy-User at scipy.org> <mailto:SciPy-User at scipy.org
> <mailto:SciPy-User at scipy.org>>>
> > > > http://mail.scipy.org/mailman/listinfo/scipy-user
> > > >
> > > _______________________________________________
> > > SciPy-User mailing list
> > > SciPy-User at scipy.org <mailto:SciPy-User at scipy.org>
> <mailto:SciPy-User at scipy.org <mailto:SciPy-User at scipy.org>>
> > <mailto:SciPy-User at scipy.org
> <mailto:SciPy-User at scipy.org> <mailto:SciPy-User at scipy.org
> <mailto:SciPy-User at scipy.org>>>
> > > http://mail.scipy.org/mailman/listinfo/scipy-user
> > >
> > >
> > >
> > >
> > > _______________________________________________
> > > SciPy-User mailing list
> > > SciPy-User at scipy.org <mailto:SciPy-User at scipy.org>
> <mailto:SciPy-User at scipy.org <mailto:SciPy-User at scipy.org>>
> > > http://mail.scipy.org/mailman/listinfo/scipy-user
> > >
> > _______________________________________________
> > SciPy-User mailing list
> > SciPy-User at scipy.org <mailto:SciPy-User at scipy.org>
> <mailto:SciPy-User at scipy.org <mailto:SciPy-User at scipy.org>>
> > http://mail.scipy.org/mailman/listinfo/scipy-user
> >
> >
> >
> > _______________________________________________
> > SciPy-User mailing list
> > SciPy-User at scipy.org <mailto:SciPy-User at scipy.org>
> <mailto:SciPy-User at scipy.org <mailto:SciPy-User at scipy.org>>
> > http://mail.scipy.org/mailman/listinfo/scipy-user
> >
> >
> >
> >
> > _______________________________________________
> > SciPy-User mailing list
> > SciPy-User at scipy.org <mailto:SciPy-User at scipy.org>
> > http://mail.scipy.org/mailman/listinfo/scipy-user
> >
> _______________________________________________
> SciPy-User mailing list
> SciPy-User at scipy.org <mailto:SciPy-User at scipy.org>
> http://mail.scipy.org/mailman/listinfo/scipy-user
>
>
>
>
> _______________________________________________
> SciPy-User mailing list
> SciPy-User at scipy.org
> http://mail.scipy.org/mailman/listinfo/scipy-user
>
More information about the SciPy-User
mailing list