使用ffmpeg命令录制文件时报错,谁能解释下原因

perl 发布于 2012/08/13 15:33
阅读 5K+
收藏 0
[root@localhost /]# ffmpeg -i rtsp://192.168.230.206/h264 -t 60 -vcodec copy -acodec copy flv.flv
ffmpeg version 0.9, Copyright (c) 2000-2011 the FFmpeg developers
  built on Dec 31 2011 10:46:48 with gcc 3.4.6 20060404 (Red Hat 3.4.6-11)
  configuration: --enable-shared --prefix=/usr/local/ffmpeg
  libavutil    51. 32. 0 / 51. 32. 0
  libavcodec   53. 42. 0 / 53. 42. 0
  libavformat  53. 24. 0 / 53. 24. 0
  libavdevice  53.  4. 0 / 53.  4. 0
  libavfilter   2. 53. 0 /  2. 53. 0
  libswscale    2.  1. 0 /  2.  1. 0
[NULL @ 0x9f9bcc0] Interleaved RTP mode is not supported yet.insane cropping not completely supported, this could look slightly wrong ... (left: 0, top: 4)
[h264 @ 0x9f9bcc0] insane cropping not completely supported, this could look slightly wrong ... (left: 0, top: 4)
[h264 @ 0x9f9bcc0] Missing reference picture
[h264 @ 0x9f9bcc0] decode_slice_header error
[h264 @ 0x9f9bcc0] concealing 1900 DC, 1900 AC, 1900 MV errors
[h264 @ 0x9f9bcc0] mmco: unref short failure
[rtsp @ 0x9f93aa0] Estimating duration from bitrate, this may be inaccurate
Input #0, rtsp, from 'rtsp://192.168.230.206/h264':
  Metadata:
    title           : Session streamed by "nessyMediaServer"
    comment         : h264
  Duration: N/A, start: 0.000144, bitrate: N/A
    Stream #0:0: Video: h264 (Main), yuv420p, 800x608 [SAR 4:3 DAR 100:57], 25 fps, 25 tbr, 90k tbn, 50 tbc
    Stream #0:1: Audio: pcm_mulaw, 8000 Hz, 1 channels, s16, 64 kb/s
[NULL @ 0x9f8f1e0] codec not compatible with flv
Output #0, flv, to 'flv.flv':
  Metadata:
    title           : Session streamed by "nessyMediaServer"
    comment         : h264
    encoder         : Lavf53.24.0
    Stream #0:0: Video: h264 ([7][0][0][0] / 0x0007), yuv420p, 800x608 [SAR 4:3 DAR 100:57], q=2-31, 25 fps, 1k tbn, 90k tbc
    Stream #0:1: Audio: pcm_mulaw, 8000 Hz, 1 channels, 64 kb/s
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
  Stream #0:1 -> #0:1 (copy)
Could not write header for output file #0 (incorrect codec parameters ?)

加载中
0
p
perl
这个问题应该是PCM的问题,如果只做视频部分ffmpeg -i test.h264 -vcodec copy -an flv.flv 就不会出现问题。但为什么加上音频会出现问题呢?哪位老大指点?
0
k
kitter123321

Audio: pcm_mulaw, 8000 Hz, 1 channels, 这个flv不支持,所以失败。

acodec 转换成aac或者其他flv支持的

返回顶部
顶部