Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

保存海康265摄像头到MP4文件,保存的文件播放不了 #213

Open
feiyangqingyun opened this issue Jun 11, 2024 · 16 comments
Open

Comments

@feiyangqingyun
Copy link

测试保存海康的265格式的摄像头数据到MP4文件,保存后播放不了,没有任何播放器可以播放,包括ffplay。如果该摄像头设置成264,都正常。用大华的265的摄像头测试也都正常。很是奇怪。有个现象就是海康265摄像头后台设置的帧率25,但是mdk取出来是50,用ffmpeg取出来显示两个帧率,一个fps=50,一个tbr=25,貌似一个是avg_frame_rate一个是r_frame_rate。

@feiyangqingyun
Copy link
Author

对比测试了vlc和mpv,也是和mdk一样的问题。都是保存的MP4文件播放不了。问题就在如果用ffmpeg命令行保存的,确实可以。ffmpeg库版本同一个,7.0,命令行是 ffmpeg -i rtsp://admin:[email protected]:554/Streaming/Channels/101 -c copy d:/1.mp4
QQ截图20240611104738

@feiyangqingyun
Copy link
Author

保存的原始数据,没有编码保存,所以会不会是还有什么参数没有设置好?avcodec_parameters_copy

@feiyangqingyun
Copy link
Author

如果ffmpeg命令行不行,那就肯定不用搞了,关键是他居然行,奇怪了

@wang-bin
Copy link
Owner

wang-bin commented Jun 11, 2024

海康有自己的h265+私有编码,只有他们自己能解。直接播能播吗?

@feiyangqingyun
Copy link
Author

直接播放能播,而且我找了几个客户远程验证,大概率是设备问题,2020年后的265设备,mdk也是正常的。2018年的不行,但是2018的用ffmpeg命令行保存又是可以,不知道是ffmpeg加了啥?所以想问问大佬你有么有方向。

@wang-bin
Copy link
Owner

录制和播放mp4的日志都发出来看看

@feiyangqingyun
Copy link
Author

try to start to record
url is not supported by MediaIO FFmpeg
url is not supported by MediaIO Mem
url is not supported by MediaIO WinRT
Try to use default MediaIO
000000001CEFB640 open url:
000000001CEFB640 url opened
format flv is used for H:/codevideo/bin/video/2024-06-11-20-47-58-870.mp4
muxer output format name: flv
stream map: 0=>0
stream map: 1=>1
[FFmpeg:?] Output #0, flv, to 'H:/codevideo/bin/video/2024-06-11-20-47-58-870.mp4':
[FFmpeg:?] Stream #0
[FFmpeg:?] :0
[FFmpeg:?] : Video: hevc (Main), yuv420p(tv), 1920x1080, q=2-31
[FFmpeg:?]
[FFmpeg:?] Stream #0
[FFmpeg:?] :1
[FFmpeg:?] : Audio: pcm_alaw, 8000 Hz, 0 channels, s16
[FFmpeg:?]
0000000024489D00 avio set class
Format: flv, range: 0 +0ms, bitrate: 0, size: 0
Metadata:
encoder: Lavf61.1.100
Streams: 2
Video:
stream#0, range: 0 +0ms, frames: 0
codec: hevc tag: '1cvh' profile: 1 level: 123, yuv420p, bpc:8, bpp:12(8,8,8), channels:(1,1,1), map: 0 1 2 0, bitrate: 0, 1920x1080, fps: 0, bframes: 0, range: Limited
extra data(57): 00 00 00 01 42 01 01 01 60 00 00 03 00 B0 00 00 03 00 00 03 00 7B A0 03 C0 80 10 E5 8D AE 49 32 FC 02 00 00 03 00 02 00 00 03 00 65 42 00 00 00 01 44 01 C0 F2 F0 3C 90 00
Audio:
stream#1, range: 0 +0ms, frames: 0
codec: pcm_alaw tag: 0X7 profile: -99 level: -99, sample size: 0/8, block align: 0, frame_size: 0, s16 empty(0) @8000Hz, bitrate: 64000

[email protected] to be destroyed is not rendered by 00000000140AF930
00000000037639A0>10840 00:00:10.8/00:00:11 cache 2v 0.4s/95KB 224KB/s |+1|<4ms update 40.1ms 22.8fps draw 0/0 +243ms drop 5
stop recording
[email protected] to be destroyed is not rendered by 00000000140AF930
[email protected] to be destroyed is not rendered by 00000000140AF930
00000000037639A0>16599 00:00:16.5/00:00:17 cache 3v 0.4s/94KB 213KB/s |+2|<4ms update 39.8ms 25.2fps draw 0/0 +280ms drop 7
[email protected] to be destroyed is not rendered by 00000000140AF930
[email protected] to be destroyed is not rendered by 00000000140AF930
[email protected] to be destroyed is not rendered by 00000000140AF930
00000000037639A0>16720 00:00:16.7/00:00:17 cache 3v 0.4s/93KB 218KB/s |-1|<4ms update 39.9ms 25.2fps draw 0/0 +280ms drop 10
[email protected] to be destroyed is not rendered by 00000000140AF930
[email protected] to be destroyed is not rendered by 00000000140AF930
[email protected] to be destroyed is not rendered by 00000000140AF930
00000000037639A0>16840 00:00:16.8/00:00:17 cache 3v 0.4s/94KB 196KB/s |-1|<4ms update 40.5ms 25.2fps draw 0/0 +280ms drop 13
[email protected] to be destroyed is not rendered by 00000000140AF930
[email protected] to be destroyed is not rendered by 00000000140AF930
[email protected] to be destroyed is not rendered by 00000000140AF930
00000000037639A0>16960 00:00:16.9/00:00:17 cache 3v 0.4s/95KB 190KB/s |-1|<4ms update 40.1ms 25.2fps draw 0/0 +280ms drop 16
[email protected] to be destroyed is not rendered by 00000000140AF930
Format: flv, range: 0 +0ms, bitrate: 0, size: 0
Metadata:
encoder: Lavf61.1.100
Streams: 2
Video:
stream#0, range: 0 +0ms, frames: 229
codec: hevc tag: '1cvh' profile: 1 level: 123, yuv420p, bpc:8, bpp:12(8,8,8), channels:(1,1,1), map: 0 1 2 0, bitrate: 0, 1920x1080, fps: 0, bframes: 0, range: Limited
extra data(57): 00 00 00 01 42 01 01 01 60 00 00 03 00 B0 00 00 03 00 00 03 00 7B A0 03 C0 80 10 E5 8D AE 49 32 FC 02 00 00 03 00 02 00 00 03 00 65 42 00 00 00 01 44 01 C0 F2 F0 3C 90 00
Audio:
stream#1, range: 0 +0ms, frames: 228
codec: pcm_alaw tag: 0X7 profile: -99 level: -99, sample size: 0/8, block align: 0, frame_size: 0, s16 empty(0) @8000Hz, bitrate: 64000

