Commit 577a5577 authored by Yong Tang's avatar Yong Tang Committed by Martin Wicke
Browse files

Add op `tf.contrib.ffmpeg.decode_video` (#13242)



* Add `tf.contrib.ffmpeg.decode_video`

This fix tries to address the request raised in 6265 where
it was not possible to decode video like the existing op of
`decode_audio`.

This fix adds the support of `tf.contrib.ffmpeg.decode_video`
by invoking ffmpeg the same fashion as `tf.contrib.ffmpeg.decode_audo`
so that video could be stored in the tensor `[frames, height, width, channel]`.
At the moment, the output format is `RGB24`.

This fix fixes 6265.

Signed-off-by: default avatarYong Tang <yong.tang.github@outlook.com>

* Add python wrapper for `tf.contrib.ffmpeg.decode_video`

This fix adds python wrapper for `tf.contrib.ffmpeg.decode_video`

Signed-off-by: default avatarYong Tang <yong.tang.github@outlook.com>

* Add test cases for `tf.contrib.ffmpeg.decode_video`

This fix adds test cases for `tf.contrib.ffmpeg.decode_video`.

Signed-off-by: default avatarYong Tang <yong.tang.github@outlook.com>

* Address review feedback.

Signed-off-by: default avatarYong Tang <yong.tang.github@outlook.com>

* Move GetTempFilename to tensorflow/core/lib/io/path.h

Signed-off-by: default avatarYong Tang <yong.tang.github@outlook.com>

* Disable GetTempFilename on Windows and Android for now.

Signed-off-by: default avatarYong Tang <yong.tang.github@outlook.com>

* Remove `.` from tmp file template if no extension

And sanitize with clang-format

Signed-off-by: default avatarYong Tang <yong.tang.github@outlook.com>

* Add missing header files.

Signed-off-by: default avatarYong Tang <yong.tang.github@outlook.com>
parent fab6adb4
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment