Closed hdcola closed 3 years ago
What command did you use to transcode the file?
What command did you use to transcode the file?
ffmpeg.input(file_path).output(
out,
format='s16le',
acodec='pcm_s16le',
ac=2,
ar='48k',
loglevel='error'
).overwrite_output().run_async()
And how did you try to play this file?
And how did you try to play this file?
https://github.com/hdcola/chstockbot/blob/main/musicbot/services/callsmusic/callsmusic.py
Here is my service for playing music. Directly call the set_stream function inside
And how did you try to play this file?
https://github.com/hdcola/chstockbot/blob/main/musicbot/services/callsmusic/callsmusic.py
Here is my service for playing music. Directly call the set_stream function inside
Do you try to run example from main readme of this lib with your transcoded file? If not, you should try
And how did you try to play this file?
https://github.com/hdcola/chstockbot/blob/main/musicbot/services/callsmusic/callsmusic.py Here is my service for playing music. Directly call the set_stream function inside
Do you try to run example from main readme of this lib with your transcoded file? If not, you should try
I used this sample code
https://github.com/MarshalX/tgcalls/blob/main/examples/player_as_smart_plugin.py
Still the same problem reproduced. Could it be the version of Python or some other lib?
And how did you try to play this file?
https://github.com/hdcola/chstockbot/blob/main/musicbot/services/callsmusic/callsmusic.py Here is my service for playing music. Directly call the set_stream function inside
Do you try to run example from main readme of this lib with your transcoded file? If not, you should try
I used this sample code
https://github.com/MarshalX/tgcalls/blob/main/examples/player_as_smart_plugin.py
Still the same problem reproduced. Could it be the version of Python or some other lib?
It sounds so strange. Do u have the m1 mac?
It sounds so strange. Do u have the m1 mac?
My Mac is an Intel Core i5 CPU, not a new M1 CPU
It sounds so strange. Do u have the m1 mac?
My Mac is an Intel Core i5 CPU, not a new M1 CPU
I have no idea how to help you(
Thank you very much for your reply. I will continue to observe the performance on different machines. The environment I will eventually run on will be Raspberry Pi. I don’t know what the effect will be.
I have now tried two different Macs. This problem occurs with different versions of Python, maybe because of MacOS?
I have now tried two different Macs. This problem occurs with different versions of Python, maybe because of MacOS?
What version of macos do you use?
What version of macos do you use?
all is 11.4 (macOS Big Sur)
What version of macos do you use?
all is 11.4 (macOS Big Sur)
me too
I began to suspect that there was a problem with ffmpeg or something in my code, because after I deployed it to heroku, it still appeared intermittent.
Much better after using linux and replacing a Server with a better CPU. On closer inspection, I think it's a problem of ffmpeg cpu overuse. Maybe consider a real time decoding solution. Thanks for the previous help
My environment: macOS 11.4 Python 3.9.5 tgcalls 0.0.16 pytgcalls 0.0.23 Pyrogram 1.2.9
I transcoded the m4a file into raw by ffmp3g, and there is no problem with using audacity to listen to the sound. The following settings are used when importing audacity:
If I use pytgcall to play, I can clearly hear a pause of a few microseconds. I don't know what is wrong with my environment? Or is this a known issue?