|
|
This should get split into other files.
|
|
|
|
|
|
```
|
|
|
- Improve options.
|
|
|
|
|
|
- Per-stream options (which require not opening the codecs right away).
|
|
|
|
|
|
- Current input behaviour:
|
|
|
- av.open(..., options={}, container_options={}, stream_options=[{}, ...])
|
|
|
- Those options are provided to each stream via avformat_find_stream_info,
|
|
|
which is called immediately. However, it isn't garunteed to open all
|
|
|
codecs, so options may not have been provided at this time.
|
|
|
|
|
|
- Ideal input behaviour:
|
|
|
- You can defer the avformat_find_stream_info, and get basic stream info
|
|
|
before setting options.
|
|
|
- stream.codec_context.options then gets during avformat_find_stream_info
|
|
|
or open or whatever.
|
|
|
|
|
|
- AVFormatContext::interrupt_callback
|
|
|
|
|
|
- Container.decode_one(**demux_kwargs) -> Frame
|
|
|
There would be a Container._buffered_decoded_frames or something that would
|
|
|
contain extras, just in case.
|
|
|
|
|
|
- Stream.decode_one() would do the same.
|
|
|
|
|
|
- Data stream support.
|
|
|
|
|
|
- Stream.encode(packet) should also mux frames.
|
|
|
For b/c, it should return packets with a _muxed_by_encode flag set, which then
|
|
|
has them get ignored once; the flag is reset when muxed.
|
|
|
|
|
|
- assert reasonable time_base and PTS handling
|
|
|
|
|
|
AudioFifo
|
|
|
|
|
|
What does it need?
|
|
|
A: - sample_fmt
|
|
|
- channel_layout
|
|
|
- [ ] Defer the avformat_find_stream_info, and get basic stream info before setting options. An alternative is to provide a `av.probe` function or something.
|
|
|
|
|
|
Where does it get them?
|
|
|
The first frame it processes.
|
|
|
- [ ] Container.decode_one(**demux_kwargs) -> Frame. There would be a Container._buffered_decoded_frames or something that would contain extras, just in case. Stream and CodecContext have the same.
|
|
|
|
|
|
- [ ] Data stream support.
|
|
|
|
|
|
- [ ] assert nb_channels vs channel_layout
|
|
|
|
|
|
AudioResampler
|
|
|
- what does it need?
|
|
|
- in/out sample_fmt
|
|
|
- in/out channel_layout
|
|
|
- in/out sample_rate
|
|
|
- [ ] Frame.save(file_or_path)
|
|
|
- [ ] Frame.load(file_or_path) (classmethod); opens the file and decodes the first frame. Perhaps `av.load_frame` or something.
|
|
|
|
|
|
- assert nb_channels vs channel_layout
|
|
|
- [ ] `isdeferredinstance` loads the module via sys.modules, then getattr on it, and
|
|
|
finally do an isinstance. `isdeferredinstance(x, ('PIL.Image', 'Image'))`
|
|
|
|
|
|
- Make everything mutable. Later, we can introduce a PseudoMutable base class
|
|
|
for everything that has a .assert_mutable() method and public is_read_only
|
|
|
|
|
|
- Document/test the entire API (in the most casual way).
|
|
|
|
|
|
- Include build discovery info into the module, retrievable by `python -m av --version`
|
|
|
|
|
|
- VideoFrame.load(file_or_path); opens the file and decodes the first frame
|
|
|
|
|
|
- InternalObject class for stopping construction:
|
|
|
|
|
|
__cinit__(self, sentinel):
|
|
|
assert sentinel
|
|
|
|
|
|
@classmethod
|
|
|
cdef alloc(cls, ...):
|
|
|
self = cls(sentinel)
|
|
|
self._init(*args, **kwargs)
|
|
|
|
|
|
- isdeferredinstance loads the module via sys.modules, then getattr on it, and
|
|
|
finally do an isinstance.
|
|
|
|
|
|
isdeferredinstance(x, ('PIL.Image', 'Image'))
|
|
|
|
|
|
- Rename Buffer and ByteSource to represent they are opposite directions of
|
|
|
- [ ] Rename `Buffer` and `ByteSource` to represent they are opposite directions of
|
|
|
the same operation.
|
|
|
|
|
|
- `atexit.register` something to clean up FFmpeg threads
|
|
|
- [ ] `atexit.register` something to clean up FFmpeg threads
|
|
|
|
|
|
- Directly use the Numpy C-API
|
|
|
- [ ] Directly use the Numpy C-API
|
|
|
- see: http://docs.scipy.org/doc/numpy/reference/c-api.array.html
|
|
|
- see: https://github.com/cython/cython/wiki/tutorials-numpy#c-api-initalization
|
|
|
|
|
|
- Move the logic regard initializating a VideoReformatter into the object
|
|
|
- [ ] Move the logic regard initializating a `VideoReformatter` into the object
|
|
|
itself instead of the VideoFrame.reformat method.
|
|
|
|
|
|
- Protocol for streams to pull packets from iterators. Then secondary streams
|
|
|
- [ ] Protocol for streams to pull packets from iterators. Then secondary streams
|
|
|
get easier: container.add_stream('audio_codec', source=av.open('music.aiff').iter_packets(only_primary=True))
|
|
|
|
|
|
- Make av.utils.SmartPointer to wrap around a pointer? All this would do is
|
|
|
- [ ] Make av.utils.SmartPointer to wrap around a pointer? All this would do is
|
|
|
hold a reference to said pointer and make sure it isn't garbage collected.
|
|
|
|
|
|
- Look at how stream alloc works; can we manually do this and register the
|
|
|
- [ ] Look at how stream alloc works; can we manually do this and register the
|
|
|
stream on a format context later?
|
|
|
|
|
|
- Various AudioLayout/AudioFormat/VideoFormat attributes should be writable.
|
|
|
- [ ] Various AudioLayout/AudioFormat/VideoFormat attributes should be writable.
|
|
|
- is_mutable flags on various objects (including formats, layouts, contexts,
|
|
|
streams, etc.) could guard the __set__ methods of properties.
|
|
|
|
|
|
- Should methods be: to_bytes, as_bytes, tobytes, asbytes??
|
|
|
|
|
|
- Plane.array_format could be a format string for array.array
|
|
|
- Plane.update_from_array(array.array)
|
|
|
- If it were HD RGB then it would be 1920 * 1080 * 3 long.
|
|
|
- Plane.update_from_ndarray(numpy.ndarray)
|
|
|
- If it were HD RGB then it would have shape (1080, 1920, 3)
|
|
|
- Plane.update(input_)
|
|
|
And then it tries if it is a buffer, memoryview, bytes, etc..
|
|
|
|
|
|
- TestCase.rms_diff(one, two) -> Root-mean-square diff
|
|
|
- try to wrap API of testsrc filters
|
|
|
|
|
|
- Replicate av_frame_get_best_effort_timestamp
|
|
|
- [ ] TestCase.rms_diff(one, two) -> Root-mean-square diff
|
|
|
- [ ] try to wrap API of testsrc filters
|
|
|
|
|
|
http://ffmpeg.org/pipermail/ffmpeg-devel/2011-February/104327.html
|
|
|
http://pastebin.com/Aq8eDZw3/
|
|
|
http://web.archiveorange.com/archive/v/yR2T4bybpYnYCUXmzAI5
|
|
|
- [ ] Replicate av_frame_get_best_effort_timestamp
|
|
|
- http://ffmpeg.org/pipermail/ffmpeg-devel/2011-February/104327.html
|
|
|
- http://pastebin.com/Aq8eDZw3/
|
|
|
- http://web.archiveorange.com/archive/v/yR2T4bybpYnYCUXmzAI5
|
|
|
|
|
|
|
|
|
``` |
|
|
\ No newline at end of file |