Quantcast

Problem with ffmpeg

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Problem with ffmpeg

Stéphane Lallée
Hi !

I'm trying for the first time to compile yarp_ffmpeg (optional grabber device) so that I can stream .avi files through a yarp port.

I'm under windows, I got the cmake process being fine, but at compilation time then I get an error:

Error 11 error C2121: '#' : invalid character : possibly the result of a macro expansion D:\robotology\src\yarp\src\modules\ffmpeg\FfmpegGrabber.cpp 502 1 yarp_ffmpeg

The piece of code looks actually weird, with preprocessor conditions in the middle of a function parameters...

There is actually a typo that I spotted : 
 #ifndef FACTORED_DEVCE ---> #ifndef FACTORED_DEVICE

but it does't seem sufficient to make visual studio happy about this piece of code. So I had to remove the macro from within the function and then it was fine.

I had also a snprintf undefined on windows and an error with a constrstring. Now it compile but crash at execution with no message (yarpdev --device grabber --subdevice ffmpeag_grabber).

I attach the two files (although not working), I do not think I can commit on yarp.

My question is : is this module used/maintained ? Because the typo make it unlikely to work... ^^ Is there any other way to stream a video file using yarp ?

Cheers,
Stéphane Lallée

*-----------------------------------------------------*
Fusionopolis, Tower South 10#104
Singapore
(+65) 6408 2074
*------------------------------------------------------*

------------------------------------------------------------------------------
Comprehensive Server Monitoring with Site24x7.
Monitor 10 servers for $9/Month.
Get alerted through email, SMS, voice calls or mobile push notifications.
Take corrective actions from your mobile device.
http://pubads.g.doubleclick.net/gampad/clk?id=154624111&iu=/4140/ostg.clktrk
_______________________________________________
Robotcub-hackers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/robotcub-hackers

FfmpegGrabber.cpp (34K) Download Attachment
FfmpegWriter.cpp (33K) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Problem with ffmpeg

paulfitz
Administrator
Hi Stéphane,

I'd suggest using the opencv_grabber device.  The ffmpeg device needs to
be basically rewritten every 6 months.  The ffmpeg_grabber is drowning
in a sea of conditionals needed to support the range of ffmpeg versions
out there, and it is hard to test it adequately.  Sorry you hit a dud
configuration.  I'll poke at it again.

Cheers,
Paul

On 11/11/2014 01:20 PM, Stéphane Lallée wrote:

> Hi !
>
> I'm trying for the first time to compile yarp_ffmpeg (optional grabber
> device) so that I can stream .avi files through a yarp port.
>
> I'm under windows, I got the cmake process being fine, but at
> compilation time then I get an error:
>
> Error11error C2121: '#' : invalid character : possibly the result of a
> macro
> expansionD:\robotology\src\yarp\src\modules\ffmpeg\FfmpegGrabber.cpp5021yarp_ffmpeg
>
> The piece of code looks actually weird, with preprocessor conditions
> in the middle of a function parameters...
>
> There is actually a typo that I spotted :
>  #ifndef FACTORED_DEVCE ---> #ifndef FACTORED_DEVICE
>
> but it does't seem sufficient to make visual studio happy about this
> piece of code. So I had to remove the macro from within the function
> and then it was fine.
>
> I had also a snprintf undefined on windows and an error with a
> constrstring. Now it compile but crash at execution with no message
> (yarpdev --device grabber --subdevice ffmpeag_grabber).
>
> I attach the two files (although not working), I do not think I can
> commit on yarp.
>
> My question is : is this module used/maintained ? Because the typo
> make it unlikely to work... ^^ Is there any other way to stream a
> video file using yarp ?
>
> Cheers,
> Stéphane Lallée
>
> *-----------------------------------------------------*
> A*Star Scientist
> Institute for Infocomm Research - I²R <http://www.i2r.a-star.edu.sg/>
> /Fusionopolis, Tower South 10#104
> //Singapore/
> /(+65) 6408 2074/
> [hidden email] <mailto:[hidden email]>
> *------------------------------------------------------*
>


------------------------------------------------------------------------------
Comprehensive Server Monitoring with Site24x7.
Monitor 10 servers for $9/Month.
Get alerted through email, SMS, voice calls or mobile push notifications.
Take corrective actions from your mobile device.
http://pubads.g.doubleclick.net/gampad/clk?id=154624111&iu=/4140/ostg.clktrk
_______________________________________________
Robotcub-hackers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/robotcub-hackers
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Problem with ffmpeg

Stéphane Lallée
Hi Paul !

THanks I'll use opencv grabber. I had the impression that ffmpeg was required for files, if not then it is perfect :)

Stéphane Lallée

*-----------------------------------------------------*
Fusionopolis, Tower South 10#104
Singapore
(+65) 6408 2074
*------------------------------------------------------*

2014-11-11 23:19 GMT+08:00 Paul Fitzpatrick <[hidden email]>:
Hi Stéphane,

I'd suggest using the opencv_grabber device.  The ffmpeg device needs to
be basically rewritten every 6 months.  The ffmpeg_grabber is drowning
in a sea of conditionals needed to support the range of ffmpeg versions
out there, and it is hard to test it adequately.  Sorry you hit a dud
configuration.  I'll poke at it again.

