Closed Pony23333 closed 1 year ago
你好问题有解决吗
-t 是标记解码格式,-t 8 是 jpeg 可以用 -n -1 来循环解码
@.***:/home/code/mpp/build_mpp/test# ./mpi_dec_test -i /home/big_buck_bunny_480p.mp4 -t 8 -w 640 -h 480 -n -1 mpp[32172]: mpi_dec_utils: infinite loop decoding mode mpp[32172]: mpi_dec_utils: cmd parse result: mpp[32172]: mpi_dec_utils: input file name: /home/big_buck_bunny_480p.mp4 mpp[32172]: mpi_dec_utils: output file name: mpp[32172]: mpi_dec_utils: config file name: mpp[32172]: mpi_dec_utils: width : 640 mpp[32172]: mpi_dec_utils: height : 480 mpp[32172]: mpi_dec_utils: type : 8 mpp[32172]: mpi_dec_utils: debug flag : 0 mpp[32172]: mpi_dec_utils: max frames : -1 mpp[32172]: mpi_dec_test: mpi_dec_test start mpp[32172]: mpi_dec_test: input file size 3992327 mpp[32172]: mpp_rt: NOT found ion allocator mpp[32172]: mpp_rt: found drm allocator mpp[32172]: mpp_info: mpp version: 4e240f0 author: Yandong Lin 2021-02-17 [m2vd_parser]: Fix the frame be output repeatly issue mpp[32172]: mpi_dec_test: 0x8162aac0 mpi_dec_test decoder test start w 640 h 480 type 8 mpp[32172]: mpp_dec: mpp_dec_advanced_thread something wrong with mpp_parser_parse! mpp[32172]: mpi_dec_test: 0x8162aac0 decoded frame 0 mpp[32172]: mpi_dec_test: 0x8162aac0 input 0 pkt output 0 frm decode 0 frames mpp[32172]: mpi_dec_test: test success max memory 0.00 MB
你好,目前测试输出如下,我不确认是不是我编译的问题。我用的gcc-8.4
------------------ 原始邮件 ------------------ 发件人: "Herman @.>; 发送时间: 2021年4月1日(星期四) 上午9:20 收件人: @.>; 抄送: @.>; @.>; 主题: Re: [rockchip-linux/mpp] mpi_dec_test解码mjpeg视频文件只能解码一帧 (#170)
-t 是标记解码格式,-t 8 是 jpeg 可以用 -n -1 来循环解码
— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.
@.:/home/code/mpp/build_mpp/test# ./mpi_dec_test -i /home/big_buck_bunny_480p.mp4 -t 8 -w 640 -h 480 -n -1 mpp[32172]: mpi_dec_utils: infinite loop decoding mode mpp[32172]: mpi_dec_utils: cmd parse result: mpp[32172]: mpi_dec_utils: input file name: /home/big_buck_bunny_480p.mp4 mpp[32172]: mpi_dec_utils: output file name: mpp[32172]: mpi_dec_utils: config file name: mpp[32172]: mpi_dec_utils: width : 640 mpp[32172]: mpi_dec_utils: height : 480 mpp[32172]: mpi_dec_utils: type : 8 mpp[32172]: mpi_dec_utils: debug flag : 0 mpp[32172]: mpi_dec_utils: max frames : -1 mpp[32172]: mpi_dec_test: mpi_dec_test start mpp[32172]: mpi_dec_test: input file size 3992327 mpp[32172]: mpp_rt: NOT found ion allocator mpp[32172]: mpp_rt: found drm allocator mpp[32172]: mpp_info: mpp version: 4e240f0 author: Yandong Lin 2021-02-17 [m2vd_parser]: Fix the frame be output repeatly issue mpp[32172]: mpi_dec_test: 0x8162aac0 mpi_dec_test decoder test start w 640 h 480 type 8 mpp[32172]: mpp_dec: mpp_dec_advanced_thread something wrong with mpp_parser_parse! mpp[32172]: mpi_dec_test: 0x8162aac0 decoded frame 0 mpp[32172]: mpi_dec_test: 0x8162aac0 input 0 pkt output 0 frm decode 0 frames mpp[32172]: mpi_dec_test: test success max memory 0.00 MB 你好,目前测试输出如下,我不确认是不是我编译的问题。我用的gcc-8.4 … ------------------ 原始邮件 ------------------ 发件人: "Herman @.>; 发送时间: 2021年4月1日(星期四) 上午9:20 收件人: @.>; 抄送: @.>; @.***>; 主题: Re: [rockchip-linux/mpp] mpi_dec_test解码mjpeg视频文件只能解码一帧 (#170) -t 是标记解码格式,-t 8 是 jpeg 可以用 -n -1 来循环解码 — You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.
问题已解决
了解,问题解决麻烦关闭问题
-n 参数加了确实会多解帧数,但是都试解得同一张图,mjpeg是连续的应该,但是mpi_dec_test 只解第一帧,解-n次~~~~
是demo有问题是吗?
jpeg 正常来说就只有一帧……因为 jpeg 文件没有 264/265 那种有的分隔符,可以知道一帧码流有多长,所以都是把整个文件当成一帧数据给送进去,只是 demo 这么写好写,没做得太复杂
平台:Toybrick3399proX 系统:debian10
问题:mpi_dec_test解码mjpeg视频文件只能解码一帧。代码里面有对mjeg格式的设置,
// NOTE: for mjpeg decoding send the whole file if (type == MPP_VIDEO_CodingMJPEG) { packet_size = file_size; }
不是很理解为什么要将advanced_decode模式下的pkt_size设置成整个文件的大小,这样的化在下面的代码中直接将整个文件放入了packet中。 ' static int decode_advanced(MpiDecLoopData data) { RK_U32 pkt_eos = 0; MPP_RET ret = MPP_OK; MppCtx ctx = data->ctx; MppApi mpi = data->mpi; char *buf = data->buf; MppPacket packet = data->packet; MppFrame frame = data->frame; MppTask task = NULL; size_t read_size = fread(buf, 1, data->packet_size, data->fp_input);' 这样的化就有以下问题:
所以,mpi_dec_test这个程序在设置的时候,-t 8 对应的就只是解码jpg文件吗?