0

我正在尝试将webm文件转换为在 android 设备上avi使用。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), yuv420p(tv, smpte170m/unknown/unknown), 406x720 (0x0) [SAR 1:1 DAR 203:360], q=2-31, 30 fps, 30 tbr, 60 tbn, 60 tbc (default)
      Stream #0:1(eng): Audio: mp3 (libmp3lame) (U[0][0][0] / 0x0055), 48000 Hz, stereo, fltp, 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格式?

4

0 回答 0