Cheers,
Paul

On 11/11/2014 01:20 PM, Stéphane Lallée wrote:
> Hi !
>
> I'm trying for the first time to compile yarp_ffmpeg (optional grabber
> device) so that I can stream .avi files through a yarp port.
>
> I'm under windows, I got the cmake process being fine, but at
> compilation time then I get an error:
>
> Error11error C2121: '#' : invalid character : possibly the result of a
> macro
> expansionD:\robotology\src\yarp\src\modules\ffmpeg\FfmpegGrabber.cpp5021yarp_ffmpeg
>
> The piece of code looks actually weird, with preprocessor conditions
> in the middle of a function parameters...
>
> There is actually a typo that I spotted :
>  #ifndef FACTORED_DEVCE ---> #ifndef FACTORED_DEVICE
>
> but it does't seem sufficient to make visual studio happy about this
> piece of code. So I had to remove the macro from within the function
> and then it was fine.
>
> I had also a snprintf undefined on windows and an error with a
> constrstring. Now it compile but crash at execution with no message
> (yarpdev --device grabber --subdevice ffmpeag_grabber).
>
> I attach the two files (although not working), I do not think I can
> commit on yarp.
>
> My question is : is this module used/maintained ? Because the typo
> make it unlikely to work... ^^ Is there any other way to stream a
> video file using yarp ?
>
> Cheers,
> Stéphane Lallée
>
> *-----------------------------------------------------*
> A*Star Scientist
> Institute for Infocomm Research - I²R <http://www.i2r.a-star.edu.sg/>
> /Fusionopolis, Tower South 10#104
> //Singapore/
> /<a href="tel:%28%2B65%29%206408%202074" value="+6564082074">(+65) 6408 2074/
> [hidden email] <mailto:[hidden email]>
> *------------------------------------------------------*
>


------------------------------------------------------------------------------
Comprehensive Server Monitoring with Site24x7.
Monitor 10 servers for $9/Month.
Get alerted through email, SMS, voice calls or mobile push notifications.
Take corrective actions from your mobile device.
http://pubads.g.doubleclick.net/gampad/clk?id=154624111&iu=/4140/ostg.clktrk
_______________________________________________
Robotcub-hackers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/robotcub-hackers


------------------------------------------------------------------------------
Comprehensive Server Monitoring with Site24x7.
Monitor 10 servers for $9/Month.
Get alerted through email, SMS, voice calls or mobile push notifications.
Take corrective actions from your mobile device.
http://pubads.g.doubleclick.net/gampad/clk?id=154624111&iu=/4140/ostg.clktrk
_______________________________________________
Robotcub-hackers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/robotcub-hackers
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Problem with ffmpeg

Stéphane Lallée
Just a quick question related to this grabber and devices in general : is there any command to see all the available parameters of a specific device, or do we have to check within the existing conf files / source code ?

Thanks,
Stephane

Stéphane Lallée

*-----------------------------------------------------*
Fusionopolis, Tower South 10#104
Singapore
(+65) 6408 2074
*------------------------------------------------------*

2014-11-12 9:16 GMT+08:00 Stéphane Lallée <[hidden email]>:
Hi Paul !

THanks I'll use opencv grabber. I had the impression that ffmpeg was required for files, if not then it is perfect :)

Stéphane Lallée

*-----------------------------------------------------*
Fusionopolis, Tower South 10#104
Singapore
<a href="tel:%28%2B65%29%206408%202074" value="+6564082074" target="_blank">(+65) 6408 2074
*------------------------------------------------------*

2014-11-11 23:19 GMT+08:00 Paul Fitzpatrick <[hidden email]>:
Hi Stéphane,

I'd suggest using the opencv_grabber device.  The ffmpeg device needs to
be basically rewritten every 6 months.  The ffmpeg_grabber is drowning
in a sea of conditionals needed to support the range of ffmpeg versions
out there, and it is hard to test it adequately.  Sorry you hit a dud
configuration.  I'll poke at it again.

Cheers,
Paul

On 11/11/2014 01:20 PM, Stéphane Lallée wrote:
> Hi !
>
> I'm trying for the first time to compile yarp_ffmpeg (optional grabber
> device) so that I can stream .avi files through a yarp port.
>
> I'm under windows, I got the cmake process being fine, but at
> compilation time then I get an error:
>
> Error11error C2121: '#' : invalid character : possibly the result of a
> macro
> expansionD:\robotology\src\yarp\src\modules\ffmpeg\FfmpegGrabber.cpp5021yarp_ffmpeg
>
> The piece of code looks actually weird, with preprocessor conditions
> in the middle of a function parameters...
>
> There is actually a typo that I spotted :
>  #ifndef FACTORED_DEVCE ---> #ifndef FACTORED_DEVICE
>
> but it does't seem sufficient to make visual studio happy about this
> piece of code. So I had to remove the macro from within the function
> and then it was fine.
>
> I had also a snprintf undefined on windows and an error with a
> constrstring. Now it compile but crash at execution with no message
> (yarpdev --device grabber --subdevice ffmpeag_grabber).
>
> I attach the two files (although not working), I do not think I can
> commit on yarp.
>
> My question is : is this module used/maintained ? Because the typo
> make it unlikely to work... ^^ Is there any other way to stream a
> video file using yarp ?
>
> Cheers,
> Stéphane Lallée
>
> *-----------------------------------------------------*
> A*Star Scientist
> Institute for Infocomm Research - I²R <http://www.i2r.a-star.edu.sg/>
> /Fusionopolis, Tower South 10#104
> //Singapore/
> /<a href="tel:%28%2B65%29%206408%202074" value="+6564082074" target="_blank">(+65) 6408 2074/
> [hidden email] <mailto:[hidden email]>
> *------------------------------------------------------*
>


