我的 .ts 文件如下所示
Input #0, mpegts, from 'i.ts':
Duration: 00:00:36.32, start: 28752.398067, bitrate: 57694 kb/s
Program 50
Metadata:
service_name : aaa HD
service_provider:
Stream #0:51[0x1f5]: Video: h264 ([27][0][0][0] / 0x001B), none, 90k tbr, 90k tbn, 180k tbc
Stream #0:52[0x1f6]: Audio: mp3 ([3][0][0][0] / 0x0003), 0 channels, fltp
Program 51
Metadata:
service_name : b Music HD
service_provider:
Stream #0:16[0x1ff]: Video: h264 ([27][0][0][0] / 0x001B), none, 90k tbr, 90k tbn, 180k tbc
Stream #0:17[0x200]: Audio: mp3 ([3][0][0][0] / 0x0003), 0 channels, fltp
Program 52
Metadata:
service_name : c ch HD
service_provider:
Stream #0:14[0x209]: Video: h264 ([27][0][0][0] / 0x001B), none, 90k tbr, 90k tbn, 180k tbc
Stream #0:15[0x20a]: Audio: mp3 ([3][0][0][0] / 0x0003), 0 channels, fltp
Program 1510
Metadata:
service_name : asd
service_provider: xyz
Stream #0:18[0x5e7]: Video: h264 ([27][0][0][0] / 0x001B), none, 90k tbr, 90k tbn, 180k tbc
Stream #0:19[0x5e8]: Audio: mp3 ([3][0][0][0] / 0x0003), 0 channels, fltp
我需要从这个文件中提取一个视频流及其音频流,例如与我试过的程序 50 相关
ffmpeg -i i.ts -map 0:51 output.mp4
但我收到了这个错误
Stream mapping:
Stream #0:51 -> #0:0 (h264 (native) -> h264 (libx264))
Press [q] to stop, [?] for help
Cannot determine format of input stream 0:51 after EOF
Error marking filters as finished
Conversion failed!