Play video files on Yarp port

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

Play video files on Yarp port

erikbilling
Dear rc-hackers, 

I'm looking for a Yarp module able to read video files (avi, various encodings) and stream them on a yarp port. I've seen a lot of discussion on how to record from Yarp  bottles, and some of how to replay a recorded dump - but in my case files are not recorded using Yarp. 

Any suggestions welcome, 
--
Erik Billing,
Assoc. Senior Lecturer,  
University of Skövde


------------------------------------------------------------------------------

_______________________________________________
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: Play video files on Yarp port

Tobias Fischer
Hi,

there are at least two options:
1) ffmpeg_grabber and
2) opencv_grabber

You can find examples for both here: http://www.yarp.it/group__dev__examples.html

And if you want to modify a driver, you can finds some hints here: http://wiki.icub.org/wiki/Modifying_a_YARP_Driver

Best,
Tobias

On 20/11/15 08:36, Erik Billing wrote:
Dear rc-hackers, 

I'm looking for a Yarp module able to read video files (avi, various encodings) and stream them on a yarp port. I've seen a lot of discussion on how to record from Yarp  bottles, and some of how to replay a recorded dump - but in my case files are not recorded using Yarp. 

Any suggestions welcome, 
--
Erik Billing,
Assoc. Senior Lecturer,  
University of Skövde



------------------------------------------------------------------------------


_______________________________________________
Robotcub-hackers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/robotcub-hackers


------------------------------------------------------------------------------

_______________________________________________
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: Play video files on Yarp port

Konstantinos Theofilis
In reply to this post by erikbilling
Hi Eric

The yarp device opencv_grabber is what you need. It will play video from a file (among other things and send the output to a Yarp port.

Best,
Kostas

On Nov 20, 2015, at 6:00 PM, Erik Billing <[hidden email]> wrote:

Dear rc-hackers, 

I'm looking for a Yarp module able to read video files (avi, various encodings) and stream them on a yarp port. I've seen a lot of discussion on how to record from Yarp  bottles, and some of how to replay a recorded dump - but in my case files are not recorded using Yarp. 

Any suggestions welcome, 
--
Erik Billing,
Assoc. Senior Lecturer,  
University of Skövde

------------------------------------------------------------------------------
_______________________________________________
Robotcub-hackers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/robotcub-hackers

------------------------------------------------------------------------------

_______________________________________________
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: Play video files on Yarp port

erikbilling
In reply to this post by erikbilling
Dear Tobias and Konstantinos, 

many thanx for the hint. I've tried to use both the ffmpeg and opencv grabbers but they do not seem to be present on my system (running Win 7 with Yarp 2.3.63). I realize I can do  yarpdev --list and neither ffmpeg nor opencv are present in the list. Maybe I'm missing something fundamental, so I need to install these grabbers separately? 

Kind regards, 
--
Erik Billing,
Assoc. Senior Lecturer,  
University of Skövde


fre 20 nov. 2015 kl 11:32 skrev Tobias Fischer <[hidden email]>:
Hi,

there are at least two options:
1) ffmpeg_grabber and
2) opencv_grabber

You can find examples for both here: http://www.yarp.it/group__dev__examples.html

And if you want to modify a driver, you can finds some hints here: http://wiki.icub.org/wiki/Modifying_a_YARP_Driver

Best,
Tobias


On 20/11/15 08:36, Erik Billing wrote:
Dear rc-hackers, 

I'm looking for a Yarp module able to read video files (avi, various encodings) and stream them on a yarp port. I've seen a lot of discussion on how to record from Yarp  bottles, and some of how to replay a recorded dump - but in my case files are not recorded using Yarp. 

Any suggestions welcome, 
--
Erik Billing,
Assoc. Senior Lecturer,  
University of Skövde



------------------------------------------------------------------------------


_______________________________________________
Robotcub-hackers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/robotcub-hackers

------------------------------------------------------------------------------
Go from Idea to Many App Stores Faster with Intel(R) XDK
Give your users amazing mobile app experiences with Intel(R) XDK.
Use one codebase in this all-in-one HTML5 development environment.
Design, debug & build mobile apps & 2D/3D high-impact games for multiple OSs.
http://pubads.g.doubleclick.net/gampad/clk?id=254741551&iu=/4140
_______________________________________________
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: Play video files on Yarp port

