Skip to content

How do I set audio stream's frame_size? #804

@makerjackie

Description

@makerjackie

Overview

I want to get AudioFrame with duration 20ms (160 samples / sample rate 8000 ) from a wavfile.

but with code

container = av.open('8k.wav')
for frame in container.decode(audio=0):
    print(frame.samples)

I get 2048 which is 0.256 ms

Research

I have done the following:

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