Alexey Sonkin
Alexey Sonkin
nvmpi_enc.cpp: `415 v4l2_buf.timestamp.tv_usec = frame->timestamp;` to `415 v4l2_buf.timestamp.tv_usec = frame->timestamp % 1000000;` `416 v4l2_buf.timestamp.tv_sec = frame->timestamp / 1000000;` `88 ctx->timestamp[ctx->buf_index]=v4l2_buf->timestamp.tv_usec;` to `88 ctx->timestamp[ctx->buf_index] = (v4l2_buf->timestamp.tv_usec % 1000000) + (v4l2_buf->timestamp.tv_sec *...
[fix_nvmpi.txt](https://github.com/jocover/jetson-ffmpeg/files/4687409/fix_nvmpi.txt)
I don't know about hardware timestamp. It is all about copying timestamp from input to output packet. tv_usec field cropped by system to fit in diapasone 0-999999... And tv_sec field...
Temporary change code to to fix this issue, but longterm stability was not checked yet: ` _ctx=nvmpi_create_encoder(NV_VIDEO_CodingH264,¶m); _nvframe.payload[0]=dst[0]; _nvframe.payload[1]=dst[1]; _nvframe.payload[2]=dst[2]; _nvframe.payload_size[0]=linesize[0]*avctx->height; _nvframe.payload_size[1]=linesize[1]*avctx->height/2; _nvframe.payload_size[2]=linesize[2]*avctx->height/2; nvmpi_encoder_put_frame(_ctx,&_nvframe); while(1){ int i = 0; ret=nvmpi_encoder_get_packet(_ctx,&packet);...
Fix for ffmpeg, with this patch: [ffmpeg_nvmpi_v2.zip](https://github.com/jocover/jetson-ffmpeg/files/4804050/ffmpeg_nvmpi_v2.zip)
Rough bugfix: ``` int nvmpi_encoder_get_packet(nvmpictx* ctx,nvPacket* packet){ int ret,packet_index; if(ctx->packet_pools->empty()) return -1; packet_index= ctx->packet_pools->front(); auto ts = ctx->timestamp[packet_index]; auto size = ctx->packets_size[packet_index]; if((ts > 0) && (size == 0)) //...
Patches for 41 and 48 issues. Maybe they will be useful for someone. [patches.zip](https://github.com/jocover/jetson-ffmpeg/files/4803889/patches.zip) ``` 0001-Encoder-fix-timestamp-issue-41.patch 0002-Fix-circular-buffer-error-issue-48.patch ``` In issue #45 there is one more stability fix for ffmpeg.
That helps: CancelIO if not Success: ``` case NativeMethods.WAIT_TIMEOUT: status = HidDeviceData.ReadStatus.WaitTimedOut; NativeMethods.CancelIo(Handle); // !!! buffer = new byte[] { }; break; ```
For 1.3: * error: ‘torch::ExpandingArray torch::nn::ConvOptions::stride_’ is private within this context torch::nn::Conv2dOptions conv_options( - conv_options.stride_ = stride; - conv_options.padding_ = padding; - conv_options.groups_ = groups; - conv_options.with_bias_ = with_bias; +...