Skip to content

How do I using av.open to open a ByteIO object? #998

@fake-warrior8

Description

@fake-warrior8

IMPORTANT: Be sure to replace all template sections {{ like this }} or your issue may be discarded.

Overview

I want to use av.open to open a ByteIO object. However, video_byte=av.open(buff) (where buff=ByteIO(some_bytes)) will output some errors. For example, video_byte.streams.video[0].time_base is None while video_mp4=av.open(some_mp4), video_mp4.streams.video[0].time_base will give a right number.

Expected behavior

video_byte = av.open(buff) (where buff=ByteIO(some_bytes)) and video_mp4=av.open(some_mp4) will work the same, which means their attributes are the same.

Actual behavior

video_byte.streams.video[0].time_base is None

Traceback:

No exceptions.

Investigation

buff=ByteIO(some_bytes)
buff.seek(0) # found in Google
video_byte = av.open(buff) 

Research

I have done the following:

Additional context

{{ Add any other context about the problem here. }}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions