Hello,I try to implement an HiSilicon H264 encoder direct input as ffmpeg libavdevice source (someking like V4L linux for cameras with H264 source driver). I successfully recieve H264 packets with NAL units and set correct PTS according to source packet. I am stuck at the moment where timing data is not extracted from raw H264 paassed data and looks like this:
Input #0, armdevice, from '/dev/video': Duration: N/A, start: 0.000000, bitrate: N/AStream #0:0: Video: h264 (High), yuvj420p(pc, bt709, progressive), 1920x1080, 1000k tbr, 1000k tbn, 2000k tbc
Resolution is okay but timing data is wrong. I passed SPS and PPS of incomming data in "read_packet".
In shotcut: 1. Open H264 encoder using low-level API in device_open 2. Initialize encoder with fps and resolution using API in device_init 3. In read_packet i get NAL units from buffer and: av_new_packet(pkt,total); memcpy(pkt->data,buffer) -> stub pkt->pts = buffer.u64PTS; pkt->size = size and return packet. Profile level is guessed okay but not the timing data. What am i doing wrong? Marcin
_______________________________________________ Libav-user mailing list Libavemail@example.com http://ffmpeg.org/mailman/listinfo/libav-user