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

remux_audio is not working #294

Open
jinlee487 opened this issue May 30, 2021 · 4 comments
Open

remux_audio is not working #294

jinlee487 opened this issue May 30, 2021 · 4 comments

Comments

@jinlee487
Copy link

Hello,

image

I am calling remux _audio=True and I keep getting an error. It is weird, because the file downloads but just doesnt perform the remux conversion in the end.
I know remux is the problem because the code worked without it before and also when I pass it as False instead of True.
I downloaded ffmpeg btw.
Anyone know the solution to this issue?

@jinlee487
Copy link
Author

jinlee487 commented Jun 3, 2021

I think I have identified the problem. I am not installing ffmpeg correctly. Is there any hint to installing ffmpeg correctly to use with pafy? I just used pip to install ffmpeg and ffmpeg-python but it still does not work :(

@jinlee487
Copy link
Author

Well this is quite unfortunate. I have successfully installed ffmpeg and added it to PATH. ffmpeg -version in powershell works as it should. However I still am getting the same error...

@jinlee487
Copy link
Author

jinlee487 commented Jun 3, 2021


CurrentFileName = 'TEST.m4a'
FinalFileName = 'TEST.mp3'
print(f'{CurrentFileName}')
print(f'{FinalFileName}')

try:
    subprocess.call(['ffmpeg', '-i', f'{CurrentFileName}', f'{FinalFileName}'])

except Exception as e:
    print(e)
    print('Error While Converting Audio')

ch = input('Press Enter to Close')```

this is the test file I ran to check if ffmpeg was working normally. To my surprise, it works fine. Now I am guessing there is an issue with pafy. 

@jinlee487
Copy link
Author

jinlee487 commented Jun 3, 2021

cmd = [tool, "-y", "-i", infile, "-acodec", "copy", "-vn", outfile]

I am wondering if this call does not work anymore? I tried running a similar line of code as a test subprocess. There was not any error raised, but the file output was empty.

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

1 participant