free custome avio: 0000000024489D00
000000001CEFB640 close url: H:/codevideo/bin/video/2024-06-11-20-47-58-870.mp4
try to start to record

00000000140716A0 player.set(0)
00000000037639A0 void __cdecl mdk::abi::MediaControlPush::setState(enum mdk::abi::State)@1068 requested state 1=>0, current state 1. status: 0X124
default FrameReader00000000140C5900 state: 1=>1=>0, 0
default00000000140C5900 mdk::abi::FrameReader::stop, current state: 1
00000000140C5900 mdk::abi::FrameReaderImpl::unload, current status 0x124, invalid: 0, loading: 0, loaded: 4, buffering: 0, seeking: 0, prepared: 256, EOF: 0
0000000014020708 request avformat input interrupt
interrupted by user
default FrameReader@00000000140C5900 unload requested, close io
interrupted by user
15960default 00000000140C5900 mdk::abi::FrameReader::update @1149: reset status_mask. status: 121
default 00000000140C5900 FrameReader::update MediaStatus 0X124=>0X1
FrameReader00000000140C5900 stop by user. clear packets, send eof for each loop
FrameReader@00000000140C5900 sending Packet::End to all packet queues. PacketIO@00000000140EB0E0 ->url: rtsp://admin:[email protected]:554/Streaming/Channels/101
clear packet queue for stream 0
clear packet queue for stream 1
before changed() 1
default FrameReader00000000140C5900 state: 1=>0=>0, 0
00000000140C5900 mdk::abi::FrameReaderImpl::unload, current status 0x1, invalid: 0, loading: 0, loaded: 0, buffering: 0, seeking: 0, prepared: 0, EOF: 0
[email protected] to be destroyed is not rendered by 00000000140AF930
EOS audio frame of track 0
audio stream#1 decoding loop is finished. packets: 2, pts: [0.000000, 0.000000]
__cdecl ThreadLocal::Data::~Data(void) thread: 1016
EOS video frame of track 0
[email protected] to be destroyed is not rendered by 00000000140AF930
video stream#0 decoding loop is finished. packets: 2, pts: [0.000000, 0.000000]
default FrameReader00000000140C5900 state: 1=>0=>0, 1
default FrameReader00000000140C5900 update state: 1=>0

