Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ffmpeg live audiostrem #2380

Closed
xXxNIKIxXx opened this issue Apr 1, 2024 · 1 comment
Closed

ffmpeg live audiostrem #2380

xXxNIKIxXx opened this issue Apr 1, 2024 · 1 comment
Labels

Comments

@xXxNIKIxXx
Copy link

xXxNIKIxXx commented Apr 1, 2024

What do you need help with?

I have a live stream from ffmpeg. I'm streaming my microphone as the source. Then, I'm converting the stream into an MP3 format and attempting to play it using the stream_file function. However, I encounter an error stating: mediafile.FileTypeError: 'stream': not in a recognized format, even though my stream is in MP3 format. Somehow, I need to specify that it is in MP3 format because it isn't recognized automatically,

This is my subprocess using ffmpeg process = await asp.create_subprocess_exec("C:\\Program Files\\ffmpeg\\ffmpeg.exe", "-i", "audio=@device_cm_{33D9A762-90C8-11D0-BD43-00A0C911CE86}\wave_{6914E3AE-DC65-4F28-8026-79ADDD13BED5}", "-f", "dshow", "-acodec", "libmp3lame", "-f", "mp3", "-", stdout=asp.PIPE, stderr=asp.PIPE)

@xXxNIKIxXx
Copy link
Author

xXxNIKIxXx commented Apr 1, 2024

Now its working using process = await asp.create_subprocess_exec("C:\\Program Files\\ffmpeg\\ffmpeg.exe", "-f", "dshow", "-i", "audio=Home Pod (VB-Audio Virtual Cable)", "-acodec", "libmp3lame", "-f", "mp3", "-", stdout=asp.PIPE, stderr=None) await atv.stream.stream_file(process.stdout)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant