How to read video frames in hadoop?如何在Hadoop中读取视频帧?
2013-08-21 17:43
387 查看
To process specialized file formats (such as video) in Hadoop, you'd have to write a custom InputFormat and RecordReader that understands how to turn a video file into splits (the InputFormat) and then read splits into values (the RecordReader).在Hadoop要处理的专用文件格式(如视频),你就必须写一个自定义的InputFormat和RecordReader,了解如何将一个视频文件分割(InputFormat),然后读值(RecordReader)分裂成。 This is a non-trivial task and requires some intermediate knowledge of how Hadoop handles the splitting of data.这是一个不平凡的任务和Hadoop的处理分割的数据需要一些中间的知识。 I highly recommend Tom White's Hadoop the Definitive Guide book by O'Reilly as well as the videos on http://www.cloudera.com .我强烈建议汤姆白色的Hadoop权威指南书由O'Reilly和视频http://www.cloudera.com 。 (Full disclosure: I work for Cloudera.) (披露:我工作的Cloudera的。)
Keep in mind that video formats are generally compressed which gets even more complicated because InputSplits (created by an InputFormat) are simple byte offsets into the file (normally).请记住,一般都是压缩的视频格式变得更加复杂,因为InputSplits创建一个InputFormat是简单的字节偏移量到文件中(通常情况下)。 Start withhttp://hadoop.apache.org/common/docs/current/api/org/apache/hadoop/mapred/InputFormat.html从与http://hadoop.apache.org/common/docs/current/api/org/apache/hadoop/mapred/InputFormat.html开始
To summarize: InputFormat knows how to generate a list of InputSplit objects that are (usually) between 64MB and 128MB and do NOT respect the notion of frames.总结:InputFormat知道如何生成的列表InputSplit对象(通常情况下),64MB和128MB之间, 不尊重的概念框架。 The RecordReader then is used to read frames out of a InputSplit to create value objects that the map reduce job can process. “的RecordReader然后是用于读取帧一的InputSplit,以创建的Map Reduce作业可以处理的值对象。 If you want to generate video output you'll also need to write a custom OutputFormat.如果你想生成视频输出,您还需要编写一个自定义的OutputFormat。
Hope this helps.希望这会有所帮助。
Keep in mind that video formats are generally compressed which gets even more complicated because InputSplits (created by an InputFormat) are simple byte offsets into the file (normally).请记住,一般都是压缩的视频格式变得更加复杂,因为InputSplits创建一个InputFormat是简单的字节偏移量到文件中(通常情况下)。 Start withhttp://hadoop.apache.org/common/docs/current/api/org/apache/hadoop/mapred/InputFormat.html从与http://hadoop.apache.org/common/docs/current/api/org/apache/hadoop/mapred/InputFormat.html开始
To summarize: InputFormat knows how to generate a list of InputSplit objects that are (usually) between 64MB and 128MB and do NOT respect the notion of frames.总结:InputFormat知道如何生成的列表InputSplit对象(通常情况下),64MB和128MB之间, 不尊重的概念框架。 The RecordReader then is used to read frames out of a InputSplit to create value objects that the map reduce job can process. “的RecordReader然后是用于读取帧一的InputSplit,以创建的Map Reduce作业可以处理的值对象。 If you want to generate video output you'll also need to write a custom OutputFormat.如果你想生成视频输出,您还需要编写一个自定义的OutputFormat。
Hope this helps.希望这会有所帮助。
相关文章推荐
- how_to_open_AnyChat_HD_video_effects如何开启视频高清效果
- [转]how to programatically access built-in properties of open xml word doc(如何读取open xml格式文档属性)
- How to read the environment variables in groovy email template 邮件模板中读取系统环境变量
- octopress 如何添加youku视频和本地视频(octopress how to add a youku video or a local video)
- prjGetWriteINIFile - How to Read-Write INI file using VB & API - 读取/写入INI文件 - VB6 + API - SourceCode - HackerJLY
- Java实现读取pdf文件内容(how to read pdf in java)
- How to stream video to your android phone 如何将视频远程传输至你的android手机?
- 如何调整Dreamhost主机PHP上传尺寸的限制/How to change the maximal size of uploading in your Dreamhost
- 如何Eclipse改变模板中${user}变量,How to change the variable ${user} used in the eclipse templates.
- net 中捕获摄像头视频的方式及对比(How to Capture Camera Video via .Net)
- How to grab video frames directly from QCamera
- [原创] 如何留住优秀的测试人员(How to keep good testers in testing positions)
- How to read and write JSON files in Java(Gson)
- How to capture video frames from the camera as images using AV Foundation on iOS
- How to fill the background with image in landscape in IOS? 如何使image水平铺满屏幕
- 如何在QT for S60 中使用pthread库(Carbide.c++) (How to use pthread in QT4.6 for S60)
- 如何创建软链接 how to create a symbolic link in clearcase
- How To Avoid ORA-04030/ORA-12500 In 32 Bit Windows Environment [Video] [ID 373602.1]
- 在ArcGlobe中如何聚焦到选择的图元(How to zoom to selected features in globe)
- ORCLE 如何停止一个JOB【HOW TO STOP A JOB IN THE ORACLE?】 推荐