I use python and pyav to convert mp3 to wav. My code is below: '''
def mp3_to_wav(mp3_path, wav_path):
inp = av.open(mp3_path, 'r')
out = av.open(wav_path, 'w')
ostream = out.add_stream("pcm_s16le")
for frame in inp.decode(audio=0):
frame.pts = None
for p in ostream.encode(frame):
out.mux(p)
for p in ostream.encode(None):
out.mux(p)
out.close()
}}
''' but pycharm tell me that Timestamps are unset in a packet for stream 0. This is deprecated and will stop working in the future. Fix your code to set the timestamps properly Encoder did not produce proper pts, making some up.
How should I do?
Thank you very much.