1

x264_encoder_encode の出力を UDP 経由でストリーミングするにはどうすればよいですか?

これは私の Init_x264 関数です:

x264_param_t param;
x264_param_default_preset(&param, "veryfast", "zerolatency");
param.i_threads = 1;
param.i_width = width;
param.i_height = height;
param.i_fps_num = 30;
param.i_fps_den = 1;

param.i_keyint_max = 30;
param.b_intra_refresh = 1;

param.rc.i_rc_method = X264_RC_CRF;
param.rc.f_rf_constant = 25;
param.rc.f_rf_constant_max = 35;

param.b_annexb = 1;
param.b_repeat_headers = 1;

param.i_log_level = X264_LOG_DEBUG;

x264_param_apply_profile(&param, "baseline");

encoder = x264_encoder_open(&param);

picIn = new x264_picture_t;
picOut = new x264_picture_t;
x264_picture_alloc(picIn, X264_CSP_I420, width, height);
x264_encoder_parameters(encoder, &param);

x264_encoder_encode の出力を (fwrite を使用して) ディスクに保存する代わりに、UDP 経由で宛先に送信しようとしました。avplay で再生しようとしましたが、失敗します。

[h264 @ 0x7f83f0012e80] non-existing PPS 0 referenced
[h264 @ 0x7f83f0012e80] decode_slice_header error
[h264 @ 0x7f83f0012e80] no frame!
[h264 @ 0x7f83f0012e80] non-existing PPS 0 referenced
[h264 @ 0x7f83f0012e80] decode_slice_header error
[h264 @ 0x7f83f0012e80] no frame!

vlc を使用すると、主にヘッダーの欠落に関するさまざまなエラー メッセージが表示されました。

4

0 に答える 0