Log in

View Full Version : JM reference software.


Ansii
19th April 2016, 22:26
Hi

I am able to encode and decode video files using JM reference software.
The encoded video is stored in BIN directory as a video file. Is there any method to packetise the video file, in order to send over a network as video packet. ( need send video packets at diffrent data rates and set different QP for) it.
i,e Is there a way to get hold of encoded video files as individual packet in order to sent it over network.

The encoding takes a really long time using JM. I encoded a video (more like a static video) which is 1 min 20 sec long, if we view it. It has only 2001 frames. It took about 45-50 min to encode. Does it takes this much long time?
But decoding the same took about 13sec only.
The file I encoded is available online here- http://trace.eas.asu.edu/yuv/-bridge-close_qcif.yuv

Thanks in Advance.

LoRd_MuldeR
20th April 2016, 19:37
Yes, reference encoder is slow as hell. It's simply not optimized for speed at all.

I don't know if JM can be used as a library with a proper API, which allows you to process individual encoded frames (NAL units) as they pop out of the encoder. But x264 (libx264) does exactly that! And it is *way* faster than JM ;)

See also:
http://git.videolan.org/?p=x264.git;a=blob;f=x264.h

/* x264_encoder_encode:
encode one picture.
*pi_nal is the number of NAL units outputted in pp_nal.
returns the number of bytes in the returned NALs.
returns negative on error and zero if no NAL units returned.
the payloads of all output NALs are guaranteed to be sequential in memory. */

int x264_encoder_encode( x264_t *, x264_nal_t **pp_nal, int *pi_nal, x264_picture_t *pic_in, x264_picture_t *pic_out );