Skip to content

Conversation

@yongtang
Copy link
Member

This fix adds batch support for VideoDataset and support reading from streams.

This fix also fixes #144.

Signed-off-by: Yong Tang [email protected]

video_path = os.path.join(
os.path.dirname(os.path.abspath(__file__)), "test_video", "small.mp4")

video_path = "file://" + video_path
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider combining with the above two lines?

video_path = os.path.join(
os.path.dirname(os.path.abspath(__file__)), "test_video", "small.mp4")

video_path = "file://" + video_path
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here

"""A Video File Dataset that reads the video file."""

def __init__(self, filename):
def __init__(self, filename, batch=None):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add docstring for this and a note on the relation between dataset's own batch() since I think users would definitely be confused about this.

@yongtang
Copy link
Member Author

@terrytangyuan The PR has been updated, please take a look.

@terrytangyuan terrytangyuan merged commit f76d965 into tensorflow:master Jun 16, 2019
@yongtang yongtang deleted the video branch June 17, 2019 00:53
i-ony pushed a commit to i-ony/io that referenced this pull request Feb 8, 2021
…ensorflow#295)

* Add batch support for VideoDataset

Signed-off-by: Yong Tang <[email protected]>

* Support read video from stream (instead of file name).

Fixes 144

Signed-off-by: Yong Tang <[email protected]>

* Address review feedback

Signed-off-by: Yong Tang <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support decoding video from byte stream for tensorflow-io

2 participants