gpt4 book ai didi

ffmpeg - ffprobe 返回 mov,mp4,m4a,3gp,3g2,mj2

转载 作者:行者123 更新时间:2023-12-04 22:56:07 26 4
gpt4 key购买 nike

我试图找到一种方法来了解给定文件是否使用 h.264 编解码器并且它是可流式传输的。

我正在使用 ffprobe,有时我会得到如下输出:

{
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'file.mp4':
Metadata:
major_brand : mp42
minor_version : 512
compatible_brands: isomiso2avc1mp41
creation_time : 2036-02-06 06:28:16
encoder : HandBrake 0.10.2 2015060900
Duration: 00:06:42.13, start: 0.000000, bitrate: 950 kb/s
Stream #0:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p(tv, smpte170m/smpte170m/bt709), 640x480 [SAR 1:1 DAR 4:3], 788 kb/s, 30 fps, 30 tbr, 90k tbn, 180k tbc (default)
Metadata:
creation_time : 2036-02-06 06:28:16
handler_name : VideoHandler
Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 155 kb/s (default)
Metadata:
creation_time : 2036-02-06 06:28:16
handler_name : Stereo
"format": {
"filename": "file.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": "402.134000",
"size": "47787790",
"bit_rate": "950683",
"probe_score": 100,
"tags": {
"major_brand": "mp42",
"minor_version": "512",
"compatible_brands": "isomiso2avc1mp41",
"creation_time": "2036-02-06 06:28:16",
"encoder": "HandBrake 0.10.2 2015060900"
}
}
}

现在,该文件似乎是可流式传输的,可以在线发布,但我期待的是这样的:
    "format_name": "h.264",

相反,我得到
    "format_name": "mov,mp4,m4a,3gp,3g2,mj2",

就指定这个文件到底是什么而言,这似乎非常松懈。
我也在使用 MP4Box 来查看视频是否可流式传输,但此时我不确定如何处理特定的 h.264 识别。

我应该怎么做才能确保给定文件具有 h.264 编解码器?

谢谢

最佳答案

原来这是我的错误:)

这是正确的命令

/opt/ffmpeg/ffprobe file.mp4 -show_streams  -select_streams v  -print_format json

这反过来又给出了:
{
"streams": [
{
"index": 0,
"codec_name": "h264",
"codec_long_name": "H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10",
"profile": "Main",
"codec_type": "video",
"codec_time_base": "1/180000",
"codec_tag_string": "avc1",
"codec_tag": "0x31637661",
"width": 640,
"height": 480,
"has_b_frames": 2,
"sample_aspect_ratio": "1:1",
"display_aspect_ratio": "4:3",
"pix_fmt": "yuv420p",
"level": 40,
"color_range": "tv",
"color_space": "smpte170m",
"color_transfer": "bt709",
"color_primaries": "smpte170m",
"chroma_location": "left",
"refs": 4,
"is_avc": "1",
"nal_length_size": "4",
"r_frame_rate": "30/1",
"avg_frame_rate": "90465/3016",
"time_base": "1/90000",
"start_pts": 0,
"start_time": "0.000000",
"duration_ts": 36192000,
"duration": "402.133333",
"bit_rate": "788651",
"bits_per_raw_sample": "8",
"nb_frames": "12062",
"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
},
"tags": {
"creation_time": "2036-02-06 06:28:16",
"language": "und",
"handler_name": "VideoHandler"
}
}
]
}

关于ffmpeg - ffprobe 返回 mov,mp4,m4a,3gp,3g2,mj2,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33218900/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com