------------------------------------------------------------------------------
Comprehensive Server Monitoring with Site24x7.
Monitor 10 servers for $9/Month.
Get alerted through email, SMS, voice calls or mobile push notifications.
Take corrective actions from your mobile device.
http://pubads.g.doubleclick.net/gampad/clk?id=154624111&iu=/4140/ostg.clktrk
_______________________________________________
Robotcub-hackers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/robotcub-hackers



------------------------------------------------------------------------------
Comprehensive Server Monitoring with Site24x7.
Monitor 10 servers for $9/Month.
Get alerted through email, SMS, voice calls or mobile push notifications.
Take corrective actions from your mobile device.
http://pubads.g.doubleclick.net/gampad/clk?id=154624111&iu=/4140/ostg.clktrk
_______________________________________________
Robotcub-hackers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/robotcub-hackers
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Problem with ffmpeg

paulfitz
Administrator
Hi Stéphane,

Just add --verbose when calling yarpdev.  You'll get a list of all
options checked by the device.  Example:

$ yarpdev --device opencv_grabber --verbose
||| configuring
||| no policy found
Unable to open camera for capture!
yarpdev: ***ERROR*** driver <opencv_grabber> was found but could not open
yarpdev: ***ERROR*** driver <grabber> was found but could not open
===============================================================
== Options checked by device:
==
device=opencv_grabber
grabber.subdevice=opencv_grabber
     name (or nested configuration) of device to wrap
opencv_grabber.device=opencv_grabber
opencv_grabber.movie
     if present, read from specified file rather than camera
opencv_grabber.camera [-1]
     if present, read from camera identified by this index
grabber.device=grabber
==
===============================================================
yarpdev: ***ERROR*** device not available.


So you are probably looking for the --movie option.

Best,
Paul

On 11/13/2014 08:56 AM, Stéphane Lallée wrote:

> Just a quick question related to this grabber and devices in general :
> is there any command to see all the available parameters of a specific
> device, or do we have to check within the existing conf files / source
> code ?
>
> Thanks,
> Stephane
>
> Stéphane Lallée
>
> *-----------------------------------------------------*
> A*Star Scientist
> Institute for Infocomm Research - I²R <http://www.i2r.a-star.edu.sg/>
> /Fusionopolis, Tower South 10#104
> //Singapore/
> /(+65) 6408 2074/
> [hidden email] <mailto:[hidden email]>
> *------------------------------------------------------*
>
> 2014-11-12 9:16 GMT+08:00 Stéphane Lallée <[hidden email]
> <mailto:[hidden email]>>:
>
>     Hi Paul !
>
>     THanks I'll use opencv grabber. I had the impression that ffmpeg
>     was required for files, if not then it is perfect :)
>
>     Stéphane Lallée
>
>     *-----------------------------------------------------*
>     A*Star Scientist
>     Institute for Infocomm Research - I²R <http://www.i2r.a-star.edu.sg/>
>     /Fusionopolis, Tower South 10#104
>     //Singapore/
>     /(+65) 6408 2074 <tel:%28%2B65%29%206408%202074>/
>     [hidden email] <mailto:[hidden email]>
>     *------------------------------------------------------*
>
>     2014-11-11 23:19 GMT+08:00 Paul Fitzpatrick <[hidden email]
>     <mailto:[hidden email]>>:
>
>         Hi Stéphane,
>
>         I'd suggest using the opencv_grabber device.  The ffmpeg
>         device needs to
>         be basically rewritten every 6 months.  The ffmpeg_grabber is
>         drowning
>         in a sea of conditionals needed to support the range of ffmpeg
>         versions
>         out there, and it is hard to test it adequately. Sorry you hit
>         a dud
>         configuration.  I'll poke at it again.
>
>         Cheers,
>         Paul
>
>         On 11/11/2014 01:20 PM, Stéphane Lallée wrote:
>         > Hi !
>         >
>         > I'm trying for the first time to compile yarp_ffmpeg
>         (optional grabber
>         > device) so that I can stream .avi files through a yarp port.
>         >
>         > I'm under windows, I got the cmake process being fine, but at
>         > compilation time then I get an error:
>         >
>         > Error11error C2121: '#' : invalid character : possibly the
>         result of a
>         > macro
>         >
>         expansionD:\robotology\src\yarp\src\modules\ffmpeg\FfmpegGrabber.cpp5021yarp_ffmpeg
>         >
>         > The piece of code looks actually weird, with preprocessor
>         conditions
>         > in the middle of a function parameters...
>         >
>         > There is actually a typo that I spotted :
>         >  #ifndef FACTORED_DEVCE ---> #ifndef FACTORED_DEVICE
>         >
>         > but it does't seem sufficient to make visual studio happy
>         about this
>         > piece of code. So I had to remove the macro from within the
>         function
>         > and then it was fine.
>         >
>         > I had also a snprintf undefined on windows and an error with a
>         > constrstring. Now it compile but crash at execution with no
>         message
>         > (yarpdev --device grabber --subdevice ffmpeag_grabber).
>         >
>         > I attach the two files (although not working), I do not
>         think I can
>         > commit on yarp.
>         >
>         > My question is : is this module used/maintained ? Because
>         the typo
>         > make it unlikely to work... ^^ Is there any other way to
>         stream a
>         > video file using yarp ?
>         >
>         > Cheers,
>         > Stéphane Lallée
>         >
>         > *-----------------------------------------------------*
>         > A*Star Scientist
>         > Institute for Infocomm Research - I²R
>         <http://www.i2r.a-star.edu.sg/>
>         > /Fusionopolis, Tower South 10#104
>         > //Singapore/
>         > /(+65) 6408 2074 <tel:%28%2B65%29%206408%202074>/
>         > [hidden email]
>         <mailto:[hidden email]>
>         <mailto:[hidden email]
>         <mailto:[hidden email]>>
>         > *------------------------------------------------------*
>         >
>
>
>         ------------------------------------------------------------------------------
>         Comprehensive Server Monitoring with Site24x7.
>         Monitor 10 servers for $9/Month.
>         Get alerted through email, SMS, voice calls or mobile push
>         notifications.
>         Take corrective actions from your mobile device.
>         http://pubads.g.doubleclick.net/gampad/clk?id=154624111&iu=/4140/ostg.clktrk
>         _______________________________________________
>         Robotcub-hackers mailing list
>         [hidden email]
>         <mailto:[hidden email]>
>         https://lists.sourceforge.net/lists/listinfo/robotcub-hackers
>
>
>