00000000140716A0 player.onMediaStatus(0)
00000000140716A0 player.onStateChanged(0)
00000000140716A0 player.onEvent(0, 0000000000000000)
00000000140716A0 player.onFrame(0)
00000000140716A0 player.~Player
00000000140716A0 player.setNextMedia(, -1, 2)
setNext from -1 url:
00000000140716A0 player.currentMediaChanged(0)
00000000140716A0 player.setMedia()
default FrameReader00000000140C5900 state: 0=>0=>0, 0
default00000000140C5900 mdk::abi::FrameReader::stop, current state: 0
default FrameReader00000000140C5900 state: 0=>0=>0, 0
default00000000140C5900 mdk::abi::FrameReader::stop, current state: 0
00000000140716A0 player.onEvent(0, 0000000000000000)
__cdecl mdk::abi::MediaPlayer::Private::~Private(void)
00000000037639A0 void __cdecl mdk::abi::MediaControlPush::setState(enum mdk::abi::State)@1068 requested state 0=>0, current state 0. status: 0X1
default FrameReader00000000140C5900 state: 0=>0=>0, 0
default00000000140C5900 mdk::abi::FrameReader::stop, current state: 0
default 00000000140C5900 deleting FrameReader...
000000001403F800 void cdecl mdk::abi::MediaControlPush::setState(enum mdk::abi::State)@1068 requested state 0=>0, current state 0. status: 0
default 000000000D0CC290 deleting FrameReader...
player is destroyed
new Context object 000000001CE56860(1) for native context handle 0000000000010002
ctx->api
: 000000001CE3ECC0
probing gl context... native: 0000000000000000
select gl api resolver for OpenGL|OpenGLES
init: EGL runtime is not valid
select gl api resolver for OpenGL|OpenGLES
get_proc EGL runtime is not valid
using opengl api resolver: WGL
resolving gl common functions...
select gl api resolver for OpenGL|OpenGLES
get_proc EGL runtime is not valid
using opengl api resolver: WGL
probing gl client context... major
: 0
GL_VENDOR: Intel
GL_RENDERER: Intel(R) UHD Graphics 630
GL_VERSION: 4.6.0 - Build 30.0.101.1340
GL_SHADING_LANGUAGE_VERSION: 4.60 - Build 30.0.101.1340
GL_3DFX_texture_compression_FXT1 GL_AMD_depth_clamp_separate GL_AMD_vertex_shader_layer GL_AMD_vertex_shader_viewport_index GL_ARB_ES2_compatibility GL_ARB_ES3_1_compatibility GL_ARB_ES3_compatibility GL_ARB_arrays_of_arrays GL_ARB_base_instance GL_ARB_bindless_texture GL_ARB_blend_func_extended GL_ARB_buffer_storage GL_ARB_cl_event GL_ARB_clear_buffer_object GL_ARB_clear_texture GL_ARB_clip_control GL_ARB_color_buffer_float GL_ARB_compatibility GL_ARB_compressed_texture_pixel_storage GL_ARB_compute_shader GL_ARB_conditional_render_inverted GL_ARB_conservative_depth GL_ARB_copy_buffer GL_ARB_copy_image GL_ARB_cull_distance GL_ARB_debug_output GL_ARB_depth_buffer_float GL_ARB_depth_clamp GL_ARB_depth_texture GL_ARB_derivative_control GL_ARB_direct_state_access GL_ARB_draw_buffers GL_ARB_draw_buffers_blend GL_ARB_draw_elements_base_vertex GL_ARB_draw_indirect GL_ARB_draw_instanced GL_ARB_enhanced_layouts GL_ARB_explicit_attrib_location GL_ARB_explicit_uniform_location GL_ARB_fragment_coord_conventions GL_ARB_fragment_layer_viewport GL_ARB_fragment_program GL_ARB_fragment_program_shadow GL_ARB_fragment_shader GL_ARB_fragment_shader_interlock GL_ARB_framebuffer_no_attachments GL_ARB_framebuffer_object GL_ARB_framebuffer_sRGB GL_ARB_geometry_shader4 GL_ARB_get_program_binary GL_ARB_get_texture_sub_image GL_ARB_gl_spirv GL_ARB_gpu_shader5 GL_ARB_gpu_shader_fp64 GL_ARB_half_float_pixel GL_ARB_half_float_vertex GL_ARB_indirect_parameters GL_ARB_instanced_arrays GL_ARB_internalformat_query GL_ARB_internalformat_query2 GL_ARB_invalidate_subdata GL_ARB_map_buffer_alignment GL_ARB_map_buffer_range GL_ARB_multi_bind GL_ARB_multi_draw_indirect GL_ARB_multisample GL_ARB_multitexture GL_ARB_occlusion_query GL_ARB_occlusion_query2 GL_ARB_pipeline_statistics_query GL_ARB_pixel_buffer_object GL_ARB_point_parameters GL_ARB_point_sprite GL_ARB_polygon_offset_clamp GL_ARB_post_depth_coverage GL_ARB_program_interface_query GL_ARB_provoking_vertex GL_ARB_query_buffer_object GL_ARB_robust_buffer_access_behavior GL_ARB_robustness GL_ARB_robustness_isolation GL_ARB_sample_shading GL_ARB_sampler_objects GL_ARB_seamless_cube_map GL_ARB_seamless_cubemap_per_texture GL_ARB_separate_shader_objects GL_ARB_shader_atomic_counter_ops GL_ARB_shader_atomic_counters GL_ARB_shader_bit_encoding GL_ARB_shader_draw_parameters GL_ARB_shader_group_vote GL_ARB_shader_image_load_store GL_ARB_shader_image_size GL_ARB_shader_objects GL_ARB_shader_precision GL_ARB_shader_stencil_export GL_ARB_shader_storage_buffer_object GL_ARB_shader_subroutine GL_ARB_shader_texture_image_samples GL_ARB_shading_language_100 GL_ARB_shading_language_420pack GL_ARB_shading_language_packing GL_ARB_shadow GL_ARB_spirv_extensions GL_ARB_stencil_texturing GL_ARB_sync GL_ARB_tessellation_shader GL_ARB_texture_barrier GL_ARB_texture_border_clamp GL_ARB_texture_buffer_object GL_ARB_texture_buffer_object_rgb32 GL_ARB_texture_buffer_range GL_ARB_texture_compression GL_ARB_texture_compression_bptc GL_ARB_texture_compression_rgtc GL_ARB_texture_cube_map GL_ARB_texture_cube_map_array GL_ARB_texture_env_add GL_ARB_texture_env_combine GL_ARB_texture_env_crossbar GL_ARB_texture_env_dot3 GL_ARB_texture_filter_anisotropic GL_ARB_texture_float GL_ARB_texture_gather GL_ARB_texture_mirror_clamp_to_edge GL_ARB_texture_mirrored_repeat GL_ARB_texture_multisample GL_ARB_texture_non_power_of_two GL_ARB_texture_query_levels GL_ARB_texture_query_lod GL_ARB_texture_rectangle GL_ARB_texture_rg GL_ARB_texture_rgb10_a2ui GL_ARB_texture_stencil8 GL_ARB_texture_storage GL_ARB_texture_storage_multisample GL_ARB_texture_swizzle GL_ARB_texture_view GL_ARB_timer_query GL_ARB_transform_feedback2 GL_ARB_transform_feedback3 GL_ARB_transform_feedback_instanced GL_ARB_transform_feedback_overflow_query GL_ARB_transpose_matrix GL_ARB_uniform_buffer_object GL_ARB_vertex_array_bgra GL_ARB_vertex_array_object GL_ARB_vertex_attrib_64bit GL_ARB_vertex_attrib_binding GL_ARB_vertex_buffer_object GL_ARB_vertex_program GL_ARB_vertex_shader GL_ARB_vertex_type_10f_11f_11f_rev GL_ARB_vertex_type_2_10_10_10_rev GL_ARB_viewport_array GL_ARB_window_pos GL_ATI_separate_stencil GL_EXT_abgr GL_EXT_bgra GL_EXT_blend_color GL_EXT_blend_equation_separate GL_EXT_blend_func_separate GL_EXT_blend_minmax GL_EXT_blend_subtract GL_EXT_clip_volume_hint GL_EXT_compiled_vertex_array GL_EXT_direct_state_access GL_EXT_draw_buffers2 GL_EXT_draw_range_elements GL_EXT_fog_coord GL_EXT_framebuffer_blit GL_EXT_framebuffer_multisample GL_EXT_framebuffer_object GL_EXT_geometry_shader4 GL_EXT_gpu_program_parameters GL_EXT_gpu_shader4 GL_EXT_memory_object GL_EXT_memory_object_win32 GL_EXT_multi_draw_arrays GL_EXT_packed_depth_stencil GL_EXT_packed_float GL_EXT_packed_pixels GL_EXT_polygon_offset_clamp GL_EXT_rescale_normal GL_EXT_secondary_color GL_EXT_semaphore GL_EXT_semaphore_win32 GL_EXT_separate_specular_color GL_EXT_shader_framebuffer_fetch GL_EXT_shader_integer_mix GL_EXT_shadow_funcs GL_EXT_stencil_two_side GL_EXT_stencil_wrap GL_EXT_texture3D GL_EXT_texture_array GL_EXT_texture_compression_s3tc GL_EXT_texture_edge_clamp GL_EXT_texture_env_add GL_EXT_texture_env_combine GL_EXT_texture_filter_anisotropic GL_EXT_texture_integer GL_EXT_texture_lod_bias GL_EXT_texture_rectangle GL_EXT_texture_sRGB GL_EXT_texture_sRGB_decode GL_EXT_texture_shared_exponent GL_EXT_texture_snorm GL_EXT_texture_storage GL_EXT_texture_swizzle GL_EXT_timer_query GL_EXT_transform_feedback GL_IBM_texture_mirrored_repeat GL_INTEL_conservative_rasterization GL_INTEL_fragment_shader_ordering GL_INTEL_framebuffer_CMAA GL_INTEL_map_texture GL_INTEL_multi_rate_fragment_shader GL_INTEL_performance_query GL_KHR_blend_equation_advanced GL_KHR_blend_equation_advanced_coherent GL_KHR_context_flush_control GL_KHR_debug GL_KHR_no_error GL_KHR_shader_subgroup GL_KHR_shader_subgroup_arithmetic GL_KHR_shader_subgroup_ballot GL_KHR_shader_subgroup_basic GL_KHR_shader_subgroup_clustered GL_KHR_shader_subgroup_quad GL_KHR_shader_subgroup_shuffle GL_KHR_shader_subgroup_shuffle_relative GL_KHR_shader_subgroup_vote GL_KHR_texture_compression_astc_hdr GL_KHR_texture_compression_astc_ldr GL_NV_blend_square GL_NV_conditional_render GL_NV_primitive_restart GL_NV_texgen_reflection GL_SGIS_generate_mipmap GL_SGIS_texture_edge_clamp GL_SGIS_texture_lod GL_SUN_multi_draw_arrays GL_WIN_swap_hint WGL_ARB_buffer_region WGL_ARB_context_flush_control WGL_ARB_create_context WGL_ARB_create_context_profile WGL_ARB_create_context_robustness WGL_ARB_extensions_string WGL_ARB_framebuffer_sRGB WGL_ARB_make_current_read WGL_ARB_multisample WGL_ARB_pbuffer WGL_ARB_pixel_format WGL_ARB_pixel_format_float WGL_ARB_robustness_application_isolation WGL_ARB_robustness_share_group_isolation WGL_EXT_create_context_es2_profile WGL_EXT_create_context_es_profile WGL_EXT_depth_float WGL_EXT_extensions_string WGL_EXT_pixel_format_packed_float WGL_EXT_swap_control WGL_NV_DX_interop WGL_NV_DX_interop2
16 bit texture channel depth: 16
OpenGL Context thread: 15560
OpenGL4.6 Compatibility profile, EGL0, GLSL460
Features PBO: 1, UBO: 1, RG texture: 1, 16bit texture: 1
resolving gl extensions...
select gl api resolver for OpenGL|OpenGLES
get_proc EGL runtime is not valid
using opengl api resolver: WGL
context version: 460
extension resolved: glDiscardFramebufferEXT
gl api resolved. thread@ 15560
000000001CE56860->aboutToDestroy() erase context 000000001CE56860(1) for native context handle 0000000000010002 ~~~~~~~~
UGL::opengl::Context::~Context
000000001CE56860->aboutToDestroy() done~~~~~~~~
000000000D0D94B0__cdecl UGL::opengl::Context::Local<struct mdk::abi::GLVideoRenderer::Private::Renderers,struct mdk::abi::GLVideoRenderer::Private::Renderers>::~Local(void)0000000000000000 count: 0
cdecl mdk::abi::VideoRenderer::Private::~Private(void) @127
new Context object 000000001CE56AA0(2) for native context handle 0000000000010002
ctx->api
: 000000001CE3ECC0
probing gl context... native: 0000000000000000
select gl api resolver for OpenGL|OpenGLES
init: EGL runtime is not valid
select gl api resolver for OpenGL|OpenGLES
get_proc EGL runtime is not valid
using opengl api resolver: WGL
resolving gl common functions...
select gl api resolver for OpenGL|OpenGLES
get_proc EGL runtime is not valid
using opengl api resolver: WGL
probing gl client context... major
: 0
GL_VENDOR: Intel
GL_RENDERER: Intel(R) UHD Graphics 630
GL_VERSION: 4.6.0 - Build 30.0.101.1340
GL_SHADING_LANGUAGE_VERSION: 4.60 - Build 30.0.101.1340
GL_3DFX_texture_compression_FXT1 GL_AMD_depth_clamp_separate GL_AMD_vertex_shader_layer GL_AMD_vertex_shader_viewport_index GL_ARB_ES2_compatibility GL_ARB_ES3_1_compatibility GL_ARB_ES3_compatibility GL_ARB_arrays_of_arrays GL_ARB_base_instance GL_ARB_bindless_texture GL_ARB_blend_func_extended GL_ARB_buffer_storage GL_ARB_cl_event GL_ARB_clear_buffer_object GL_ARB_clear_texture GL_ARB_clip_control GL_ARB_color_buffer_float GL_ARB_compatibility GL_ARB_compressed_texture_pixel_storage GL_ARB_compute_shader GL_ARB_conditional_render_inverted GL_ARB_conservative_depth GL_ARB_copy_buffer GL_ARB_copy_image GL_ARB_cull_distance GL_ARB_debug_output GL_ARB_depth_buffer_float GL_ARB_depth_clamp GL_ARB_depth_texture GL_ARB_derivative_control GL_ARB_direct_state_access GL_ARB_draw_buffers GL_ARB_draw_buffers_blend GL_ARB_draw_elements_base_vertex GL_ARB_draw_indirect GL_ARB_draw_instanced GL_ARB_enhanced_layouts GL_ARB_explicit_attrib_location GL_ARB_explicit_uniform_location GL_ARB_fragment_coord_conventions GL_ARB_fragment_layer_viewport GL_ARB_fragment_program GL_ARB_fragment_program_shadow GL_ARB_fragment_shader GL_ARB_fragment_shader_interlock GL_ARB_framebuffer_no_attachments GL_ARB_framebuffer_object GL_ARB_framebuffer_sRGB GL_ARB_geometry_shader4 GL_ARB_get_program_binary GL_ARB_get_texture_sub_image GL_ARB_gl_spirv GL_ARB_gpu_shader5 GL_ARB_gpu_shader_fp64 GL_ARB_half_float_pixel GL_ARB_half_float_vertex GL_ARB_indirect_parameters GL_ARB_instanced_arrays GL_ARB_internalformat_query GL_ARB_internalformat_query2 GL_ARB_invalidate_subdata GL_ARB_map_buffer_alignment GL_ARB_map_buffer_range GL_ARB_multi_bind GL_ARB_multi_draw_indirect GL_ARB_multisample GL_ARB_multitexture GL_ARB_occlusion_query GL_ARB_occlusion_query2 GL_ARB_pipeline_statistics_query GL_ARB_pixel_buffer_object GL_ARB_point_parameters GL_ARB_point_sprite GL_ARB_polygon_offset_clamp GL_ARB_post_depth_coverage GL_ARB_program_interface_query GL_ARB_provoking_vertex GL_ARB_query_buffer_object GL_ARB_robust_buffer_access_behavior GL_ARB_robustness GL_ARB_robustness_isolation GL_ARB_sample_shading GL_ARB_sampler_objects GL_ARB_seamless_cube_map GL_ARB_seamless_cubemap_per_texture GL_ARB_separate_shader_objects GL_ARB_shader_atomic_counter_ops GL_ARB_shader_atomic_counters GL_ARB_shader_bit_encoding GL_ARB_shader_draw_parameters GL_ARB_shader_group_vote GL_ARB_shader_image_load_store GL_ARB_shader_image_size GL_ARB_shader_objects GL_ARB_shader_precision GL_ARB_shader_stencil_export GL_ARB_shader_storage_buffer_object GL_ARB_shader_subroutine GL_ARB_shader_texture_image_samples GL_ARB_shading_language_100 GL_ARB_shading_language_420pack GL_ARB_shading_language_packing GL_ARB_shadow GL_ARB_spirv_extensions GL_ARB_stencil_texturing GL_ARB_sync GL_ARB_tessellation_shader GL_ARB_texture_barrier GL_ARB_texture_border_clamp GL_ARB_texture_buffer_object GL_ARB_texture_buffer_object_rgb32 GL_ARB_texture_buffer_range GL_ARB_texture_compression GL_ARB_texture_compression_bptc GL_ARB_texture_compression_rgtc GL_ARB_texture_cube_map GL_ARB_texture_cube_map_array GL_ARB_texture_env_add GL_ARB_texture_env_combine GL_ARB_texture_env_crossbar GL_ARB_texture_env_dot3 GL_ARB_texture_filter_anisotropic GL_ARB_texture_float GL_ARB_texture_gather GL_ARB_texture_mirror_clamp_to_edge GL_ARB_texture_mirrored_repeat GL_ARB_texture_multisample GL_ARB_texture_non_power_of_two GL_ARB_texture_query_levels GL_ARB_texture_query_lod GL_ARB_texture_rectangle GL_ARB_texture_rg GL_ARB_texture_rgb10_a2ui GL_ARB_texture_stencil8 GL_ARB_texture_storage GL_ARB_texture_storage_multisample GL_ARB_texture_swizzle GL_ARB_texture_view GL_ARB_timer_query GL_ARB_transform_feedback2 GL_ARB_transform_feedback3 GL_ARB_transform_feedback_instanced GL_ARB_transform_feedback_overflow_query GL_ARB_transpose_matrix GL_ARB_uniform_buffer_object GL_ARB_vertex_array_bgra GL_ARB_vertex_array_object GL_ARB_vertex_attrib_64bit GL_ARB_vertex_attrib_binding GL_ARB_vertex_buffer_object GL_ARB_vertex_program GL_ARB_vertex_shader GL_ARB_vertex_type_10f_11f_11f_rev GL_ARB_vertex_type_2_10_10_10_rev GL_ARB_viewport_array GL_ARB_window_pos GL_ATI_separate_stencil GL_EXT_abgr GL_EXT_bgra GL_EXT_blend_color GL_EXT_blend_equation_separate GL_EXT_blend_func_separate GL_EXT_blend_minmax GL_EXT_blend_subtract GL_EXT_clip_volume_hint GL_EXT_compiled_vertex_array GL_EXT_direct_state_access GL_EXT_draw_buffers2 GL_EXT_draw_range_elements GL_EXT_fog_coord GL_EXT_framebuffer_blit GL_EXT_framebuffer_multisample GL_EXT_framebuffer_object GL_EXT_geometry_shader4 GL_EXT_gpu_program_parameters GL_EXT_gpu_shader4 GL_EXT_memory_object GL_EXT_memory_object_win32 GL_EXT_multi_draw_arrays GL_EXT_packed_depth_stencil GL_EXT_packed_float GL_EXT_packed_pixels GL_EXT_polygon_offset_clamp GL_EXT_rescale_normal GL_EXT_secondary_color GL_EXT_semaphore GL_EXT_semaphore_win32 GL_EXT_separate_specular_color GL_EXT_shader_framebuffer_fetch GL_EXT_shader_integer_mix GL_EXT_shadow_funcs GL_EXT_stencil_two_side GL_EXT_stencil_wrap GL_EXT_texture3D GL_EXT_texture_array GL_EXT_texture_compression_s3tc GL_EXT_texture_edge_clamp GL_EXT_texture_env_add GL_EXT_texture_env_combine GL_EXT_texture_filter_anisotropic GL_EXT_texture_integer GL_EXT_texture_lod_bias GL_EXT_texture_rectangle GL_EXT_texture_sRGB GL_EXT_texture_sRGB_decode GL_EXT_texture_shared_exponent GL_EXT_texture_snorm GL_EXT_texture_storage GL_EXT_texture_swizzle GL_EXT_timer_query GL_EXT_transform_feedback GL_IBM_texture_mirrored_repeat GL_INTEL_conservative_rasterization GL_INTEL_fragment_shader_ordering GL_INTEL_framebuffer_CMAA GL_INTEL_map_texture GL_INTEL_multi_rate_fragment_shader GL_INTEL_performance_query GL_KHR_blend_equation_advanced GL_KHR_blend_equation_advanced_coherent GL_KHR_context_flush_control GL_KHR_debug GL_KHR_no_error GL_KHR_shader_subgroup GL_KHR_shader_subgroup_arithmetic GL_KHR_shader_subgroup_ballot GL_KHR_shader_subgroup_basic GL_KHR_shader_subgroup_clustered GL_KHR_shader_subgroup_quad GL_KHR_shader_subgroup_shuffle GL_KHR_shader_subgroup_shuffle_relative GL_KHR_shader_subgroup_vote GL_KHR_texture_compression_astc_hdr GL_KHR_texture_compression_astc_ldr GL_NV_blend_square GL_NV_conditional_render GL_NV_primitive_restart GL_NV_texgen_reflection GL_SGIS_generate_mipmap GL_SGIS_texture_edge_clamp GL_SGIS_texture_lod GL_SUN_multi_draw_arrays GL_WIN_swap_hint WGL_ARB_buffer_region WGL_ARB_context_flush_control WGL_ARB_create_context WGL_ARB_create_context_profile WGL_ARB_create_context_robustness WGL_ARB_extensions_string WGL_ARB_framebuffer_sRGB WGL_ARB_make_current_read WGL_ARB_multisample WGL_ARB_pbuffer WGL_ARB_pixel_format WGL_ARB_pixel_format_float WGL_ARB_robustness_application_isolation WGL_ARB_robustness_share_group_isolation WGL_EXT_create_context_es2_profile WGL_EXT_create_context_es_profile WGL_EXT_depth_float WGL_EXT_extensions_string WGL_EXT_pixel_format_packed_float WGL_EXT_swap_control WGL_NV_DX_interop WGL_NV_DX_interop2
16 bit texture channel depth: 16
OpenGL Context thread: 15560
OpenGL4.6 Compatibility profile, EGL0, GLSL460
Features PBO: 1, UBO: 1, RG texture: 1, 16bit texture: 1
resolving gl extensions...
select gl api resolver for OpenGL|OpenGLES
get_proc EGL runtime is not valid
using opengl api resolver: WGL
context version: 460
extension resolved: glDiscardFramebufferEXT
gl api resolved. thread@ 15560
000000001CE56AA0->aboutToDestroy() erase context 000000001CE56AA0(2) for native context handle 0000000000010002 ~~~~~~~~
UGL::opengl::Context::~Context
000000001CE56AA0->aboutToDestroy() done~~~~~~~~
0000000014068EB0__cdecl UGL::opengl::Context::Local<struct mdk::abi::GLVideoRenderer::Private::Renderers,struct mdk::abi::GLVideoRenderer::Private::Renderers>::~Local(void)0000000000000001 count: 1
0000000014068EB0__cdecl UGL::opengl::Context::Local<struct mdk::abi::GLVideoRenderer::Private::Renderers,struct mdk::abi::GLVideoRenderer::Private::Renderers>::~Local(void)0000000000000001 mark dead data: 000000001CC59FD0
__cdecl mdk::abi::VideoRenderer::Private::~Private(void) @127
[email protected] to be destroyed is not rendered by 00000000140AF930
[email protected] to be destroyed is not rendered by 00000000140AF930
[email protected] to be destroyed is not rendered by 00000000140AF930
VideoFrame2549@179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368.000000 to be destroyed is not rendered by 00000000140AF930
__cdecl mdk::abi::VideoRenderer::Private::~Private(void) @127
000000001CC32910 destroying context local data 1...
00000000140AF170__cdecl mdk::abi::GLVideoRenderer::Private::Renderers::~Renderers(void)
cleanup shader cache
cleanup shader cache
000000001CC32910->aboutToDestroy() erase context 000000001CC32910(0) for native context handle 0000000000010004 ~~~~~~~~
UGL::opengl::Context::~Context
000000001CC32910->aboutToDestroy() done~~~~~~~~

