olivierayache / xuggle-xuggler

Xuggle's Xuggler Java API for Video
http://www.xuggle.com/xuggler
GNU Lesser General Public License v3.0
23 stars 6 forks source link

Video random access #10

Closed idobrt closed 8 months ago

idobrt commented 7 years ago

thanks for this fork man. I begin to process video on hadoop with xuggler dependencies (HVPI). I need to make somes adjusts because HVPI don't support random access. To process a video on hadoop i will need to read a file from a random position on the video. Do you know some way to read a video data stream (random access)?

olivierayache commented 7 years ago

Xuggler provide API to read video with an InputStream through IContainer.open method. Is this what you need?

Le 15 avr. 2017 19:00, "Rodrigo Brito" notifications@github.com a écrit :

thanks for this fork man. I begin to process video on hadoop with xuggler dependencies (HVPI). I need to make somes adjusts because HVPI don't support random access. To process a video on hadoop i will need to read a file from a random position on the video. Do you know some way to read a video data stream (random access)?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/olivierayache/xuggle-xuggler/issues/10, or mute the thread https://github.com/notifications/unsubscribe-auth/AHiiRcWz2hB3JXfDYg8u_GIWX5PBt0grks5rwPfBgaJpZM4M-ZqX .

idobrt commented 7 years ago

I will try to explain better. Sorry my english is not good. The HVPI use this. But I want, for example, read just a small video chunk around 128 MB in any position. For example I will read the first 128MB of a video file, save this position and start to read from this position. I will process these chunks in a cluster machine. But if I break the file in a wrong position i will lose the data. The HVPI use container.readNextPacket(packet) to extract the video frames but its supose the video file is a entire file. If my video file is bigger than 128MB (a hadoop default block size) it will be so slowler because the container.readNextPacket(packet) will read the packt until the file finish. But if I could cut the bigger video in the rigth position I will can process it around lot of machines.

olivierayache commented 7 years ago

I don't know if it fet your needs but you could use seekKeyFrame method from IContainer to seek at a given timestamp