gpt4 book ai didi

ffmpeg - 为输出流打开编码器时出错 #1 :2 - maybe incorrect parameters such as bit_rate, 速率、宽度或高度

转载 作者:行者123 更新时间:2023-12-04 23:13:16 28 4
gpt4 key购买 nike

我正在编码一个里面有 dvb_teletext 的视频。打开输出流 #1:2 的编码器时出现错误提示。我使用以下命令对我的视频进行编码。

ffmpeg -threads 8 -i input.ts -s 400x222 -qscale:v 4 -vcodec libx264 -s 320x240 -b:v 512000 -maxrate 512000 -acodec libfaac -b:a 32000 -ar 48000 -force_key_frames expr:gte(t,n_forced*3) -hls_flags single_file -hls_list_size 0 -hls_time 3 -y output.m3u8

您可以看到我的命令的日志输出。
Input #0, mpegts, from 'pipe:':
Duration: N/A, start: 91105.257722, bitrate: N/A
Program 1
Stream #0:0[0x4b1]: Video: h264 (High), 4 reference frames ([27][0][0][0] / 0x001B), yuv420p(tv, bt470bg), 704x576 [SAR 16:11 DAR 16:9], 25 fps, 25 tbr, 90k tbn, 50 tbc
Stream #0:1[0xc7d](swe): Audio: mp2 ([4][0][0][0] / 0x0004), 48000 Hz, stereo, s16p, 256 kb/s
Stream #0:2[0x1932](swe,nor,dan,fin,swe): Subtitle: dvb_teletext ([6][0][0][0] / 0x0006), 492x250
[Parsed_fps_0 @ 0x55975e31b7e0] fps=1/1
[graph 0 input from stream 0:0 @ 0x55975e1fb9c0] w:704 h:576 pixfmt:yuv420p tb:1/90000 fr:25/1 sar:16/11 sws_param:flags=2
[scaler for output stream 0:0 @ 0x55975e1f8fe0] w:400 h:222 flags:'bicubic' interl:0
[swscaler @ 0x55975e1a0c80] deprecated pixel format used, make sure you did set range correctly
[scaler for output stream 0:0 @ 0x55975e1f8fe0] w:704 h:576 fmt:yuv420p sar:16/11 -> w:400 h:222 fmt:yuvj420p sar:74/75 flags:0x4
[graph 1 input from stream 0:0 @ 0x55975e177120] w:704 h:576 pixfmt:yuv420p tb:1/90000 fr:25/1 sar:16/11 sws_param:flags=2
[scaler for output stream 1:0 @ 0x55975e1f1020] w:320 h:240 flags:'bicubic' interl:0
[scaler for output stream 1:0 @ 0x55975e1f1020] w:704 h:576 fmt:yuv420p sar:16/11 -> w:320 h:240 fmt:yuv420p sar:4/3 flags:0x4
[graph 2 input from stream 0:1 @ 0x55975e532f20] tb:1/48000 samplefmt:s16p samplerate:48000 chlayout:0x3
[audio format for output stream 1:1 @ 0x55975e533540] auto-inserting filter 'auto-inserted resampler 0' between the filter 'Parsed_anull_0' and the filter 'audio format for output stream 1:1'
[auto-inserted resampler 0 @ 0x55975e5358e0] ch:2 chl:stereo fmt:s16p r:48000Hz -> ch:2 chl:stereo fmt:s16 r:48000Hz
[libx264 @ 0x55975e2349a0] VBV maxrate specified, but no bufsize, ignored
[libx264 @ 0x55975e2349a0] using SAR=4/3
[libx264 @ 0x55975e2349a0] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 AVX2 LZCNT BMI2
[libx264 @ 0x55975e2349a0] profile High, level 2.0
Output #0, hls, to 'output.m3u8':
Stream #1:0: Video: h264 (libx264), -1 reference frame, yuv420p, 320x240 [SAR 4:3 DAR 16:9], q=-1--1, 512 kb/s, 25 fps, 25 tbn, 25 tbc
Metadata:
encoder : Lavc57.24.102 libx264
Side data:
unknown side data type 10 (24 bytes)
Stream #1:1(swe): Audio: aac (libfaac), 48000 Hz, stereo, s16, 32 kb/s
Metadata:
encoder : Lavc57.24.102 libfaac
Stream #1:2(swe,nor,dan,fin,swe): Subtitle: webvtt, 128 kb/s
Metadata:
encoder : Lavc57.24.102 webvtt
Stream mapping:
Stream #0:0 -> #0:0 (h264 (native) -> mjpeg (native))
Stream #0:0 -> #1:0 (h264 (native) -> h264 (libx264))
Stream #0:1 -> #1:1 (mp2 (native) -> aac (libfaac))
Stream #0:2 -> #1:2 (dvb_teletext (libzvbi_teletextdec) -> webvtt (native))
Error while opening encoder for output stream #1:2 - maybe incorrect parameters such as bit_rate, rate, width or height
[Parsed_fps_0 @ 0x55975e31b7e0] 0 frames in, 0 frames out; 0 frames dropped, 0 frames duplicated.
[libx264 @ 0x55975e2349a0] final ratefactor: 23.40
(END)

我需要在这里使用 map 选项吗?如何解决这个问题?有什么帮助或建议吗?

最佳答案

我已经解决了我的问题,我不想在我的编码视频中编码字幕,所以我只需添加选项 -sn -ignore_unknown -dn。这解决了我的问题。所以命令如下所示。

ffmpeg -threads 8 -i input.ts -s 400x222 -qscale:v 4 -vcodec libx264 -s 320x240 -b:v 512000 -maxrate 512000 -acodec libfaac -b:a 32000 -ar 48000 -force_key_frames expr:gte(t,n_forced*3) -hls_flags single_file -hls_list_size 0 -hls_time 3 -sn -ignore_unknown -dn -y output.m3u8

关于ffmpeg - 为输出流打开编码器时出错 #1 :2 - maybe incorrect parameters such as bit_rate, 速率、宽度或高度,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58852481/

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