@wang-bin
Copy link
Owner

播放呢?

@feiyangqingyun
Copy link
Author

保存的文件没有任何播放器可以播放,不用看

@wang-bin
Copy link
Owner

看哪里报错不是最基本的操作吗

@feiyangqingyun
Copy link
Author

播放的日志如下:
default 0000000013AFE930 new FrameReader...
Registered audio backends: XAudio2 DSound null
default 000000000CDC5B20 new FrameReader...
Registered audio backends: XAudio2 DSound null
000000001BF16E90 player.Player()
000000001BF16EA0 setAspectRatio(0.000000, 0000000000000000)
getVideoOutContext 0000000000000000 => 000000001C02A600. vo count: 1
000000001BF16E90 player.onStateChanged(1)
000000001BF16E90 player.onMediaStatus(1)
000000001BF16E90 player.onEvent(1, 00000000007CB850)
000000001BF16E90 player.set(0)
0000000003901690 void __cdecl mdk::abi::MediaControlPush::setState(enum mdk::abi::State)@1068 requested state 0=>0, current state 0. status: 0
000000001BF16E90 player property: avformat.user_agent = Mozilla
000000001BF16E90 player property: avformat.rtsp_transport = tcp
000000001BF16E90 player.setDecoders(video, [FFmpeg])
video decoders: "FFmpeg"
video decoders: "FFmpeg"
000000001BF16E90 player.setMedia(H:/codevideo/bin/video/2024-06-13-13-35-25-103.mp4)
default FrameReader0000000013AFE930 state: 0=>0=>0, 0
default0000000013AFE930 mdk::abi::FrameReader::stop, current state: 0
default FrameReader0000000013AFE930 state: 0=>0=>0, 0
default0000000013AFE930 mdk::abi::FrameReader::stop, current state: 0
000000001BF16E90 player.waitFor(0, -1)
000000001BF16E90 player.prepare(0, ..., 2)
0000000003901690 MediaControl.prepare(0, ...) H:/codevideo/bin/video/2024-06-13-13-35-25-103.mp4
default 0000000013AFE930 FrameReader.start(0, ...)
default 0000000013AFE930 FrameReader::update MediaStatus 0=>0X2
default FrameReader0000000013AFE930 state: 0=>0=>1, 0
default FrameReader0000000013AFE930 state: 0=>1=>1, 0
default FrameReader0000000013AFE930 request to pause 1, loaded: 0.
default FrameReader0000000013AFE930 state: 0=>1=>2, 0
default FrameReader0000000013AFE930 state requested: 2, current: 0
000000001BF16E90 player.setTimeout(5000)
000000001BF16E90 player.set(1)
0000000003901690 void __cdecl mdk::abi::MediaControlPush::setState(enum mdk::abi::State)@1068 requested state 2=>1, current state 0. status: 0X2
default FrameReader0000000013AFE930 request to pause 0, loaded: 0.
default FrameReader0000000013AFE930 state: 0=>2=>1, 0
default FrameReader0000000013AFE930 state requested: 1, current: 0

