Closed remusmp closed 4 years ago
libimxvpuapi deals with elementary streams (which is what codecs actually can process), not with containers. So its output cannot directly be played with VLC. One exception to this is h.264 bitstream output. The Annex-B bitstream acts as a lightweight container that can be played, but only in a very limited fashion.
In any case, libimxvpuapi does not and will not ever directly support MP4, as it is not its task to do so.
Hello,
EDIT: I've been reading a bit about codecs and containers and please correct me if I am wrong: the libimxvpuapi creates the encoded stream but doesn't generate the container for the encoded stream. Are there any functions in the libimxvpuapi to create the container or should I rely on a 3rd party tool for that?
I'm following the example from
encode-example-writecb.c
but the mp4 file cannot be played by some players (VLC under Linux/Windows). If I runffmpeg -i video.mp4 -vcodec copy output.mp4
then everything works fine. I'd like not to depend onffmpeg
though. How could one create a valid mp4 file straight from the example code?Xplayer in Linux can play the original file but some information is missing such as duration, container and bitrate. How can this information be embedded in the original mp4 file (without ffmpeg or other 3rd party tool)?
Here's some log info from the VPU encoder:
Regards, Remus.