Tobias Fischer
Hi,

see this: http://www.yarp.it/yarpdev.html

In short, you need to first enable CREATE_DEVICE_LIBRARY_MODULES in the cmake options, and after configuring once also enable ENABLE_yarpmod_opencv_grabber / ENABLE_yarpmod_ffmpeg_grabber or whatever driver you need.


Best,
Tobias

On 26/11/15 07:51, Erik Billing wrote:
Dear Tobias and Konstantinos, 

many thanx for the hint. I've tried to use both the ffmpeg and opencv grabbers but they do not seem to be present on my system (running Win 7 with Yarp 2.3.63). I realize I can do  yarpdev --list and neither ffmpeg nor opencv are present in the list. Maybe I'm missing something fundamental, so I need to install these grabbers separately? 

Kind regards, 
--
Erik Billing,
Assoc. Senior Lecturer,  
University of Skövde


fre 20 nov. 2015 kl 11:32 skrev Tobias Fischer <[hidden email]>:
Hi,

there are at least two options:
1) ffmpeg_grabber and
2) opencv_grabber

You can find examples for both here: http://www.yarp.it/group__dev__examples.html

And if you want to modify a driver, you can finds some hints here: http://wiki.icub.org/wiki/Modifying_a_YARP_Driver

Best,
Tobias


On 20/11/15 08:36, Erik Billing wrote:
Dear rc-hackers, 

I'm looking for a Yarp module able to read video files (avi, various encodings) and stream them on a yarp port. I've seen a lot of discussion on how to record from Yarp  bottles, and some of how to replay a recorded dump - but in my case files are not recorded using Yarp. 

Any suggestions welcome, 
--
Erik Billing,
Assoc. Senior Lecturer,  
University of Skövde



------------------------------------------------------------------------------


_______________________________________________
Robotcub-hackers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/robotcub-hackers


------------------------------------------------------------------------------
Go from Idea to Many App Stores Faster with Intel(R) XDK
Give your users amazing mobile app experiences with Intel(R) XDK.
Use one codebase in this all-in-one HTML5 development environment.
Design, debug & build mobile apps & 2D/3D high-impact games for multiple OSs.
http://pubads.g.doubleclick.net/gampad/clk?id=254741551&iu=/4140
_______________________________________________
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: Play video files on Yarp port

erikbilling
In reply to this post by erikbilling
Ah, I see - simple when you know it. Many thanx for the help!
--
Erik Billing,
Assoc. Senior Lecturer,  
University of Skövde


tors 26 nov. 2015 kl 10:46 skrev Tobias Fischer <[hidden email]>:
Hi,

see this: http://www.yarp.it/yarpdev.html

In short, you need to first enable CREATE_DEVICE_LIBRARY_MODULES in the cmake options, and after configuring once also enable ENABLE_yarpmod_opencv_grabber / ENABLE_yarpmod_ffmpeg_grabber or whatever driver you need.


Best,
Tobias


On 26/11/15 07:51, Erik Billing wrote:
Dear Tobias and Konstantinos, 

many thanx for the hint. I've tried to use both the ffmpeg and opencv grabbers but they do not seem to be present on my system (running Win 7 with Yarp 2.3.63). I realize I can do  yarpdev --list and neither ffmpeg nor opencv are present in the list. Maybe I'm missing something fundamental, so I need to install these grabbers separately? 

Kind regards, 
--
Erik Billing,
Assoc. Senior Lecturer,  
University of Skövde


fre 20 nov. 2015 kl 11:32 skrev Tobias Fischer <[hidden email]>:
Hi,

there are at least two options:
1) ffmpeg_grabber and
2) opencv_grabber

You can find examples for both here: http://www.yarp.it/group__dev__examples.html

And if you want to modify a driver, you can finds some hints here: http://wiki.icub.org/wiki/Modifying_a_YARP_Driver

Best,
Tobias


On 20/11/15 08:36, Erik Billing wrote:
Dear rc-hackers, 

I'm looking for a Yarp module able to read video files (avi, various encodings) and stream them on a yarp port. I've seen a lot of discussion on how to record from Yarp  bottles, and some of how to replay a recorded dump - but in my case files are not recorded using Yarp. 

Any suggestions welcome, 
--
Erik Billing,
Assoc. Senior Lecturer,  
University of Skövde



