关于GOP:M=3,N=12

本文详细解释了GOP的概念及其在视频编码中的作用,包括IBBPBBPBBPBBI序列的意义,M和N参数的定义,以及GOP长度对视频质量的影响。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

GOP:M=3,N=12,意思是每2个B帧用1个P帧分割,两个IDR帧的距离是12帧。或者说GOP是12(单位为帧)

即"IBBPBBPBBPBBI"

M=4,N=24等这些亦然。


或者另外一种说法:M表示,两个非B帧的距离。即,B+1

xyy@xyy-ZERO:~$ ffmpeg -f v4l2 -framerate 15 -video_size 1344x376 -i /dev/video2 -vcodec libx264 -preset ultrafast -tune zerolatency -x264-params "nal-hrd=cbr:force-cfr=1:slice-max-size=1000" -maxrate 1000k -bufsize 500k -pix_fmt yuv420p -g 15 -keyint_min 15 -sc_threshold 0 -rtsp_transport tcp -f rtsp rtsp://localhost:8554/stream ffmpeg version 7.1.1 Copyright (c) 2000-2025 the FFmpeg developers built with gcc 9 (Ubuntu 9.4.0-1ubuntu1~20.04.2) configuration: --prefix=/usr/local --enable-shared --enable-pic --enable-libx264 --enable-gpl libavutil 59. 39.100 / 59. 39.100 libavcodec 61. 19.101 / 61. 19.101 libavformat 61. 7.100 / 61. 7.100 libavdevice 61. 3.100 / 61. 3.100 libavfilter 10. 4.100 / 10. 4.100 libswscale 8. 3.100 / 8. 3.100 libswresample 5. 3.100 / 5. 3.100 libpostproc 58. 3.100 / 58. 3.100 Input #0, video4linux2,v4l2, from '/dev/video2': Duration: N/A, start: 24510.050373, bitrate: 121282 kb/s Stream #0:0: Video: rawvideo (YUY2 / 0x32595559), yuyv422, 1344x376, 121282 kb/s, 15 fps, 15 tbr, 1000k tbn Stream mapping: Stream #0:0 -> #0:0 (rawvideo (native) -> h264 (libx264)) Press [q] to stop, [?] for help [libx264 @ 0x564f44596240] CBR HRD requires constant bitrate [libx264 @ 0x564f44596240] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2 [libx264 @ 0x564f44596240] profile Constrained Baseline, level 3.1 [libx264 @ 0x564f44596240] 264 - core 155 r2917 0a84d98 - H.264/MPEG-4 AVC codec - Copyleft 2003-2018 - http://www.videolan.org/x264.html - options: cabac=0 ref=1 deblock=0:0:0 analyse=0:0 me=dia subme=0 psy=1 psy_rd=1.00:0.00 mixed_ref=0 me_range=16 chroma_me=1 trellis=1 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=0 threads=6 lookahead_threads=6 sliced_threads=1 slices=6 slice_max_size=1000 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=0 weightp=0 keyint=15 keyint_min=8 scenecut=0 intra_refresh=0 rc_lookahead=0 rc=crf mbtree=0 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 vbv_maxrate=1000 vbv_bufsize=500 crf_max=0.0 nal_hrd=vbr filler=0 ip_ratio=1.40 aq=0 [rtsp @ 0x564f44593300] method SETUP failed: 461 Unsupported Transport [out#0/rtsp @ 0x564f44593140] Could not write header (incorrect codec parameters ?): Protocol not supported [vf#0:0 @ 0x564f4459c100] Error sending frames to consumers: Protocol not supported [vf#0:0 @ 0x564f4459c100] Task finished with error code: -93 (Protocol not supported) [vf#0:0 @ 0x564f4459c100] Terminating thread with return code -93 (Protocol not supported) [out#0/rtsp @ 0x564f44593140] Nothing was written into output file, because at least one of its streams received no packets. frame= 0 fps=0.0 q=0.0 Lsize= 0KiB time=N/A bitrate=N/A speed=N/A Conversion failed!
最新发布
06-01
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值