ffmpeg - how to add duration to mjpeg or how to make mjpeg faster -
I have an IP-Cam MJPEG that I have created and it has a total of 240 frames
encoded sauce ffmpeg.exe -framerate 25 -ic: \% 06d.jpg \ -s 1920x1080 -qscale 1 -vcodec mjpeg -r 25c: \ result.mjpg -y
now I want to make my life the result by mjpeg player. Mjpg
My problem 1. I can not find the time of play time or duration of mjpeg 2. The game is slow then there is another movie player so I want to sync it play it faster Ffprobe results
input # 0, mjpeg, 'result.mjpg' below: Duration: N / A, bitrate: N / A stream # 0: 0: Video: mjpeg, yuvj444p (PC, bt470bg), 1920x1080, 25 TBR, 1200K TBN, 25 TBC results below -show_frame
< Code> [frame] media_type = video key_frame = 1 pkt_pts = 720000 pkt_pts_time = 0.600000 pkt_dts = 720000 pkt_dts_time = 0.600000 Srwottm_ifort_taimstmp = 720000 Srwottm_afort_timstmp_taim = 0.600000 pkt_duration = 48000 pkt_duration_time = 0.040000 pkt_pos = 4731406 pkt_size = 313,289 width = 1920 height = 1080 pix_fmt = yuvj444p sample_aspect_ratio = 333: 320 pict_type = I coded_picture_number = 0 Show_picture_number = 0 interlaced_frame = 0 top_field_first = 0 repeat_pict = 0 [/ frame] ffprobe show I have period there: n / a, bitrate: n / a
How do I determine the duration and bitrate is there any encode-option I Have to set up?
When I interpret the mjpeg as below
I can not find the duration of 0 only
AVFormatContext * pfc; Int rate; PFC = avformat_alloc_context (); Ret = avformat_open_input (& amp; PFC, filename, zero, zero); If (rate end lie; 0) {// failed} Ret = avformat_find_stream_info (PFC, Nouvel); If (rate at lieutenant; 0) {// fail} printf ("duration% ld", pFC-> duration); & Lt; ----- Only 0
I changed option from SWS_BICUBIC to SWS_FAST_BILINEAR It seems and my question has been 2
Fixed ent sws_flags = SWS_BICUBIC; Structures swinstex * img_convert_ctx; Img_convert_ctx = sws_getcontext (pVCtx-> width, pvtx-> height, pvtx-> pix_fmt, pVCtx-> width, pvtx-> height, pixelformat :: PIX_FMT_BGR24, sws_flags, NULL, NULL, NULL) Static Ent sws_flags = SWS_FAST_BILINEAR; Structures swinstex * img_convert_ctx; Img_convert_ctx = sws_getContext (pVCtx- & gt; width, pVCtx-> height, pVCtx-> pix_fmt, pVCtx-> width, pVCtx-> height, PixelFormat :: PIX_FMT_BGR24, sws_flags, zero, zero, Zero);
Comments
Post a Comment