我正在使用 ffprobe 测试带有 H264 视频的 mp4 文件。我正在使用以下命令来获取帧信息。
ffprobe -i <input_mp4_file> -show_frames -select_streams v
Run Code Online (Sandbox Code Playgroud)
我得到以下输出。
[FRAME]
media_type=video
stream_index=0
key_frame=1
pkt_pts=0
pkt_pts_time=0.000000
pkt_dts=0
pkt_dts_time=0.000000
best_effort_timestamp=0
best_effort_timestamp_time=0.000000
pkt_duration=512
pkt_duration_time=0.033333
pkt_pos=48
pkt_size=513516
width=1920
height=1920
pix_fmt=yuv420p
sample_aspect_ratio=1:1
pict_type=I
coded_picture_number=0
display_picture_number=0
interlaced_frame=0
top_field_first=0
repeat_pict=0
[/FRAME]
[FRAME]
media_type=video
stream_index=0
key_frame=0
pkt_pts=512
pkt_pts_time=0.033333
pkt_dts=512
pkt_dts_time=0.033333
best_effort_timestamp=512
best_effort_timestamp_time=0.033333
pkt_duration=512
pkt_duration_time=0.033333
pkt_pos=513564
pkt_size=3299
width=1920
height=1920
pix_fmt=yuv420p
sample_aspect_ratio=1:1
pict_type=P
coded_picture_number=1
display_picture_number=0
interlaced_frame=0
top_field_first=0
repeat_pict=0
[/FRAME]
[FRAME]
media_type=video
stream_index=0
key_frame=0
pkt_pts=1024
pkt_pts_time=0.066667
pkt_dts=1024
pkt_dts_time=0.066667
best_effort_timestamp=1024
best_effort_timestamp_time=0.066667
pkt_duration=512
pkt_duration_time=0.033333
pkt_pos=823989
pkt_size=40971
width=1920
height=1920 …Run Code Online (Sandbox Code Playgroud) 我有一个使用Java和cpp代码的android流媒体客户端应用程序.我想将我的应用程序移植到Roku.据我所知,Roku建议只使用BrightScript进行应用开发.
1)根据这个链接(Roku中的C/C++开发),可以使用marmalade用cpp编写游戏应用程序并为Roku编译.
2)但是这个链接(Roku应用程序与Marmalade一起开发的可行性如何?)清楚地说,橘子酱不能用于流应用程序.
3)我的问题是(A)是否可以为roku编译cpp?
(B)我在哪里可以找到用于建造的工具链?
(C)如果使用BrightScript开发UI,我该如何从中调用cpp函数?
我有一个简单的代码.
#define MY_STRING "String example"
char* string_return_function()
{
return MY_STRING;
}
Run Code Online (Sandbox Code Playgroud)
上面的代码有效,但我不知道如何.我认为string_return_function()返回一个本地地址,一旦该函数退出就会被释放.