You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
How do I export a video with audio from separated stream? #794
With the previous code, the output is a video without audio and I got the following traceback:
Traceback (most recent call last):
File "/Users/XXX/export.py", line 30, in save_reframed_video
packet = audio_stream.encode(audio_frame)
File "av/stream.pyx", line 152, in av.stream.Stream.encode
File "av/codec/context.pyx", line 466, in av.codec.context.CodecContext.encode
File "av/audio/codeccontext.pyx", line 49, in av.audio.codeccontext.AudioCodecContext._prepare_frames_for_encode
File "av/audio/fifo.pyx", line 88, in av.audio.fifo.AudioFifo.write
ValueError: Frame.pts (1934336) != expected (0); fix or set to None.
Traceback (most recent call last):
File "av/container/output.pyx", line 25, in av.container.output.close_output
TypeError: 'NoneType' object is not iterable
Exception ignored in: 'av.container.output.OutputContainer.__dealloc__'
Traceback (most recent call last):
File "av/container/output.pyx", line 25, in av.container.output.close_output
TypeError: 'NoneType' object is not iterable
Process finished with exit code 1
Now I've tried to change the order of stream (starting with the audio) and I only got an audio file without video. In this order there is no error displayed, and I can see 2 streams in the output when I'm in debug mode.
Activity