------------------------------------------------------------------------------
Comprehensive Server Monitoring with Site24x7.
Monitor 10 servers for $9/Month.
Get alerted through email, SMS, voice calls or mobile push notifications.
Take corrective actions from your mobile device.
http://pubads.g.doubleclick.net/gampad/clk?id=154624111&iu=/4140/ostg.clktrk
_______________________________________________
Robotcub-hackers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/robotcub-hackers
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Problem with ffmpeg

Stéphane Lallée
In reply to this post by Stéphane Lallée
Hi Paul !

I tried that, I had the --movie parameter already, I was looking for
the --framerate one (which doesn't appears here).
I think somehow it would be good to have an automated way of listing
all the parameters of a device/module, like for thrift and the module
methods.

I did that in my own code by keeping a field "parameters" which is a
Property that is assigned at startup, with all the parameters (default
and overriden ones). Instead of having a value then I access them at
runtime using the find() method. Probably not the most efficient way...

Anyway, that is just a suggestion, it is not crucial in the end ;-)

Cheers,
Stéphane

Envoyé à partir de mon Windows Phone
De : Paul Fitzpatrick
Envoyé : 13/11/2014 22:25
À : Stéphane Lallée
Cc : Robotcub-hackers
Objet : Re: [rc-hackers] Problem with ffmpeg
Hi Stéphane,

Just add --verbose when calling yarpdev.  You'll get a list of all
options checked by the device.  Example:

$ yarpdev --device opencv_grabber --verbose
||| configuring
||| no policy found
Unable to open camera for capture!
yarpdev: ***ERROR*** driver <opencv_grabber> was found but could not open
yarpdev: ***ERROR*** driver <grabber> was found but could not open
===============================================================
== Options checked by device:
==
device=opencv_grabber
grabber.subdevice=opencv_grabber
     name (or nested configuration) of device to wrap
opencv_grabber.device=opencv_grabber
opencv_grabber.movie
     if present, read from specified file rather than camera
opencv_grabber.camera [-1]
     if present, read from camera identified by this index
grabber.device=grabber
==
===============================================================
yarpdev: ***ERROR*** device not available.


So you are probably looking for the --movie option.

Best,
Paul

On 11/13/2014 08:56 AM, Stéphane Lallée wrote:

