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 backend mucks with standard input on close() #32

Closed
sampsyo opened this issue Jun 12, 2016 · 7 comments
Closed

ffmpeg backend mucks with standard input on close() #32

sampsyo opened this issue Jun 12, 2016 · 7 comments

Comments

@sampsyo
Copy link
Member

sampsyo commented Jun 12, 2016

As discovered in beetbox/beets#2039, we appear to cause problems on f.close() in with the FFmpeg backend. Specifically, subsequent calls to read from standard input (i.e., raw_input() calls) no longer receive any keyboard input.

This is easy to reproduce with this tiny test script:

import audioread.ffdec
f = audioread.ffdec.FFmpegAudioFile('xxx.m4a')
f.close()
raw_input('prompt: ')

I was able to narrow down the problem to e31af0b, which was our fix for #9. If I change that line to send SIGTERM instead of SIGKILL to the ffmpeg process, everything works fine.

@sampsyo
Copy link
Member Author

sampsyo commented Jun 12, 2016

That seems to fix it on my machine. It's still a bit of a mystery as to why this didn't appear before—it may have arisen only in recent (3.0?) versions of FFmpeg.

@mtompkins
Copy link

mtompkins commented Jun 26, 2016

If this fix was incorporated in beets v1.3.19 just sharing here that the condition still exists.

@sampsyo
Copy link
Member Author

sampsyo commented Jun 26, 2016

Hi! Have you upgraded audioread?

@mtompkins
Copy link

I executed a pip install beets --upgrade presuming it would handle any necessary dependencies. Is this something that needs to be done explicitly?

Appreciate the hand-holding. . .

@sampsyo
Copy link
Member Author

sampsyo commented Jun 26, 2016

You'll needs upgrade audioread explicitly because it's not a beets dependency—it's only used for the chroma plugin.

@mtompkins
Copy link

Ah makes sense, thanks so much.
Can also confirm this resolved it.

Many thanks!

@sampsyo
Copy link
Member Author

sampsyo commented Jun 26, 2016

Woohoo!

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

No branches or pull requests

2 participants