hadoop - Output of ffmpeg into HDFS directly -


i have requirement in have convert rtsp stream mp4 video or frames (as case may be) & want save them in hdfs (hadoop filesystem).

for have tried using ffmpeg convert rtsp stream mp4 video/frames & saving video/frames in local filesystem. below -
ffmpeg -i rtsp://10.0.37.150:8554/big_bunny.mkv -r 1 -f image2 frames/big_frame-%3d.bmp
ffmpeg -i rtsp://10.0.37.150:8554/big_bunny.mkv big_bunny.mp4

and saving video/frames (stored in local filesystem) hdfs using put command -
hadoop fs -put frames/ /user/maddy/
hadoop fs -put big_bunny.mp4 /user/maddy/

this working. want directly (that in 1 step without saving required files in local filesystem)

i tried (like below command) not working
ffmpeg -i rtsp://10.0.37.150:8554/big_bunny.mkv hdfs://localhost:9000/user/maddy/big_bunny.mp4

i error -
hdfs://localhost:9000/user/maddy/big_bunny.mp4: protocol not found

so there way in using ffmpeg can directly save these files hdfs without first saving in local filesystem.
or there other tool through can achieve this?

edit :

tried ffmpeg -i rtsp://10.0.37.150:8554/big_bunny.mkv - | hadoop fs -put - /user/maddy/
suggested @incbrain

but received error -
[null @ 0xce37a0] unable find suitable output format 'pipe:' pipe:: invalid argument

you can redirect output of ffmpeg pipe , use hadoop fs -put - /user/... read input stdin this:

ffmpeg -i rtsp://10.0.37.150:8554/test.mkv -f avi - | hadoop fs -put - /user/maddy/test.avi 

note need -f <format> option since ffmpeg can not guess output format file extension since use our pipe.


Comments

Popular posts from this blog

Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12:test (default-test) on project.Error occurred in starting fork -

windows - Debug iNetMgr.exe unhandle exception System.Management.Automation.CmdletInvocationException -

configurationsection - activeMq-5.13.3 setup configurations for wildfly 10.0.0 -