> Just a quick question related to this grabber and devices in general :
> is there any command to see all the available parameters of a specific
> device, or do we have to check within the existing conf files / source
> code ?
>
> Thanks,
> Stephane
>
> Stéphane Lallée
>
> *-----------------------------------------------------*
> A*Star Scientist
> Institute for Infocomm Research - I²R <http://www.i2r.a-star.edu.sg/>
> /Fusionopolis, Tower South 10#104
> //Singapore/
> /(+65) 6408 2074/
> [hidden email] <mailto:[hidden email]>
> *------------------------------------------------------*
>
> 2014-11-12 9:16 GMT+08:00 Stéphane Lallée <[hidden email]
> <mailto:[hidden email]>>:
>
>     Hi Paul !
>
>     THanks I'll use opencv grabber. I had the impression that ffmpeg
>     was required for files, if not then it is perfect :)
>
>     Stéphane Lallée
>
>     *-----------------------------------------------------*
>     A*Star Scientist
>     Institute for Infocomm Research - I²R <http://www.i2r.a-star.edu.sg/>
>     /Fusionopolis, Tower South 10#104
>     //Singapore/
>     /(+65) 6408 2074 <tel:%28%2B65%29%206408%202074>/
>     [hidden email] <mailto:[hidden email]>
>     *------------------------------------------------------*
>
>     2014-11-11 23:19 GMT+08:00 Paul Fitzpatrick <[hidden email]
>     <mailto:[hidden email]>>:
>
>         Hi Stéphane,
>
>         I'd suggest using the opencv_grabber device.  The ffmpeg
>         device needs to
>         be basically rewritten every 6 months.  The ffmpeg_grabber is
>         drowning
>         in a sea of conditionals needed to support the range of ffmpeg
>         versions
>         out there, and it is hard to test it adequately. Sorry you hit
>         a dud
>         configuration.  I'll poke at it again.
>
>         Cheers,
>         Paul
>
>         On 11/11/2014 01:20 PM, Stéphane Lallée wrote:
>         > Hi !
>         >
>         > I'm trying for the first time to compile yarp_ffmpeg
>         (optional grabber
>         > device) so that I can stream .avi files through a yarp port.
>         >
>         > I'm under windows, I got the cmake process being fine, but at
>         > compilation time then I get an error:
>         >
>         > Error11error C2121: '#' : invalid character : possibly the
>         result of a
>         > macro
>         >
>         expansionD:\robotology\src\yarp\src\modules\ffmpeg\FfmpegGrabber.cpp5021yarp_ffmpeg
>         >
>         > The piece of code looks actually weird, with preprocessor
>         conditions
>         > in the middle of a function parameters...
>         >
>         > There is actually a typo that I spotted :
>         >  #ifndef FACTORED_DEVCE ---> #ifndef FACTORED_DEVICE
>         >
>         > but it does't seem sufficient to make visual studio happy
>         about this
>         > piece of code. So I had to remove the macro from within the
>         function
>         > and then it was fine.
>         >
>         > I had also a snprintf undefined on windows and an error with a
>         > constrstring. Now it compile but crash at execution with no
>         message
>         > (yarpdev --device grabber --subdevice ffmpeag_grabber).
>         >
>         > I attach the two files (although not working), I do not
>         think I can
>         > commit on yarp.
>         >
>         > My question is : is this module used/maintained ? Because
>         the typo
>         > make it unlikely to work... ^^ Is there any other way to
>         stream a
>         > video file using yarp ?
>         >
>         > Cheers,
>         > Stéphane Lallée
>         >
>         > *-----------------------------------------------------*
>         > A*Star Scientist
>         > Institute for Infocomm Research - I²R
>         <http://www.i2r.a-star.edu.sg/>
>         > /Fusionopolis, Tower South 10#104
>         > //Singapore/
>         > /(+65) 6408 2074 <tel:%28%2B65%29%206408%202074>/
>         > [hidden email]
>         <mailto:[hidden email]>
>         <mailto:[hidden email]
>         <mailto:[hidden email]>>
>         > *------------------------------------------------------*
>         >
>
>
>         ------------------------------------------------------------------------------
>         Comprehensive Server Monitoring with Site24x7.
>         Monitor 10 servers for $9/Month.
>         Get alerted through email, SMS, voice calls or mobile push
>         notifications.
>         Take corrective actions from your mobile device.
>         http://pubads.g.doubleclick.net/gampad/clk?id=154624111&iu=/4140/ostg.clktrk
>         _______________________________________________
>         Robotcub-hackers mailing list
>         [hidden email]
>         <mailto:[hidden email]>
>         https://lists.sourceforge.net/lists/listinfo/robotcub-hackers
>
>
>

------------------------------------------------------------------------------
Comprehensive Server Monitoring with Site24x7.
Monitor 10 servers for $9/Month.
Get alerted through email, SMS, voice calls or mobile push notifications.
Take corrective actions from your mobile device.
http://pubads.g.doubleclick.net/gampad/clk?id=154624111&iu=/4140/ostg.clktrk
_______________________________________________
Robotcub-hackers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/robotcub-hackers
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Problem with ffmpeg

paulfitz
Administrator

Once you have a movie loading, you can find the options that apply to it
via --verbose again:

   yarpdev --device opencv_grabber --verbose --movie test.avi

===============================================================
== Options checked by device:
==
device=opencv_grabber
grabber.subdevice=opencv_grabber
     name (or nested configuration) of device to wrap
opencv_grabber.device=opencv_grabber
opencv_grabber.movie=(value too long)
     if present, read from specified file rather than camera
opencv_grabber.loop
     if present, loop movie
opencv_grabber.width
     if present, specifies desired image width
opencv_grabber.height
     if present, specifies desired image height
grabber.no_drop
     if present, use strict policy for sending data
grabber.stamp
     if present, add timestamps to data
grabber.name [/grabber]
     name of port to send data on
grabber.single_threaded
     if present, operate in single threaded mode
grabber.framerate [0]
     maximum rate in Hz to read from subdevice
==
===============================================================

However you are absolutely right that there are cleaner ways to do this,
not arguing that at all.  The "--verbose" probing was intended as a
fallback for poorly documented devices, so even if a developer wrote no
documentation at all (or the documentation was out of date), you could
always probe to find what options a device is checking.

Cheers,
Paul

On 11/13/2014 11:56 PM, Stéphane Lallée wrote:

