justin
12th May 2005, 01:31
Overview:
ok.. I've had this idea in my head for a while: we can use VFW to encode with Virtualdub or other VFW programs, but are limited to the AVI container and windows, or use DirectShow to encode with a different container writer, but are limited to windows and complicated coding.
This is the new encoder model I was thinking of: making a commandline encoding architecture somehow (that can be ported to different OS's maybe and devices) that would be not too hard to write codecs for and be able to write to different containers.
Here's my notes I was working on at work (I'm not allowed to read books but I can write stuff)
Block Diagram:
[Open (decode)] <-> [Encode] -> [Write to File]
in the Open/decode stage, it can use AVISynth to open all video types to encode with DirectShow (but can't use directshow outside of windows), able to open AVISynth files universal, RAW, or specific decoder
Information is passed to the encoder (Video information (Dimentions, Colour space, Extra tags (ie. Non Sequential Read tag), etc.)
in the Encode stage, if Non Sequential Read flag is set, encoder enquires what frame it wants next and controls what frames are written (useful for reading previous frames and writing at different order, but encoder has to control it)
in the Write to File stage, it writes video to file using container plugins (mkv, mp4, avi, mpeg, etc.)
Directory Structure:
LIB\
HELP\
OUTWRITE\
CODECS\
Mainfile.exe
Mainfile.ini
in the codecs directory go codecs, each codec has a compiled codec dll, a ini for the codec, and an optional GUI to configure the ini
the lib directory is for Visual applications to encode, say for example VirtualDub, it can use the lib to encode a file (and the lib can pass back frame sizes/types/information etc).. configuring the codecs would be done with their GUI's so the visual program would have to execute .\CODECS\[codec name].exe and it would configure the ini for the codec
the outwrite directory is for the container writers (mkv, mp4, avi, etc.)
ok.. I've had this idea in my head for a while: we can use VFW to encode with Virtualdub or other VFW programs, but are limited to the AVI container and windows, or use DirectShow to encode with a different container writer, but are limited to windows and complicated coding.
This is the new encoder model I was thinking of: making a commandline encoding architecture somehow (that can be ported to different OS's maybe and devices) that would be not too hard to write codecs for and be able to write to different containers.
Here's my notes I was working on at work (I'm not allowed to read books but I can write stuff)
Block Diagram:
[Open (decode)] <-> [Encode] -> [Write to File]
in the Open/decode stage, it can use AVISynth to open all video types to encode with DirectShow (but can't use directshow outside of windows), able to open AVISynth files universal, RAW, or specific decoder
Information is passed to the encoder (Video information (Dimentions, Colour space, Extra tags (ie. Non Sequential Read tag), etc.)
in the Encode stage, if Non Sequential Read flag is set, encoder enquires what frame it wants next and controls what frames are written (useful for reading previous frames and writing at different order, but encoder has to control it)
in the Write to File stage, it writes video to file using container plugins (mkv, mp4, avi, mpeg, etc.)
Directory Structure:
LIB\
HELP\
OUTWRITE\
CODECS\
Mainfile.exe
Mainfile.ini
in the codecs directory go codecs, each codec has a compiled codec dll, a ini for the codec, and an optional GUI to configure the ini
the lib directory is for Visual applications to encode, say for example VirtualDub, it can use the lib to encode a file (and the lib can pass back frame sizes/types/information etc).. configuring the codecs would be done with their GUI's so the visual program would have to execute .\CODECS\[codec name].exe and it would configure the ini for the codec
the outwrite directory is for the container writers (mkv, mp4, avi, etc.)