微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

FFMPEG - WEBM 到 AVI 的转换失败

如何解决FFMPEG - WEBM 到 AVI 的转换失败

我正在尝试在 Android 设备上使用 webmavi 文件转换mobile-ffmpeg。为此,我使用了以下命令:

-hide_banner -i /storage/emulated/0/Download/input.webm -vcodec copy -acodec mp3 -async 1 /storage/emulated/0/converted/output.avi 

上述命令适用于大多数文件。但是它无法转换某些文件

这是命令日志:

    Input #0,matroska,webm,from '/storage/emulated/0/Download/input.webm':
    Metadata:
      ENCODER         : Lavf56.40.101
    Duration: N/A,start: -0.007000,bitrate: N/A
      Stream #0:0(eng): Video: vp9,1 reference frame,yuv420p(tv,smpte170m/unkNown/unkNown),406x720,SAR 1:1 DAR 203:360,30 fps,30 tbr,1k tbn,1k tbc (default)
      Stream #0:1(eng): Audio: opus,48000 Hz,stereo,fltp,delay 312 (default)
  Matched encoder 'libmp3lame' for codec 'mp3'.
  Stream mapping:
    Stream #0:0 -> #0:0 (copy)
    Stream #0:1 -> #0:1 (opus (native) -> mp3 (libmp3lame))
  Press [q] to stop,[?] for help
  [graph_0_in_0_1 @ 0xbf27ca40] tb:1/48000 samplefmt:fltp samplerate:48000 chlayout:0x3
  -async is forwarded to lavfi similarly to -af aresample=async=1:min_hard_comp=0.100000:first_pts=0.
  [graph_0_aresample_in_0_1 @ 0xbf27caa0] ch:2 chl:stereo fmt:fltp r:48000Hz -> ch:2 chl:stereo fmt:fltp r:48000Hz
  [graph_0_aresample_in_0_1 @ 0xbf27caa0] [SWR @ 0xaf1c6000] adding 336 audio samples of silence
  Output #0,avi,to '/storage/emulated/0/converted/output.avi':
    Metadata:
      ISFT            : Lavf58.48.100
      Stream #0:0(eng): Video: vp9,1 reference frame (VP90 / 0x30395056),406x720 (0x0) [SAR 1:1 DAR 203:360],q=2-31,60 tbn,60 tbc (default)
      Stream #0:1(eng): Audio: mp3 (libmp3lame) (U[0][0][0] / 0x0055),delay 1105 (default)
      Metadata:
        LANGUAGE        : eng
        encoder         : Lavc58.96.100 libmp3lame
  [avi @ 0xc29c0a00] Application provided invalid,non monotonically increasing dts to muxer in stream 0: 2 >= 2
  av_interleaved_write_frame(): Invalid argument
  No more output streams to write to,finishing.
  frame=    3 fps=0.0 q=-1.0 Lsize=      19kB time=00:00:00.05 bitrate=3070.1kbits/s speed=0.159x    
  video:10kB audio:1kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 79.612465%
  Input file #0 (/storage/emulated/0/Download/input.webm):
    Input stream #0:0 (video): 3 packets read (9915 bytes); 
    Input stream #0:1 (audio): 2 packets read (6 bytes); 2 frames decoded (1608 samples); 
    Total: 5 packets (9921 bytes) demuxed
  Output file #0 (/storage/emulated/0/converted/output.avi):
    Output stream #0:0 (video): 3 packets muxed (9915 bytes); 
    Output stream #0:1 (audio): 1 frames encoded (1152 samples); 2 packets muxed (768 bytes); 
    Total: 5 packets (10683 bytes) muxed
  [AVIOContext @ 0xc2838a40] Statistics: 1 seeks,1 writeouts
  [AVIOContext @ 0xc2838800] Statistics: 32768 bytes read,0 seeks
  Conversion Failed!

我认为该文件的负开始时间导致了问题。如何将这种 webm 文件转换avi 格式?

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。