> Hi Paul !
>
> I tried that, I had the --movie parameter already, I was looking for
> the --framerate one (which doesn't appears here).
> I think somehow it would be good to have an automated way of listing
> all the parameters of a device/module, like for thrift and the module
> methods.
>
> I did that in my own code by keeping a field "parameters" which is a
> Property that is assigned at startup, with all the parameters (default
> and overriden ones). Instead of having a value then I access them at
> runtime using the find() method. Probably not the most efficient way...
>
> Anyway, that is just a suggestion, it is not crucial in the end ;-)
>
> Cheers,
> Stéphane
>
> Envoyé à partir de mon Windows Phone
> De : Paul Fitzpatrick
> Envoyé : 13/11/2014 22:25
> À : Stéphane Lallée
> Cc : Robotcub-hackers
> Objet : Re: [rc-hackers] Problem with ffmpeg
> Hi Stéphane,
>
> Just add --verbose when calling yarpdev.  You'll get a list of all
> options checked by the device.  Example:
>
> $ yarpdev --device opencv_grabber --verbose
> ||| configuring
> ||| no policy found
> Unable to open camera for capture!
> yarpdev: ***ERROR*** driver <opencv_grabber> was found but could not open
> yarpdev: ***ERROR*** driver <grabber> was found but could not open
> ===============================================================
> == Options checked by device:
> ==
> device=opencv_grabber
> grabber.subdevice=opencv_grabber
>       name (or nested configuration) of device to wrap
> opencv_grabber.device=opencv_grabber
> opencv_grabber.movie
>       if present, read from specified file rather than camera
> opencv_grabber.camera [-1]
>       if present, read from camera identified by this index
> grabber.device=grabber
> ==
> ===============================================================
> yarpdev: ***ERROR*** device not available.
>
>
> So you are probably looking for the --movie option.
>
> Best,
> Paul
>
> On 11/13/2014 08:56 AM, Stéphane Lallée wrote:
>> Just a quick question related to this grabber and devices in general :
>> is there any command to see all the available parameters of a specific
>> device, or do we have to check within the existing conf files / source
>> code ?
>>
>> Thanks,
>> Stephane
>>
>> Stéphane Lallée
>>
>> *-----------------------------------------------------*
>> A*Star Scientist
>> Institute for Infocomm Research - I²R <http://www.i2r.a-star.edu.sg/>
>> /Fusionopolis, Tower South 10#104
>> //Singapore/
>> /(+65) 6408 2074/
>> [hidden email] <mailto:[hidden email]>
>> *------------------------------------------------------*
>>
>> 2014-11-12 9:16 GMT+08:00 Stéphane Lallée <[hidden email]
>> <mailto:[hidden email]>>:
>>
>>      Hi Paul !
>>
>>      THanks I'll use opencv grabber. I had the impression that ffmpeg
>>      was required for files, if not then it is perfect :)
>>
>>      Stéphane Lallée
>>
>>      *-----------------------------------------------------*
>>      A*Star Scientist
>>      Institute for Infocomm Research - I²R <http://www.i2r.a-star.edu.sg/>
>>      /Fusionopolis, Tower South 10#104
>>      //Singapore/
>>      /(+65) 6408 2074 <tel:%28%2B65%29%206408%202074>/
>>      [hidden email] <mailto:[hidden email]>
>>      *------------------------------------------------------*
>>
>>      2014-11-11 23:19 GMT+08:00 Paul Fitzpatrick <[hidden email]
>>      <mailto:[hidden email]>>:
>>
>>          Hi Stéphane,
>>
>>          I'd suggest using the opencv_grabber device.  The ffmpeg
>>          device needs to
>>          be basically rewritten every 6 months.  The ffmpeg_grabber is
>>          drowning
>>          in a sea of conditionals needed to support the range of ffmpeg
>>          versions
>>          out there, and it is hard to test it adequately. Sorry you hit
>>          a dud
>>          configuration.  I'll poke at it again.
>>
>>          Cheers,
>>          Paul
>>
>>          On 11/11/2014 01:20 PM, Stéphane Lallée wrote:
>>          > Hi !
>>          >
>>          > I'm trying for the first time to compile yarp_ffmpeg
>>          (optional grabber
>>          > device) so that I can stream .avi files through a yarp port.
>>          >
>>          > I'm under windows, I got the cmake process being fine, but at
>>          > compilation time then I get an error:
>>          >
>>          > Error11error C2121: '#' : invalid character : possibly the
>>          result of a
>>          > macro
>>          >
>>          expansionD:\robotology\src\yarp\src\modules\ffmpeg\FfmpegGrabber.cpp5021yarp_ffmpeg
>>          >
>>          > The piece of code looks actually weird, with preprocessor
>>          conditions
>>          > in the middle of a function parameters...
>>          >
>>          > There is actually a typo that I spotted :
>>          >  #ifndef FACTORED_DEVCE ---> #ifndef FACTORED_DEVICE
>>          >
>>          > but it does't seem sufficient to make visual studio happy
>>          about this
>>          > piece of code. So I had to remove the macro from within the
>>          function
>>          > and then it was fine.
>>          >
>>          > I had also a snprintf undefined on windows and an error with a
>>          > constrstring. Now it compile but crash at execution with no
>>          message
>>          > (yarpdev --device grabber --subdevice ffmpeag_grabber).
>>          >
>>          > I attach the two files (although not working), I do not
>>          think I can
>>          > commit on yarp.
>>          >
>>          > My question is : is this module used/maintained ? Because
>>          the typo
>>          > make it unlikely to work... ^^ Is there any other way to
>>          stream a
>>          > video file using yarp ?
>>          >
>>          > Cheers,
>>          > Stéphane Lallée
>>          >
>>          > *-----------------------------------------------------*
>>          > A*Star Scientist
>>          > Institute for Infocomm Research - I²R
>>          <http://www.i2r.a-star.edu.sg/>
>>          > /Fusionopolis, Tower South 10#104
>>          > //Singapore/
>>          > /(+65) 6408 2074 <tel:%28%2B65%29%206408%202074>/
>>          > [hidden email]
>>          <mailto:[hidden email]>
>>          <mailto:[hidden email]
>>          <mailto:[hidden email]>>
>>          > *------------------------------------------------------*
>>          >
>>
>>
>>          ------------------------------------------------------------------------------
>>          Comprehensive Server Monitoring with Site24x7.
>>          Monitor 10 servers for $9/Month.
>>          Get alerted through email, SMS, voice calls or mobile push
>>          notifications.
>>          Take corrective actions from your mobile device.
>>          http://pubads.g.doubleclick.net/gampad/clk?id=154624111&iu=/4140/ostg.clktrk
>>          _______________________________________________
>>          Robotcub-hackers mailing list
>>          [hidden email]
>>          <mailto:[hidden email]>
>>          https://lists.sourceforge.net/lists/listinfo/robotcub-hackers
>>
>>
>>


