Replies: 1 comment
-
I found that I could pass options via output.add_stream(codec=..., options={'b:a': '192000'}, 'maxrate': '192000', 'minrate': '192000'}) and pretty much pass any codec command line option that the ffmpeg cli handles (excluding the '-') Doesn't seem explicitly documented. I found this out when trying to pass stream_options={...} to open() which gave an error telling me to pass 'options=' to add_stream(). |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am using python3-av 8.02-1+b2 from Debian testing, and after 30 minutes of playing got a prototype working. Nice.
I am writing a configurable re-compositor. It takes multiple input video files, a config with time and region ranges, and then splits it into separate output files, as well into one composited file (i.e. grid) with multiple frames interposed, all time aligned. It will work with about 16 video stream offline. The purpose is to create composited video of events captured multiple cameras. All the time alignment, resizing, pasting is working.
I got the prototype working, and it does everything I want basically.
There is one things that I don't know how to setup (other than outputting to uncompressed TS stream and using ffmpeg manually after that). How to configure the average / max bitrate and encoding effort / quality for output stream? Or which tune paramters to use? Or which profile to use? I am using
h264
at the moment, but would like to useh265
in the future too.When I create an output stream, i.e.
If I read from
out_stream.codec_context.max_bit_rate
it returnsNone
.If I try to write to it a numbers (Mbsg?), it gives an error, saying it is not writeable only read only.
I couldn't find anything in the reference documentation.
Thanks.
Beta Was this translation helpful? Give feedback.
All reactions