------------------------------------------------------------------------------


_______________________________________________
Robotcub-hackers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/robotcub-hackers


------------------------------------------------------------------------------
Go from Idea to Many App Stores Faster with Intel(R) XDK
Give your users amazing mobile app experiences with Intel(R) XDK.
Use one codebase in this all-in-one HTML5 development environment.
Design, debug & build mobile apps & 2D/3D high-impact games for multiple OSs.
http://pubads.g.doubleclick.net/gampad/clk?id=254741551&iu=/4140
_______________________________________________
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: Play video files on Yarp port

erikbilling
Dear Tobias and the rest of the list, 

I've now a follow up on my earlier question regarding video playback. I've used the opencv grabber as suggested and it's been working just fine. No I'd like to playback several video files simultaneously with exact frame sync. I've therefore created my own module that instantiates the OpenCVGrabber and writes images to a port, rather than using the grabber through yarpdev. 

It turns out my custom frame streamer is significantly slower than streaming images by instantiating the OpenCVGrabber using yarpdev --from myconfig.ini. I've tried using both a standard Port and a BufferedPort<ImageOf<PixelRgb>> and in both cases the port writing takes up a lot of resources. I'm using a simple configuration where a single HD-resolution video is streamed to a yarpview display.

I'm following the basic pattern in image_process_module example, with the exception that I'm of course reading images directly from the grabber rather than from a port. http://www.yarp.it/os_2image_process_module_8cpp-example.html#a6, like this: 

MyRateThread::run() {
  ...
  grabber->getImage(outputImage);
  imagePortOut->write(outputImage);
}

outputImage is here declared as ImageOf<PixelRgb> and imagePortOut is a standard yarp Port configured with background write. I've confirmed that it is the port writing that takes time, the call to the grabber is of course fast. 

In the final setup, I intend to use four simultaneous (synced) video streams that go to several target ports, some are yarpviews and some other yarp modules. The streams eats up a lot of resources and I'm lousing frames. 

Any suggestions on how I should go about it are welcome. 

Kind regards, Erik

tors 26 nov. 2015 kl 11:04 skrev Erik Billing <[hidden email]>:
Ah, I see - simple when you know it. Many thanx for the help!

--
Erik Billing,
Assoc. Senior Lecturer,  
University of Skövde


tors 26 nov. 2015 kl 10:46 skrev Tobias Fischer <[hidden email]>:
Hi,

see this: http://www.yarp.it/yarpdev.html

In short, you need to first enable CREATE_DEVICE_LIBRARY_MODULES in the cmake options, and after configuring once also enable ENABLE_yarpmod_opencv_grabber / ENABLE_yarpmod_ffmpeg_grabber or whatever driver you need.


Best,
Tobias


On 26/11/15 07:51, Erik Billing wrote:
Dear Tobias and Konstantinos, 

many thanx for the hint. I've tried to use both the ffmpeg and opencv grabbers but they do not seem to be present on my system (running Win 7 with Yarp 2.3.63). I realize I can do  yarpdev --list and neither ffmpeg nor opencv are present in the list. Maybe I'm missing something fundamental, so I need to install these grabbers separately? 

Kind regards, 
--
Erik Billing,
Assoc. Senior Lecturer,  
University of Skövde


fre 20 nov. 2015 kl 11:32 skrev Tobias Fischer <[hidden email]>:
Hi,

there are at least two options:
1) ffmpeg_grabber and
2) opencv_grabber

You can find examples for both here: http://www.yarp.it/group__dev__examples.html

And if you want to modify a driver, you can finds some hints here: http://wiki.icub.org/wiki/Modifying_a_YARP_Driver

Best,
Tobias


On 20/11/15 08:36, Erik Billing wrote:
Dear rc-hackers, 

I'm looking for a Yarp module able to read video files (avi, various encodings) and stream them on a yarp port. I've seen a lot of discussion on how to record from Yarp  bottles, and some of how to replay a recorded dump - but in my case files are not recorded using Yarp. 

Any suggestions welcome, 
--
Erik Billing,
Assoc. Senior Lecturer,  
University of Skövde



------------------------------------------------------------------------------


_______________________________________________
Robotcub-hackers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/robotcub-hackers


------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
_______________________________________________
Robotcub-hackers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/robotcub-hackers
Loading...