You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thank you for this wonderful library! I am wondering how I can translate the code below to be able to concatenate multiple opus audio files using the BytesIO API.
In this contrived example I am reading files off disk, but in reality I am reading files from S3. I am trying to avoid any intermediate writes to disk and instead just stream directly to ffmpeg. Is this possible?
frompathlibimportPathimportffmpeginput=Path.cwd().joinpath("input.txt")
withinput.open("w") asf:
# in reality, this is more like:# for i, obj in enumerate([# s3.get_object(Bucket=bucket_name, Key=obj["Key"])["Body"].read()# for obj in s3_bucket_list_objects_v2(bucket_name=bucket_name, key=key)["Contents"]# ]):fori, objinenumerate(Path.cwd().glob("recording*.webm")):
f.write(f"file '{content}'\n")
output=Path.cwd().joinpath("combined.webm")
ffmpeg.input(str(input), format="concat", safe=0).output(str(output), c="copy").run()
The text was updated successfully, but these errors were encountered:
jaredculp
changed the title
How to concat multiple audio inputs without using files
How to concat multiple streamed audio inputs
Mar 7, 2025
Thank you for this wonderful library! I am wondering how I can translate the code below to be able to concatenate multiple opus audio files using the
BytesIO
API.In this contrived example I am reading files off disk, but in reality I am reading files from S3. I am trying to avoid any intermediate writes to disk and instead just stream directly to ffmpeg. Is this possible?
The text was updated successfully, but these errors were encountered: