Skip to content

How do I change samle_rate in output ogg file? #825

@vinnitu

Description

@vinnitu
import av

inp = av.open('f.mp3', 'r')
out = av.open('f.ogg', 'w')

ostream = out.add_stream('libopus')

for frame in inp.decode(audio=0):
    for packet in ostream.encode(frame):
        out.mux(packet)

out.close()

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