start frame reader thread: 2972
url is not supported by MediaIO FFmpeg
url is not supported by MediaIO Mem
url is not supported by MediaIO WinRT
Try to use default MediaIO
000000001BFC6FE0 open url:
000000001BFC6FE0 url opened
default 0000000013AFE930 FrameReader::update MediaStatus 0X2=>0X2
0000000012A05940 avio set class
before avformat_open_input. io: 000000001BFC6FE0(FFmpeg)/pb: 0000000012A05940, url: H:/codevideo/bin/video/2024-06-13-13-35-25-103.mp4
after avformat_open_input. pb: 0000000012A05940, iformat: 00007FFF2DDFEBA0, context flags: 2097280, input format flags: 67141640
[FFmpeg:extract_extradata] No start code is found.
Error avrt::avformat_find_stream_info(fmtctx_, nullptr) @388 D:\a\mdk-sdk\mdk-sdk\mdk\ffmpeg\plugin\FFmpegPacketIO.cpp: (0xbebbb1b7) Invalid data found when processing input
unsupported avformat options: user_agent=Mozilla rtsp_transport=tcp
2972default 0000000013AFE930 mdk::abi::FrameReader::update @1149: reset status_mask. status: 80000000
default 0000000013AFE930 FrameReader::update MediaStatus 0X2=>0X80000000
reader open error
2972default 0000000013AFE930 mdk::abi::FrameReader::update @1149: reset status_mask. status: 80000000
default 0000000013AFE930 FrameReader::update MediaStatus 0X80000000=>0X80000000
0000000013AFE930 mdk::abi::FrameReaderImpl::unload, current status 0x80000000, invalid: 0x80000000, loading: 0, loaded: 0, buffering: 0, seeking: 0, prepared: 0, EOF: 0
free custome avio: 0000000012A05940
000000001BFC6FE0 close url: H:/codevideo/bin/video/2024-06-13-13-35-25-103.mp4
default FrameReader0000000013AFE930 state: 0=>1=>0, 1
state not changed!

