我用 C++ 代码创建了一个视频(没有音轨),可以在 上播放,VLC
但在 上显示黑屏(持续时间相同)Totem
。
该文件有什么问题?
totem video0.mp4 --gst-debug-level=2
0:00:00.165734411 11969 0x7f3f10003b80 WARN basesrc gstbasesrc.c:3489:gst_base_src_start_complete:<source> pad not activated yet
0:00:00.166118552 11969 0x7f3f10003b80 WARN basesrc gstbasesrc.c:3489:gst_base_src_start_complete:<source> pad not activated yet
0:00:00.196680481 11969 0x7f3ee00ea2d0 WARN qtdemux qtdemux.c:2651:qtdemux_parse_trex:<qtdemux0> failed to find fragment defaults for stream 1
0:00:00.196977258 11969 0x7f3ee00ea2d0 WARN basesrc gstbasesrc.c:2396:gst_base_src_update_length:<source> processing at or past EOS
调试级别 3:
totem video0.mp4 --gst-debug-level=3
0:00:00.195766358 12019 0x55cf0f81b6d0 FIXME bin gstbin.c:4149:gst_bin_query: implement duration caching in GstBin again
0:00:00.195808156 12019 0x55cf0f81b6d0 FIXME bin gstbin.c:4149:gst_bin_query: implement duration caching in GstBin again
0:00:00.209930090 12019 0x55cf0f81b6d0 WARN basesrc gstbasesrc.c:3489:gst_base_src_start_complete:<source> pad not activated yet
0:00:00.210300987 12019 0x55cf0f81b6d0 WARN basesrc gstbasesrc.c:3489:gst_base_src_start_complete:<source> pad not activated yet
0:00:00.210692379 12019 0x55cf0f81b6d0 FIXME bin gstbin.c:4149:gst_bin_query: implement duration caching in GstBin again
0:00:00.210706890 12019 0x55cf0f81b6d0 FIXME bin gstbin.c:4149:gst_bin_query: implement duration caching in GstBin again
0:00:00.220489949 12019 0x7fc9000e0d90 WARN qtdemux qtdemux.c:2651:qtdemux_parse_trex:<qtdemux0> failed to find fragment defaults for stream 1
0:00:00.220565181 12019 0x7fc9000e0d90 WARN basesrc gstbasesrc.c:2396:gst_base_src_update_length:<source> processing at or past EOS
0:00:00.223242462 12019 0x7fc8f8004540 FIXME videodecoder gstvideodecoder.c:946:gst_video_decoder_drain_out:<pngdec0> Sub-class should implement drain()
0:00:00.223316018 12019 0x7fc8f8004540 FIXME videodecoder gstvideodecoder.c:946:gst_video_decoder_drain_out:<pngdec0> Sub-class should implement drain()
0:00:00.242389203 12019 0x55cf0f81b6d0 FIXME bin gstbin.c:4149:gst_bin_query: implement duration caching in GstBin again
0:00:00.242430385 12019 0x55cf0f81b6d0 FIXME bin gstbin.c:4149:gst_bin_query: implement duration caching in GstBin again
0:00:00.242445206 12019 0x55cf0f81b6d0 FIXME bin gstbin.c:4149:gst_bin_query: implement duration caching in GstBin again
0:00:00.279566412 12019 0x55cf0f81b6d0 FIXME bin gstbin.c:4149:gst_bin_query: implement duration caching in GstBin again
0:00:00.279682024 12019 0x55cf0f81b6d0 FIXME bin gstbin.c:4149:gst_bin_query: implement duration caching in GstBin again
0:00:00.279695802 12019 0x55cf0f81b6d0 FIXME bin gstbin.c:4149:gst_bin_query: implement duration caching in GstBin again
更新 1
ubuntu-restricted-extras
已经安装:
sudo apt install ubuntu-restricted-extras
Reading package lists... Done
Building dependency tree
Reading state information... Done
ubuntu-restricted-extras is already the newest version (65).
0 to upgrade, 0 to newly install, 0 to remove and 0 not to upgrade.
更新 2
输出信息:
ffprobe -loglevel error -show_streams -show_format video0.mp4
[STREAM]
index=0
codec_name=png
codec_long_name=PNG (Portable Network Graphics) image
profile=unknown
codec_type=video
codec_time_base=14457931/419310000
codec_tag_string=mp4v
codec_tag=0x7634706d
width=1280
height=720
coded_width=1280
coded_height=720
has_b_frames=0
sample_aspect_ratio=0:1
display_aspect_ratio=0:1
pix_fmt=rgba
level=-99
color_range=pc
color_space=unknown
color_transfer=unknown
color_primaries=unknown
chroma_location=unspecified
field_order=unknown
timecode=N/A
refs=1
id=N/A
r_frame_rate=29/1
avg_frame_rate=419310000/14457931
time_base=1/90000
start_pts=0
start_time=0.000000
duration_ts=43373880
duration=481.932000
bit_rate=74462385
max_bit_rate=74462385
bits_per_raw_sample=N/A
nb_frames=13977
nb_read_frames=N/A
nb_read_packets=N/A
DISPOSITION:default=1
DISPOSITION:dub=0
DISPOSITION:original=0
DISPOSITION:comment=0
DISPOSITION:lyrics=0
DISPOSITION:karaoke=0
DISPOSITION:forced=0
DISPOSITION:hearing_impaired=0
DISPOSITION:visual_impaired=0
DISPOSITION:clean_effects=0
DISPOSITION:attached_pic=0
DISPOSITION:timed_thumbnails=0
TAG:language=und
TAG:handler_name=VideoHandler
[/STREAM]
[FORMAT]
filename=video0.mp4
nb_streams=1
nb_programs=0
format_name=mov,mp4,m4a,3gp,3g2,mj2
format_long_name=QuickTime / MOV
start_time=0.000000
duration=481.932000
size=4485908727
bit_rate=74465422
probe_score=100
TAG:major_brand=isom
TAG:minor_version=512
TAG:compatible_brands=isomiso2mp41
TAG:encoder=Lavf57.83.100
[/FORMAT]