• shinobi(2)


    ONVIF Device Manager

    PTZ控制

    sei Supplemental Enhancement Information 补充增强信息
    SEI type 86 size 720 truncated at 271
    SEI type 86 size 720 truncated at 312 hls
    sei参考:https://www.jianshu.com/p/527f819bb8b8
    https://blog.csdn.net/shaoyizhe2006/article/details/8542063

    h265编码出现下面的问题:
    Application provided invalid, non monotonically increasing dts to muxer in stream 0: 1949 >= 1949

    AVC (高级视频编码Advanced Video Coding)
    https://www.baidu.com/link?url=HnvU__CMZiWs4r5VVyKElXForZMBb131HM_bMHr42YzcnI-z82MM7b4gAIRMLMJ0xSDeX05TUCZOdwok3nWJ-K&wd=&eqid=acf9b8850016b444000000035f994593

    probe出来的信息:(没有探测出我想要的帧率等参数??)
    streams :
    0 :
    index : 0
    codec_name : h264
    codec_long_name : H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10
    profile : High
    codec_type : video
    codec_time_base : 0/2
    codec_tag_string : [0][0][0][0]
    codec_tag : 0x0000
    width : 1280
    height : 720
    coded_width : 1280
    coded_height : 720
    has_b_frames : 0
    pix_fmt : yuvj420p
    level : 31
    color_range : pc
    color_space : bt470bg
    color_transfer : bt709
    color_primaries : bt470bg
    chroma_location : left
    field_order : progressive
    refs : 1
    is_avc : false
    nal_length_size : 0
    r_frame_rate : 25/1
    avg_frame_rate : 0/0
    time_base : 1/90000
    start_pts : 12158
    start_time : 0.135089
    bits_per_raw_sample : 8
    disposition :
    default : 0
    dub : 0
    original : 0
    comment : 0
    lyrics : 0
    karaoke : 0
    forced : 0
    hearing_impaired : 0
    visual_impaired : 0
    clean_effects : 0
    attached_pic : 0
    timed_thumbnails : 0
    1 :
    index : 1
    codec_name : pcm_mulaw
    codec_long_name : PCM mu-law / G.711 mu-law
    codec_type : audio
    codec_time_base : 1/8000
    codec_tag_string : [0][0][0][0]
    codec_tag : 0x0000
    sample_fmt : s16
    sample_rate : 8000
    channels : 1
    bits_per_sample : 8
    r_frame_rate : 0/0
    avg_frame_rate : 0/0
    time_base : 1/8000
    bit_rate : 64000
    disposition :
    default : 0
    dub : 0
    original : 0
    comment : 0
    lyrics : 0
    karaoke : 0
    forced : 0
    hearing_impaired : 0
    visual_impaired : 0
    clean_effects : 0
    attached_pic : 0
    timed_thumbnails : 0
    format :
    filename : rtsp://admin:admin12345@10.1.30.24:8557/h264
    nb_streams : 2
    nb_programs : 0
    format_name : rtsp
    format_long_name : RTSP input
    start_time : 0.135089
    probe_score : 100
    tags :
    title : RTSP/RTP stream from VZ Smart-IPC
    comment : h264
    url : rtsp://admin:admin12345@10.1.30.24:8557/h264
    END

    关于docker部署的shinobi 录像文件的开始时间和结束时间 错乱的问题,通过在docker-compose.yml文件中注释掉 - /etc/localtime:/etc/localtime:ro 该项即可,顺便在docker里将时区改下ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime

    文件播放的相关问题:下载便携式firefox,登陆youku,自动下载相关的flash

    历史录像文件可以预览(在局域网中应该预览应该很快),也可以观看(应该是先全部缓冲完毕才能观看),同时可以单个下载,打包下载(zip压缩),还可以合并下载(merge),如下说明:
    Do you want to merge these videos? It may take some time to merge and download. The moment the connection is closed the file will be deleted. Ensure you keep the browser open until it is complete.
    2020-10-28T22-10-46.webm
    2020-10-28T22-06-31.webm

    下面是具体的录制案例:
    1)当camera的参数如下:主码流 1280*720 帧率10 编码方式H265 码流控制:变码流 图像质量:最流畅 码流上限:1024 注意没有SEI的相关设置

    shinobi的设置如下:
    connection设置略过

    INPUT:Monitor Capture Rate(FPS)和camera的帧率保持一致为10;Use Camera Timestamps YES ;Accelerator NO;

    stream:Stream Type HLS;Video Codec libx264;HLS Segment Length 2;HLS List Size 3;HLS Preset ultrafast;Quality 15;Frame Rate 10;Width 1280;Height 720;

    record:Record File Type MP4;Video Codec libx264;Audio Codec no audio;Recording Segment Interval in minutes 30;

    浏览器:火狐72启用openH264、flash?、Widevine

    实际效果 录像文件previewer和stream有点卡 有时录像的文件段时间为0

    2)当camera的参数如下:主码流 1280*720 帧率10 编码方式H265 码流控制:变码流 图像质量:最流畅 码流上限:1024 注意没有SEI的相关设置

    shinobi的设置如下:
    connection设置略过

    INPUT:Monitor Capture Rate(FPS)和camera的帧率保持一致为10;Use Camera Timestamps YES ;Accelerator NO;

    stream:Stream Type HLS;Video Codec libx264 ;Audio Codec no audio;HLS Segment Length 2;HLS List Size 3; HLS Preset 空;Quality 20 ;Frame Rate 10;Width 640 ;Height 480 ;

    record:Record File Type WebM;Video Codec libvpx default;Audio Codec no audio;Recording Segment Interval in minutes 5;注意此时的录像文件后缀为webm(该格式为google主导的格式)

    浏览器:火狐72启用openH264、flash?、Widevine

    实际效果 录像文件好像是一张图片连着1张图片来播放

    3)下面都是只探讨在camera采用H265时,shinobi stream设置是否可以在线观看的相关问题。
    如果shinobi只是采用软解码HLS libx265是无法在shinobi中在线观看的,但不会出错,应该是firefox火狐不支持H265编码的文件在线播放(stream);

    如果shinobi采用HLS+copy(这个copy应该是copy input的编解码类型即软H265编解码)编解码,shinobi中在线观看的,但不会出错,应该是firefox火狐不支持H265编码的文件在线播放(stream);

    如果shinobi采用HLS+auto(这个auto智能化一点,应该是采用了软H264编解码)shinobi在线观看OK

    如果shinobi采用HLS+各种硬编解码,shinobi不能正常在线观看,显示died状态

    如果shinobi采用FLV+websocket+libx265解码,在线观看直接报错;
    如果shinobi采用FLV+websocket+libx264解码,不能播放,猜测应该是解码的问题
    疑问:以上websocket无法观看,怀疑是firefox 72的相关socket没有打开,about:config,搜索socket有5项socket相关的配置需要从false改为true,然后重启firefox,参考火狐浏览器无法建立到websocket服务器的链接https://www.cnblogs.com/yaya-003/p/12759010.html
    结果还是无法播放

    如果shinobi采用FLV+http+libx265解码,在线观看直接报错;
    如果shinobi采用FLV+http+libx264 ok(需要等待一段时间)有时又不OK

    shinobi mjpeg 在线ok
    shinobi jpeg 在线ok
    shinobi base64 over websocket 在线ok
    shinobi hevc+http libx265 在线ok
    shinobi hevc+http auto 在线ok 播放断续
    shinobi hevc+http libx264 在线不能播放,猜测应该是解码的问题

    shinobi poseidon+http libx264 ok 出来的效果有点慢
    shinobi poseidon+websocket libx264 ok 出来的效果有点慢

    H264的视频源头,可以使用mp4类型 libvpx(died状态 not ok)、libvpx-vp9、libx264 来编码 record录像(文件后缀mp4)
    或者 可以使用webm类型 libvpx、libvpx-vp9、libx264(died状态 not ok) 来编码 record录像(文件后缀webm)

    总结下:stream在线观看,最好采用HLS的方式,比较流畅。 record录像的华,如果采用MP4方式,录像的质量以及录像的连续性都有保障,但在线预览观看时不能看到总时间;录像如果采用webm方式,在线预览观看可以看到总时间,但录像录制的效果不怎么好(可能是我录像参数没有调整到最好的状态)。其实shinobi在monitor设置reccord时已经提示了在input是H264 H265源时建议采用MP4 进行record。

  • 相关阅读:
    Django CBV和FBV
    ArcGIS案例学习笔记2_1_山顶点提取最大值提取
    ArcGIS案例学习笔记2_1_学校选址适宜性分析
    ArcGIS案例学习笔记_3_2_CAD数据导入建库
    ArcGIS案例学习笔记3_1_地理配准案例_目视找点
    ArcGIS案例学习笔记3_1_地理配准案例_图面控制点
    ArcGIS案例学习笔记3_1_ArcMap编辑练习
    ArcGIS案例学习笔记4_2_城乡规划容积率计算和建筑景观三维动画
    ArcGIS案例学习笔记4_2_水文分析批处理地理建模
    ArcGIS案例学习笔记4_1_矢量校正
  • 原文地址:https://www.cnblogs.com/weihua2020/p/13888616.html
Copyright © 2020-2023  润新知