------------------------------------------------------------------------------
Comprehensive Server Monitoring with Site24x7.
Monitor 10 servers for $9/Month.
Get alerted through email, SMS, voice calls or mobile push notifications.
Take corrective actions from your mobile device.
http://pubads.g.doubleclick.net/gampad/clk?id=154624111&iu=/4140/ostg.clktrk
_______________________________________________
Robotcub-hackers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/robotcub-hackers
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Problem with ffmpeg

Stéphane Lallée
Ha ! I was not aware that the verbose report increased when specifying other parameters. Ok, perfect :)
Thanks a lot !
Stephane

Stéphane Lallée

*-----------------------------------------------------*
Fusionopolis, Tower South 10#104
Singapore
(+65) 6408 2074
*------------------------------------------------------*

2014-11-14 11:55 GMT+08:00 Paul Fitzpatrick <[hidden email]>:

Once you have a movie loading, you can find the options that apply to it via --verbose again:

  yarpdev --device opencv_grabber --verbose --movie test.avi

===============================================================
== Options checked by device:
==
device=opencv_grabber
grabber.subdevice=opencv_grabber
    name (or nested configuration) of device to wrap
opencv_grabber.device=opencv_grabber
opencv_grabber.movie=(value too long)
    if present, read from specified file rather than camera
opencv_grabber.loop
    if present, loop movie
opencv_grabber.width
    if present, specifies desired image width
opencv_grabber.height
    if present, specifies desired image height
grabber.no_drop
    if present, use strict policy for sending data
grabber.stamp
    if present, add timestamps to data
grabber.name [/grabber]
    name of port to send data on
grabber.single_threaded
    if present, operate in single threaded mode
grabber.framerate [0]
    maximum rate in Hz to read from subdevice
==
===============================================================

However you are absolutely right that there are cleaner ways to do this, not arguing that at all.  The "--verbose" probing was intended as a fallback for poorly documented devices, so even if a developer wrote no documentation at all (or the documentation was out of date), you could always probe to find what options a device is checking.

Cheers,
Paul


On 11/13/2014 11:56 PM, Stéphane Lallée wrote:
Hi Paul !

I tried that, I had the --movie parameter already, I was looking for
the --framerate one (which doesn't appears here).
I think somehow it would be good to have an automated way of listing
all the parameters of a device/module, like for thrift and the module
methods.

I did that in my own code by keeping a field "parameters" which is a
Property that is assigned at startup, with all the parameters (default
and overriden ones). Instead of having a value then I access them at
runtime using the find() method. Probably not the most efficient way...

Anyway, that is just a suggestion, it is not crucial in the end ;-)

Cheers,
Stéphane

Envoyé à partir de mon Windows Phone
De : Paul Fitzpatrick
Envoyé : 13/11/2014 22:25
À : Stéphane Lallée
Cc : Robotcub-hackers
Objet : Re: [rc-hackers] Problem with ffmpeg
Hi Stéphane,

Just add --verbose when calling yarpdev.  You'll get a list of all
options checked by the device.  Example:

$ yarpdev --device opencv_grabber --verbose
||| configuring
||| no policy found
Unable to open camera for capture!
yarpdev: ***ERROR*** driver <opencv_grabber> was found but could not open
yarpdev: ***ERROR*** driver <grabber> was found but could not open
===============================================================
== Options checked by device:
==
device=opencv_grabber
grabber.subdevice=opencv_grabber
      name (or nested configuration) of device to wrap
opencv_grabber.device=opencv_grabber
opencv_grabber.movie
      if present, read from specified file rather than camera
opencv_grabber.camera [-1]
      if present, read from camera identified by this index
