v210调查

7yuv 打开uyvy文件时选项

 

 

 

 

 

 

7yuv 打开v210格式 

 

 

 

 

 

通过ffmpeg 将v210编码为其他 

ffmpeg  -r 25 -vcodec v210 -f image2pipe -pix_fmt yuv422p10le -frame_size 5529600 -s 1920*1080 -i my_test.yuv -vcodec libx264 -b:v 8000k  -r 25  -f  mpegts v210.ts

 

ffmpeg -i v210.ts -vcodec v210 -pix_fmt yuv422p10le my_test.yuv 将上一步生成的文件再转回v210 的yuv

 

 

其他v210文章

http://trac.ffmpeg.org/ticket/1869

 

 

 

transcoder 成功的命令

输入编码

-vsync 1 -async 1 -r 25 -y -f decklink_sdi -pixel_format yuv422p10le -video_size 1920x1080 -standard 1080p25  -audio_pr 1 -video_con sdi -audio_con embd -channel 2 -ar 48000 -i 1 -discontinuity_exit -channel_num 1 -snapshots 1  -telnet_port 1700 -filter_complex split=outputs=1:[proxy0];[proxy0]scale=720:576[out0] -vcodec libx264 -pix_fmt yuv420p -map [out0]:v:0 -max_muxing_queue_size 1024 -codec:a:0 aac -map 0:a:0 -f mpegts hdr_input.ts -loglevel debug -stats

 

 解码输出

-vsync 1 -async 1 -stream_loop -1 -re -vcodec hevc -y -i san_xian.ts -dts_error_threshold 10.0 -discontinuity_exit -channel_num 1 -snapshots 1  -telnet_port 1700 -filter_complex split=outputs=1:[proxy0];[proxy0]scale=1920:1080[out0] -rtpflags +latm -vcodec v210 -pix_fmt yuv422p10le -r 25 -map [out0]:v:0 -max_muxing_queue_size 1024 -codec:a:0 pcm_s16le -ar:a:0 48000 -map 0:a:0 -f decklink_sdi -card_type decklink -video_mode 1080i50 1 -loglevel verbose -stats

 

编码hdr

/usr/bin/sdi_server --type decklinkHDR --port 1 --v_connector sdi --v_mode 1080p25 --a_connector embd --a_unit 1 --pairnum 1 --pixfmt YUV422P10LE --shares 1 --black_screen disable --uhd_picture 1 yuan_analog1

 

 

 

 

 

 

 

 

 

 

 

hevc 解码导出的变量

static void export_stream_params(AVCodecContext *avctx, const HEVCParamSets *ps,
                                 const HEVCSPS *sps)
{
    const HEVCVPS *vps = (const HEVCVPS*)ps->vps_list[sps->vps_id]->data;
    unsigned int num = 0, den = 0;

    avctx->pix_fmt             = sps->pix_fmt;
    avctx->coded_width         = sps->width;
    avctx->coded_height        = sps->height;
    avctx->width               = sps->output_width;
    avctx->height              = sps->output_height;
    avctx->has_b_frames        = sps->temporal_layer[sps->max_sub_layers - 1].num_reorder_pics;
    avctx->profile             = sps->ptl.general_ptl.profile_idc;
    avctx->level               = sps->ptl.general_ptl.level_idc;


 

 

    ff_set_sar(avctx, sps->vui.sar);

    if (sps->vui.video_signal_type_present_flag)
        avctx->color_range = sps->vui.video_full_range_flag ? AVCOL_RANGE_JPEG
                                                            : AVCOL_RANGE_MPEG;
    else
        avctx->color_range = AVCOL_RANGE_MPEG;

    if (sps->vui.colour_description_present_flag) {
        avctx->color_primaries = sps->vui.colour_primaries;
        avctx->color_trc       = sps->vui.transfer_characteristic;
        avctx->colorspace      = sps->vui.matrix_coeffs;
        if(sps->vui.transfer_characteristic == 16)
            snprintf(transfer_input,200,"smpte2084");
        else if(sps->vui.transfer_characteristic == 18)
            snprintf(transfer_input,200,"arib-std-b67");
    } else {
        avctx->color_primaries = AVCOL_PRI_UNSPECIFIED;
        avctx->color_trc       = AVCOL_TRC_UNSPECIFIED;
        avctx->colorspace      = AVCOL_SPC_UNSPECIFIED;
    }

    if (vps->vps_timing_info_present_flag) {
        num = vps->vps_num_units_in_tick;
        den = vps->vps_time_scale;
    } else if (sps->vui.vui_timing_info_present_flag) {
        num = sps->vui.vui_num_units_in_tick;
        den = sps->vui.vui_time_scale;
    }

    if (num != 0 && den != 0)
        av_reduce(&avctx->framerate.den, &avctx->framerate.num,
                  num, den, 1 << 30);
}

 

 

10bit 输出

解码器界面需要增加一个选项

output_with_10_bit

编码器需要增加一个10bit输入

input_with_10_bit

 

 

ffmpeg 中获取metadata

AVFrameSideData *av_frame_get_side_data(const AVFrame *frame,
                                        enum AVFrameSideDataType type)
{
    int i;

    for (i = 0; i < frame->nb_side_data; i++) {
        if (frame->side_data[i]->type == type)
            return frame->side_data[i];
    }
    return NULL;
}

 

AV_FRAME_DATA_MASTERING_DISPLAY_METADATA

 

posted @ 2020-08-05 16:45  虾兵  阅读(364)  评论(0编辑  收藏  举报