000000001BF16E90 player.setVolume(1.000000, -1)
000000001BF16E90 player.setMute(0)
0000000003901690 default FrameReader0000000013AFE930 unloaded media's position 0
0000000003901690 default FrameReader0000000013AFE930 unloaded media's position 0
0000000003901690 default FrameReader0000000013AFE930 unloaded media's position 0
0000000003901690 default FrameReader0000000013AFE930 unloaded media's position 0
0000000003901690 default FrameReader0000000013AFE930 unloaded media's position 0
0000000003901690 default FrameReader0000000013AFE930 unloaded media's position 0
0000000003901690 default FrameReader0000000013AFE930 unloaded media's position 0
0000000003901690 default FrameReader0000000013AFE930 unloaded media's position 0
0000000003901690 default FrameReader0000000013AFE930 unloaded media's position 0
0000000003901690 default FrameReader0000000013AFE930 unloaded media's position 0
0000000003901690 default FrameReader0000000013AFE930 unloaded media's position 0
0000000003901690 default FrameReader0000000013AFE930 unloaded media's position 0
0000000003901690 default FrameReader0000000013AFE930 unloaded media's position 0
0000000003901690 default FrameReader0000000013AFE930 unloaded media's position 0
0000000003901690 default FrameReader0000000013AFE930 unloaded media's position 0
0000000003901690 default FrameReader0000000013AFE930 unloaded media's position 0
0000000003901690 default FrameReader0000000013AFE930 unloaded media's position 0
0000000003901690 default FrameReader0000000013AFE930 unloaded media's position 0
0000000003901690 default FrameReader0000000013AFE930 unloaded media's position 0
0000000003901690 default FrameReader0000000013AFE930 unloaded media's position 0
0000000003901690 default FrameReader0000000013AFE930 unloaded media's position 0
0000000003901690 default FrameReader0000000013AFE930 unloaded media's position 0
0000000003901690 default FrameReader0000000013AFE930 unloaded media's position 0
0000000003901690 default FrameReader0000000013AFE930 unloaded media's position 0
0000000003901690 default FrameReader0000000013AFE930 unloaded media's position 0
0000000003901690 default FrameReader0000000013AFE930 unloaded media's position 0
0000000003901690 default FrameReader0000000013AFE930 unloaded media's position 0
0000000003901690 default FrameReader0000000013AFE930 unloaded media's position 0
0000000003901690 default FrameReader0000000013AFE930 unloaded media's position 0
000000001BF16E90 player.set(0)
0000000003901690 void __cdecl mdk::abi::MediaControlPush::setState(enum mdk::abi::State)@1068 requested state 1=>0, current state 0. status: 0X80000000
default FrameReader0000000013AFE930 state: 0=>0=>0, 0
default0000000013AFE930 mdk::abi::FrameReader::stop, current state: 0
__cdecl ThreadLocal<class std::function<void * __cdecl(char const *)> >::Data::~Data(void) thread: 16600
__cdecl ThreadLocal<class std::unordered_map<void const *,class std::unique_ptr<class UGL::opengl::Context,struct std::default_delete >,struct std::hash<void const *>,struct std::equal_to<void const *>,class std::allocator<struct std::pair<void const * const,class std::unique_ptr<class UGL::opengl::Context,struct std::default_delete > > > > >::Data::~Data(void) thread: 16600
__cdecl ThreadLocal::Data::~Data(void) thread: 16600
__cdecl ThreadLocal::Data::~Data(void) thread: 16600

@wang-bin
Copy link
Owner

extra data(57): 00 00 00 01 42 01 01 01 60 00 00 03 00 B0 00 00 03 00 00 03 00 7B A0 03 C0 80 10 E5 8D AE 49 32 FC 02 00 00 03 00 02 00 00 03 00 65 42 00 00 00 01 44 01 C0 F2 F0 3C 90 00

录制使用的extradata有问题,缺少vps

你把播放rtsp和播放ffmpeg录制文件的日志都发一下

@feiyangqingyun
Copy link
Author

大概率如你所说的,可能是源头就缺少vps。
下面的日志文件是打开,录制,关闭。
新建文本文档.txt

@feiyangqingyun
Copy link
Author

估计ffmpeg的保存,会自动加vps啥的。

@wang-bin
Copy link
Owner

wang-bin commented Jun 13, 2024

源没有vps。glfwplay播放ffmpeg录制文件的日志看看

@feiyangqingyun
Copy link
Author

用ffmpeg命令行录制的文件完全可以,所有播放器都能播放。不编码保存

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants