ffprobe -v quiet -print_format json -show_format -show_streams 1.mp4
{ "streams": [ { "index": 0, "codec_name": "aac", "codec_long_name": "AAC (Advanced Audio Coding)", "profile": "LC", "codec_type": "audio", "codec_time_base": "1/44100", "codec_tag_string": "mp4a", "codec_tag": "0x6134706d", "sample_fmt": "fltp", "sample_rate": "44100", "channels": 2, "channel_layout": "stereo", "bits_per_sample": 0, "r_frame_rate": "0/0", "avg_frame_rate": "0/0", "time_base": "1/44100", "start_pts": 0, "start_time": "0.000000", "duration_ts": 8002562, "duration": "181.463991", "bit_rate": "48559", "max_bit_rate": "48559", "nb_frames": "7816", "disposition": { "default": 1, "dub": 0, "original": 0, "comment": 0, "lyrics": 0, "karaoke": 0, "forced": 0, "hearing_impaired": 0, "visual_impaired": 0, "clean_effects": 0, "attached_pic": 0, "timed_thumbnails": 0 }, "tags": { "language": "und", "handler_name": "SoundHandler" } }, { "index": 1, "codec_name": "h264", "codec_long_name": "H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10", "profile": "Main", "codec_type": "video", "codec_time_base": "27197/308700", "codec_tag_string": "avc1", "codec_tag": "0x31637661", "width": 720, "height": 960, "coded_width": 720, "coded_height": 960, "has_b_frames": 1, "pix_fmt": "yuvj420p", "level": 31, "color_range": "pc", "color_space": "smpte170m", "color_transfer": "bt709", "color_primaries": "smpte170m", "chroma_location": "left", "refs": 1, "is_avc": "true", "nal_length_size": "4", "r_frame_rate": "60/1", "avg_frame_rate": "154350/27197", "time_base": "1/618000", "start_pts": 0, "start_time": "0.000000", "duration_ts": 112052052, "duration": "181.314000", "bit_rate": "94498", "bits_per_raw_sample": "8", "nb_frames": "1029", "disposition": { "default": 1, "dub": 0, "original": 0, "comment": 0, "lyrics": 0, "karaoke": 0, "forced": 0, "hearing_impaired": 0, "visual_impaired": 0, "clean_effects": 0, "attached_pic": 0, "timed_thumbnails": 0 }, "tags": { "language": "und", "handler_name": "VideoHandler" } } ], "format": { "filename": "1.mp4", "nb_streams": 2, "nb_programs": 0, "format_name": "mov,mp4,m4a,3gp,3g2,mj2", "format_long_name": "QuickTime / MOV", "start_time": "0.000000", "duration": "181.488000", "size": "3303955", "bit_rate": "145638", "probe_score": 100, "tags": { "major_brand": "isom", "minor_version": "512", "compatible_brands": "isomiso2avc1mp41", "encoder": "Lavf57.58.101" } } }
static function filter_record_videos(&$record_videos) { if(count($record_videos)>0){ foreach ($record_videos as $k=>$record_video){ $shell_command = "ffprobe -v quiet -print_format json -show_format -show_streams $record_video"; $command_json = shell_exec($shell_command); $video_info = json_decode($command_json,true); if(isset($video_info['streams']) && count($video_info['streams']) == 1 && $video_info['streams'][0]['codec_type'] == 'audio'){ SimpleLog::GetInstance()->Error('video_have_voice_only:'.json_encode($record_video)); unset($record_videos[$k]); } } } }
© 版权声明
本站网络名称:
乐商网络
本站永久网址:
https://ishoud.com
网站侵权说明:
本网站的文章部分内容可能来源于网络,仅供大家学习与参考,如有侵权,请联系站长QQ810066660删除处理。
1 本站一切资源不代表本站立场,并不代表本站赞同其观点和对其真实性负责。
2 本站一律禁止以任何方式发布或转载任何违法的相关信息,访客发现请向站长举报
3 本站资源大多存储在云盘,如发现链接失效,请联系我们我们会第一时间更新。
1 本站一切资源不代表本站立场,并不代表本站赞同其观点和对其真实性负责。
2 本站一律禁止以任何方式发布或转载任何违法的相关信息,访客发现请向站长举报
3 本站资源大多存储在云盘,如发现链接失效,请联系我们我们会第一时间更新。
THE END
暂无评论内容