Skip to content

Support decoding video from byte stream for tensorflow-io #144

@wookayin

Description

@wookayin

Video (ffmpeg) support (#30) is awesome. I was wondering if we can improve the video dataset API by having a counterpart of tf.contrib.ffmpeg.decode_video, which decodes the video from the contents bytestream (tf.string) rather than a filename.

This can be useful in some use cases where videos are encoded and stored in a TFRecord dataset. A side note: it seems that a couple of exemplar video datasets stores a sequence of frame images (encoded as PNG) so I'm not 100% sure if this feature would be worthwhile.

I took a quick look at the C++ kernel implementation but the implementation seems quite tricky. One way is, as in tf.contrib.ffmpeg.decode_video, we could write the buffer content into a temporary file but I am doubtful this is the right way. Pipe or reading from stdin could work, but needs some study.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions