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
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.
This discussion was converted from issue #794 on December 31, 2021 14:32.
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Overview
I want to make modification on the images only on a video. I am using pyav to load and save it.
Expected behavior
The output video must be a video with both video and audio stream.
Actual behavior
I only manage to output either an audio or a video (without audio) file.
My code look like this:
With the previous code, the output is a video without audio and I got the following traceback:
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.
Beta Was this translation helpful? Give feedback.
All reactions