grabber.device=grabber
==
===============================================================
yarpdev: ***ERROR*** device not available.


So you are probably looking for the --movie option.

Best,
Paul

On 11/13/2014 08:56 AM, Stéphane Lallée wrote:
Just a quick question related to this grabber and devices in general :
is there any command to see all the available parameters of a specific
device, or do we have to check within the existing conf files / source
code ?

Thanks,
Stephane

Stéphane Lallée

*-----------------------------------------------------*
A*Star Scientist
Institute for Infocomm Research - I²R <http://www.i2r.a-star.edu.sg/>
/Fusionopolis, Tower South 10#104
//Singapore/
/<a href="tel:%28%2B65%29%206408%202074" value="+6564082074" target="_blank">(+65) 6408 2074/
[hidden email] <mailto:[hidden email]>
*------------------------------------------------------*

2014-11-12 9:16 GMT+08:00 Stéphane Lallée <[hidden email]
<mailto:[hidden email]>>:

     Hi Paul !

     THanks I'll use opencv grabber. I had the impression that ffmpeg
     was required for files, if not then it is perfect :)

     Stéphane Lallée

     *-----------------------------------------------------*
     A*Star Scientist
     Institute for Infocomm Research - I²R <http://www.i2r.a-star.edu.sg/>
     /Fusionopolis, Tower South 10#104
     //Singapore/
     /<a href="tel:%28%2B65%29%206408%202074" value="+6564082074" target="_blank">(+65) 6408 2074 <tel:%28%2B65%29%206408%202074>/
     [hidden email] <mailto:[hidden email]>
     *------------------------------------------------------*

     2014-11-11 23:19 GMT+08:00 Paul Fitzpatrick <[hidden email]
     <mailto:[hidden email]>>:

         Hi Stéphane,

         I'd suggest using the opencv_grabber device.  The ffmpeg
         device needs to
         be basically rewritten every 6 months.  The ffmpeg_grabber is
         drowning
         in a sea of conditionals needed to support the range of ffmpeg
         versions
         out there, and it is hard to test it adequately. Sorry you hit
         a dud
         configuration.  I'll poke at it again.

         Cheers,
         Paul

         On 11/11/2014 01:20 PM, Stéphane Lallée wrote:
         > Hi !
         >
         > I'm trying for the first time to compile yarp_ffmpeg
         (optional grabber
         > device) so that I can stream .avi files through a yarp port.
         >
         > I'm under windows, I got the cmake process being fine, but at
         > compilation time then I get an error:
         >
         > Error11error C2121: '#' : invalid character : possibly the
         result of a
         > macro
         >
         expansionD:\robotology\src\yarp\src\modules\ffmpeg\FfmpegGrabber.cpp5021yarp_ffmpeg
         >
         > The piece of code looks actually weird, with preprocessor
         conditions
         > in the middle of a function parameters...
         >
         > There is actually a typo that I spotted :
         >  #ifndef FACTORED_DEVCE ---> #ifndef FACTORED_DEVICE
         >
         > but it does't seem sufficient to make visual studio happy
         about this
         > piece of code. So I had to remove the macro from within the
         function
         > and then it was fine.
         >
         > I had also a snprintf undefined on windows and an error with a
         > constrstring. Now it compile but crash at execution with no
         message
         > (yarpdev --device grabber --subdevice ffmpeag_grabber).
         >
         > I attach the two files (although not working), I do not
         think I can
         > commit on yarp.
         >
         > My question is : is this module used/maintained ? Because
         the typo
         > make it unlikely to work... ^^ Is there any other way to
         stream a
         > video file using yarp ?
         >
         > Cheers,
         > Stéphane Lallée
         >
         > *-----------------------------------------------------*
         > A*Star Scientist
         > Institute for Infocomm Research - I²R
         <http://www.i2r.a-star.edu.sg/>
         > /Fusionopolis, Tower South 10#104
         > //Singapore/
         > /<a href="tel:%28%2B65%29%206408%202074" value="+6564082074" target="_blank">(+65) 6408 2074 <tel:%28%2B65%29%206408%202074>/
         > [hidden email]
         <mailto:[hidden email]>
         <mailto:[hidden email]
         <mailto:[hidden email]>>
         > *------------------------------------------------------*
         >


         ------------------------------------------------------------------------------
         Comprehensive Server Monitoring with Site24x7.
         Monitor 10 servers for $9/Month.
         Get alerted through email, SMS, voice calls or mobile push
         notifications.
         Take corrective actions from your mobile device.
         http://pubads.g.doubleclick.net/gampad/clk?id=154624111&iu=/4140/ostg.clktrk
         _______________________________________________
         Robotcub-hackers mailing list
         [hidden email]
         <mailto:[hidden email]>
         https://lists.sourceforge.net/lists/listinfo/robotcub-hackers






------------------------------------------------------------------------------
Comprehensive Server Monitoring with Site24x7.
Monitor 10 servers for $9/Month.
Get alerted through email, SMS, voice calls or mobile push notifications.
Take corrective actions from your mobile device.
http://pubads.g.doubleclick.net/gampad/clk?id=154624111&iu=/4140/ostg.clktrk
_______________________________________________
Robotcub-hackers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/robotcub-hackers
Loading...