ffmpeg在创建视频时挂起

时间:2011-02-25 05:50:43

标签: video encoding audio ffmpeg decoding

我正在尝试插入带有视频的音频频道:

  1. 首先,我从原始视频中提取音频进行处理:

    ffmpeg -i lotr.mp4 lotr.wav

  2. 然后我提取所有帧以供以后处理:

    ffmpeg -i lotr.mp4 -f image2 %d.jpg

  3. 处理完音频和视频流后,我尝试制作视频

    ffmpeg -f image2 -r 15 -i %d.jpg new.mp4

  4. 然后与音频合并:

    ffmpeg -i new.mp4 -i lotr.wav -map 0:0 -map 1:0 new_w_audio.mp4

  5. 结果:CPU活动= 100%,进程挂起且永不返回。 PS 我甚至尝试过它而不修改图像或音频(所以只是尝试解压然后重新打包视频)但仍然是相同的输出

    FFmpeg version SVN-r26400, Copyright (c) 2000-2011 the FFmpeg developers
      built on Jan 18 2011 04:07:05 with gcc 4.4.2
      configuration: --enable-gpl --enable-version3 --enable-libgsm --enable-libvorb
    is --enable-libtheora --enable-libspeex --enable-libmp3lame --enable-libopenjpeg
     --enable-libschroedinger --enable-libopencore_amrwb --enable-libopencore_amrnb
    --enable-libvpx --disable-decoder=libvpx --arch=x86 --enable-runtime-cpudetect -
    -enable-libxvid --enable-libx264 --enable-librtmp --extra-libs='-lrtmp -lpolarss
    l -lws2_32 -lwinmm' --target-os=mingw32 --enable-avisynth --enable-w32threads --
    cross-prefix=i686-mingw32- --cc='ccache i686-mingw32-gcc' --enable-memalign-hack
    
      libavutil     50.36. 0 / 50.36. 0
      libavcore      0.16. 1 /  0.16. 1
      libavcodec    52.108. 0 / 52.108. 0
      libavformat   52.93. 0 / 52.93. 0
      libavdevice   52. 2. 3 / 52. 2. 3
      libavfilter    1.74. 0 /  1.74. 0
      libswscale     0.12. 0 /  0.12. 0
    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'new.mp4':
      Metadata:
        major_brand     : isom
        minor_version   : 512
        compatible_brands: isomiso2mp41
        creation_time   : 1970-01-01 00:00:00
        encoder         : Lavf52.93.0
      Duration: 00:00:29.66, start: 0.000000, bitrate: 193 kb/s
        Stream #0.0(und): Video: mpeg4, yuv420p, 200x134 [PAR 1:1 DAR 100:67], 192 k
    b/s, 15 fps, 15 tbr, 15 tbn, 15 tbc
        Metadata:
          creation_time   : 1970-01-01 00:00:00
    [wav @ 01fed010] max_analyze_duration reached
    Input #1, wav, from 'lotr.wav':
      Duration: 00:00:29.90, bitrate: 176 kb/s
        Stream #1.0: Audio: pcm_s16le, 11025 Hz, 1 channels, s16, 176 kb/s
    File 'new_w_audio.mp4' already exists. Overwrite ? [y/N] y
    [buffer @ 01b03820] w:200 h:134 pixfmt:yuv420p
    Output #0, mp4, to 'new_w_audio.mp4':
      Metadata:
        major_brand     : isom
        minor_version   : 512
        compatible_brands: isomiso2mp41
        creation_time   : 1970-01-01 00:00:00
        encoder         : Lavf52.93.0
        Stream #0.0(und): Video: mpeg4, yuv420p, 200x134 [PAR 1:1 DAR 100:67], q=2-3
    1, 200 kb/s, 15 tbn, 15 tbc
        Metadata:
          creation_time   : 1970-01-01 00:00:00
        Stream #0.1: Audio: aac, 11025 Hz, 1 channels, s16, 64 kb/s
    Stream mapping:
      Stream #0.0 -> #0.0
      Stream #1.0 -> #0.1
    Press [q] to stop encoding
    

1 个答案:

答案 0 :(得分:0)

运气问题好吗?

听起来你的ffmpeg安装坏了,因为它挂起并耗费了太多的CPU。我建议完全删除它并重新开始。

祝你好运。

克里斯。