ffmpeg实现web上视频转码为mp4格式用video标签却无法播放

1.问题描述:调用ffmpeg将avi格式视频转码->mp4格式,使用最简单的标签进行播放只能播放声音,没有画面(黑屏)。而暴风影音等本地视频播放软件却能够正常播放转码后的视频。
2.环境:SSH框架准备实现视频上传后的自动转码并且能够网页内播放,火狐浏览器。
3.已知mp4格式分为两种,其中H264类型才能进行html播放,但按照转码命令说已经转码成:视频H264、音频aac格式了,但是仍然是黑屏(有声音)。
4.未知:(1)转码时显示的相关命令行具体意义。(2)网上所说用格式工厂进行转码即可,有没有能够通过代码调用的视频转码方法予以解决呢?
5.以下为问题截图:

(1)视频转码Java代码:

        List<String> convert = new ArrayList<String>();
        convert.add(ffmpegPath); // 添加转换工具路径
        convert.add("-i"); // 添加参数"-i",该参数指定要转换的文件
        convert.add(sourceVideoPath); // 添加要转换格式的视频文件的路径

        convert.add("-acodec"); 
        convert.add("aac");
        convert.add("-vcodec");
        convert.add("libx264");       
        convert.add("-y");       
        convert.add(targetFolder+fileRealNameNoExtension+targetExtension);

(2)转码时的输出:

ffmpeg version N-93678-g4b7166c9d5 Copyright (c) 2000-2019 the FFmpeg developers
  built with gcc 8.3.1 (GCC) 20190414
  configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libdav1d --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx --enable-amf --enable-ffnvcodec --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth --enable-libopenmpt
  libavutil      56. 26.100 / 56. 26.100
  libavcodec     58. 52.100 / 58. 52.100
  libavformat    58. 27.103 / 58. 27.103
  libavdevice    58.  7.100 / 58.  7.100
  libavfilter     7. 50.100 /  7. 50.100
  libswscale      5.  4.100 /  5.  4.100
  libswresample   3.  4.100 /  3.  4.100
  libpostproc    55.  4.100 / 55.  4.100
Input #0, avi, from 'E:\Test\projectVideos\temp\1557994804863.avi':
  Metadata:
    genre           : Other
    track           : 1
    encoder         : Lavf54.63.104
  Duration: 00:00:16.80, start: 0.000000, bitrate: 2286 kb/s
    Stream #0:0: Video: h264 (Main) (H264 / 0x34363248), yuv420p(progressive), 1920x1080 [SAR 1:1 DAR 16:9], 2151 kb/s, 25 fps, 25 tbr, 25 tbn, 50 tbc
    Stream #0:1: Audio: mp3 (U[0][0][0] / 0x0055), 44100 Hz, mono, fltp, 128 kb/s
Stream mapping:
  Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
  Stream #0:1 -> #0:1 (mp3 (mp3float) -> aac (native))
Press [q] to stop, [?] for help
[libx264 @ 0000000002ebf4c0] using SAR=1/1
[libx264 @ 0000000002ebf4c0] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX
[libx264 @ 0000000002ebf4c0] profile Progressive High, level 4.0, 4:2:0, 8-bit
[libx264 @ 0000000002ebf4c0] 264 - core 157 r2970 5493be8 - H.264/MPEG-4 AVC codec - Copyleft 2003-2019 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=6 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
Output #0, mp4, to 'E:\Test\projectVideos\encvideos\1557994804863.mp4':
  Metadata:
    genre           : Other
    track           : 1
    encoder         : Lavf58.27.103
    Stream #0:0: Video: h264 (libx264) (avc1 / 0x31637661), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], q=-1--1, 25 fps, 12800 tbn, 25 tbc
    Metadata:
      encoder         : Lavc58.52.100 libx264
    Side data:
      cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
    Stream #0:1: Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, mono, fltp, 69 kb/s
    Metadata:
      encoder         : Lavc58.52.100 aac
frame=    1 fps=0.0 q=0.0 size=       0kB time=00:00:00.06 bitrate=   5.5kbits/s speed=0.138x    
frame=   46 fps= 23 q=0.0 size=       0kB time=00:00:01.88 bitrate=   0.2kbits/s speed=0.936x    
frame=   64 fps= 25 q=28.0 size=       0kB time=00:00:02.57 bitrate=   0.1kbits/s speed=1.02x    
frame=   88 fps= 29 q=28.0 size=       0kB time=00:00:03.55 bitrate=   0.1kbits/s speed=1.17x    
frame=  108 fps= 31 q=28.0 size=       0kB time=00:00:04.34 bitrate=   0.1kbits/s speed=1.23x    
frame=  133 fps= 33 q=28.0 size=       0kB time=00:00:05.34 bitrate=   0.1kbits/s speed=1.32x    
frame=  155 fps= 34 q=28.0 size=       0kB time=00:00:06.22 bitrate=   0.1kbits/s speed=1.35x    
frame=  171 fps= 33 q=28.0 size=       0kB time=00:00:06.87 bitrate=   0.1kbits/s speed=1.33x    
frame=  186 fps= 33 q=28.0 size=       0kB time=00:00:07.47 bitrate=   0.1kbits/s speed=1.32x    
frame=  195 fps= 31 q=28.0 size=       0kB time=00:00:07.82 bitrate=   0.0kbits/s speed=1.25x    
frame=  206 fps= 30 q=28.0 size=       0kB time=00:00:08.26 bitrate=   0.0kbits/s speed=1.22x    
frame=  214 fps= 29 q=28.0 size=       0kB time=00:00:08.59 bitrate=   0.0kbits/s speed=1.17x    
frame=  223 fps= 28 q=28.0 size=       0kB time=00:00:08.96 bitrate=   0.0kbits/s speed=1.14x    
frame=  229 fps= 27 q=28.0 size=       0kB time=00:00:09.19 bitrate=   0.0kbits/s speed=1.09x    
frame=  232 fps= 25 q=28.0 size=       0kB time=00:00:09.28 bitrate=   0.0kbits/s speed=1.01x    
frame=  235 fps= 24 q=28.0 size=     256kB time=00:00:09.42 bitrate= 222.5kbits/s speed=0.965x    
frame=  240 fps= 23 q=28.0 size=     256kB time=00:00:09.63 bitrate= 217.7kbits/s speed=0.928x    
frame=  243 fps= 22 q=28.0 size=     256kB time=00:00:09.72 bitrate= 215.6kbits/s speed=0.894x    
frame=  247 fps= 21 q=28.0 size=     256kB time=00:00:09.89 bitrate= 212.1kbits/s speed=0.856x    
frame=  253 fps= 21 q=28.0 size=     512kB time=00:00:10.12 bitrate= 414.3kbits/s speed=0.832x    
frame=  258 fps= 20 q=28.0 size=     512kB time=00:00:10.33 bitrate= 406.0kbits/s speed=0.812x    
frame=  264 fps= 20 q=28.0 size=     512kB time=00:00:10.56 bitrate= 397.0kbits/s speed=0.791x    
frame=  268 fps= 19 q=28.0 size=     768kB time=00:00:10.72 bitrate= 586.5kbits/s speed=0.773x    
frame=  272 fps= 19 q=28.0 size=     768kB time=00:00:10.91 bitrate= 576.5kbits/s speed=0.753x    
frame=  278 fps= 19 q=28.0 size=     768kB time=00:00:11.14 bitrate= 564.5kbits/s speed=0.743x    
frame=  281 fps= 18 q=28.0 size=     768kB time=00:00:11.26 bitrate= 558.7kbits/s speed=0.725x    
frame=  286 fps= 18 q=28.0 size=    1024kB time=00:00:11.47 bitrate= 731.3kbits/s speed=0.715x    
frame=  291 fps= 17 q=28.0 size=    1024kB time=00:00:11.67 bitrate= 718.3kbits/s speed=0.701x    
frame=  296 fps= 17 q=25.0 size=    1024kB time=00:00:11.86 bitrate= 707.0kbits/s speed=0.687x    
frame=  303 fps= 17 q=28.0 size=    1280kB time=00:00:12.14 bitrate= 863.5kbits/s speed=0.681x    
frame=  308 fps= 17 q=28.0 size=    1280kB time=00:00:12.35 bitrate= 848.9kbits/s speed=0.67x    
frame=  312 fps= 16 q=28.0 size=    1280kB time=00:00:12.51 bitrate= 837.8kbits/s speed=0.661x    
frame=  319 fps= 16 q=28.0 size=    1280kB time=00:00:12.79 bitrate= 819.6kbits/s speed=0.658x    
frame=  341 fps= 17 q=28.0 size=    1280kB time=00:00:13.65 bitrate= 768.0kbits/s speed=0.684x    
frame=  362 fps= 18 q=28.0 size=    1280kB time=00:00:14.48 bitrate= 723.7kbits/s speed=0.708x    
frame=  391 fps= 19 q=28.0 size=    1280kB time=00:00:15.67 bitrate= 669.0kbits/s speed=0.746x    
frame=  419 fps= 19 q=28.0 size=    1280kB time=00:00:16.67 bitrate= 629.0kbits/s speed=0.774x    
frame=  419 fps= 19 q=-1.0 Lsize=    1538kB time=00:00:16.71 bitrate= 753.7kbits/s speed=0.753x    
video:1480kB audio:43kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.976535%
[libx264 @ 0000000002ebf4c0] frame I:2     Avg QP:13.37  size: 32816
[libx264 @ 0000000002ebf4c0] frame P:143   Avg QP:14.70  size:  6977
[libx264 @ 0000000002ebf4c0] frame B:274   Avg QP:13.65  size:  1647
[libx264 @ 0000000002ebf4c0] consecutive B-frames:  9.8%  7.6%  4.3% 78.3%
[libx264 @ 0000000002ebf4c0] mb I  I16..4: 38.7% 53.1%  8.1%
[libx264 @ 0000000002ebf4c0] mb P  I16..4: 17.5% 18.5%  0.2%  P16..4:  5.5%  0.4%  0.2%  0.0%  0.0%    skip:57.7%
[libx264 @ 0000000002ebf4c0] mb B  I16..4:  2.0%  0.7%  0.0%  B16..8:  3.7%  0.2%  0.0%  direct: 2.9%  skip:90.5%  L0:49.2% L1:48.4% BI: 2.4%
[libx264 @ 0000000002ebf4c0] 8x8 transform intra:48.1% inter:84.8%
[libx264 @ 0000000002ebf4c0] coded y,uvDC,uvAC intra: 3.9% 31.3% 4.5% inter: 0.7% 5.4% 0.2%
[libx264 @ 0000000002ebf4c0] i16 v,h,dc,p: 22% 68%  4%  6%
[libx264 @ 0000000002ebf4c0] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 29% 27% 42%  0%  0%  0%  0%  0%  0%
[libx264 @ 0000000002ebf4c0] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 31% 28% 24%  2%  4%  3%  4%  2%  3%
[libx264 @ 0000000002ebf4c0] i8c dc,h,v,p: 48% 39% 11%  2%
[libx264 @ 0000000002ebf4c0] Weighted P-Frames: Y:23.1% UV:22.4%
[libx264 @ 0000000002ebf4c0] ref P L0: 65.5%  9.2% 23.1%  1.9%  0.3%
[libx264 @ 0000000002ebf4c0] ref B L0: 71.1% 28.4%  0.5%
[libx264 @ 0000000002ebf4c0] ref B L1: 98.8%  1.2%
[libx264 @ 0000000002ebf4c0] kb/s:723.03
[aac @ 0000000002dc0980] Qavg: 47784.133
生成mp4视频为:E:\Test\projectVideos\temp\1557994804863.mp4

(3)播放时的截图
图片说明

(4) 播放视频jsp代码(使用的是video-js,但测试时也试了一下不加视频插件直接标签播放,结果一样)

<video id="playVideo"  class="video-js vjs-default-skin" controls ="true" preload="auto"  width="960" height="480"
                            poster="/images/${VIDEO.vpicture}" data-setup='{}'>
                                 <source src="/videos/${VIDEO.vpath}" type='video/mp4' />

    </video>

("/videos"为虚拟路径 实为本地存储地址)

希望好心人能够予以慷慨解答!~

补充:在转wmv格式到MP4格式时出现了

ConverVideoTest说:传入工具类的源视频为:E:\Test\projectVideos\temp\1558578421815.wmv
----接收到文件(E:\Test\projectVideos\temp\1558578421815.wmv)需要转换-------
----开始转文件(E:\Test\projectVideos\temp\1558578421815.wmv)-------------------------- 
源视频类型为:wmv
可以转换,统一转为mp4文件
调用了ffmpeg.exe工具
该文件夹存在。
ffmpeg输入的命令:E:\ffmpeg\bin\ffmpeg.exe-iE:\Test\projectVideos\temp\1558578421815.wmv-acodecaac-vcodeclibx264-yE:\Test\projectVideos\encvideos\1558578421815.mp4
ffmpeg version N-93678-g4b7166c9d5 Copyright (c) 2000-2019 the FFmpeg developers
  built with gcc 8.3.1 (GCC) 20190414
  configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libdav1d --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx --enable-amf --enable-ffnvcodec --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth --enable-libopenmpt
  libavutil      56. 26.100 / 56. 26.100
  libavcodec     58. 52.100 / 58. 52.100
  libavformat    58. 27.103 / 58. 27.103
  libavdevice    58.  7.100 / 58.  7.100
  libavfilter     7. 50.100 /  7. 50.100
  libswscale      5.  4.100 /  5.  4.100
  libswresample   3.  4.100 /  3.  4.100
  libpostproc    55.  4.100 / 55.  4.100
Input #0, asf, from 'E:\Test\projectVideos\temp\1558578421815.wmv':
  Metadata:
    DeviceConformanceTemplate: M1
    WMFSDKNeeded    : 0.0.0.0000
    WM/WMADRCPeakReference: 7851
    WM/WMADRCPeakTarget: 7851
    WM/WMADRCAverageReference: 1027
    WM/WMADRCAverageTarget: 1027
    WMFSDKVersion   : 12.0.7601.17514
    IsVBR           : 0
  Duration: 00:00:16.58, bitrate: 1969 kb/s
    Stream #0:0(chi): Audio: wmapro (b[1][0][0] / 0x0162), 48000 Hz, stereo, fltp, 256 kb/s
    Stream #0:1(chi): Video: vc1 (Advanced) (WVC1 / 0x31435657), yuv420p, 1352x696 [SAR 1:1 DAR 169:87], 3400 kb/s, 30 tbr, 1k tbn, 60 tbc
Stream mapping:
  Stream #0:1 -> #0:0 (vc1 (native) -> h264 (libx264))
  Stream #0:0 -> #0:1 (wmapro (native) -> aac (native))
Press [q] to stop, [?] for help
[libx264 @ 0000000000531c80] using SAR=1/1
[libx264 @ 0000000000531c80] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX
[libx264 @ 0000000000531c80] profile Progressive High, level 3.2, 4:2:0, 8-bit
[libx264 @ 0000000000531c80] 264 - core 157 r2970 5493be8 - H.264/MPEG-4 AVC codec - Copyleft 2003-2019 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=6 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
frame=   11 fps=0.0 q=0.0 size=       0kB time=-577014:32:22.77 bitrate=  -0.0kbits/s dup=1 drop=0 speed=N/A    
frame=   52 fps= 48 q=0.0 size=       0kB time=-577014:32:22.77 bitrate=  -0.0kbits/s dup=1 drop=0 speed=N/A    
frame=   85 fps= 54 q=0.0 size=       0kB time=-577014:32:22.77 bitrate=  -0.0kbits/s dup=1 drop=0 speed=N/A    
frame=  145 fps= 64 q=0.0 size=       0kB time=-577014:32:22.77 bitrate=  -0.0kbits/s dup=47 drop=0 speed=N/A    
frame=  171 fps= 61 q=0.0 size=       0kB time=-577014:32:22.77 bitrate=  -0.0kbits/s dup=55 drop=0 speed=N/A    
Too many packets buffered for output stream 0:0.
[libx264 @ 0000000000531c80] frame I:2     Avg QP:15.28  size: 56950
[libx264 @ 0000000000531c80] frame P:34    Avg QP:14.18  size:  1252
[libx264 @ 0000000000531c80] frame B:93    Avg QP:15.53  size:   140
[libx264 @ 0000000000531c80] consecutive B-frames:  3.1%  1.6%  2.3% 93.0%
[libx264 @ 0000000000531c80] mb I  I16..4: 14.9% 79.5%  5.6%
[libx264 @ 0000000000531c80] mb P  I16..4:  0.7%  1.1%  0.0%  P16..4:  4.1%  1.4%  1.3%  0.0%  0.0%    skip:91.4%
[libx264 @ 0000000000531c80] mb B  I16..4:  0.0%  0.0%  0.0%  B16..8:  3.6%  0.0%  0.0%  direct: 0.0%  skip:96.4%  L0:36.8% L1:63.2% BI: 0.0%
[libx264 @ 0000000000531c80] 8x8 transform intra:74.4% inter:80.1%
[libx264 @ 0000000000531c80] coded y,uvDC,uvAC intra: 38.4% 33.4% 20.3% inter: 0.5% 0.2% 0.0%
[libx264 @ 0000000000531c80] i16 v,h,dc,p: 61% 25%  9%  6%
[libx264 @ 0000000000531c80] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 32% 31% 21%  2%  3%  3%  3%  3%  3%
[libx264 @ 0000000000531c80] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 27% 32% 14%  4%  5%  5%  5%  4%  6%
[libx264 @ 0000000000531c80] i8c dc,h,v,p: 76% 13%  8%  4%
[libx264 @ 0000000000531c80] Weighted P-Frames: Y:0.0% UV:0.0%
[libx264 @ 0000000000531c80] ref P L0: 85.1%  6.8%  6.5%  1.6%
[libx264 @ 0000000000531c80] ref B L0: 48.1% 47.5%  4.4%
[libx264 @ 0000000000531c80] ref B L1: 93.2%  6.8%
[libx264 @ 0000000000531c80] kb/s:315.41
**Conversion failed!**
生成mp4视频为:E:\Test\projectVideos\temp1558578421815.mp4
===========视频转码结束,开始截图================= 
该文件夹存在。
截图命令:E:\ffmpeg\bin\ffmpeg.exe-ss00:00:01-iE:\Test\projectVideos\temp\1558578421815.wmv-y-fimage2-s154x90E:\Test\projectVideos\images\1558578421815.jpg
ffmpeg version N-93678-g4b7166c9d5 Copyright (c) 2000-2019 the FFmpeg developers
  built with gcc 8.3.1 (GCC) 20190414
  configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libdav1d --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx --enable-amf --enable-ffnvcodec --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth --enable-libopenmpt
  libavutil      56. 26.100 / 56. 26.100
  libavcodec     58. 52.100 / 58. 52.100
  libavformat    58. 27.103 / 58. 27.103
  libavdevice    58.  7.100 / 58.  7.100
  libavfilter     7. 50.100 /  7. 50.100
  libswscale      5.  4.100 /  5.  4.100
  libswresample   3.  4.100 /  3.  4.100
  libpostproc    55.  4.100 / 55.  4.100
Input #0, asf, from 'E:\Test\projectVideos\temp\1558578421815.wmv':
  Metadata:
    DeviceConformanceTemplate: M1
    WMFSDKNeeded    : 0.0.0.0000
    WM/WMADRCPeakReference: 7851
    WM/WMADRCPeakTarget: 7851
    WM/WMADRCAverageReference: 1027
    WM/WMADRCAverageTarget: 1027
    WMFSDKVersion   : 12.0.7601.17514
    IsVBR           : 0
  Duration: 00:00:16.58, bitrate: 1969 kb/s
    Stream #0:0(chi): Audio: wmapro (b[1][0][0] / 0x0162), 48000 Hz, stereo, fltp, 256 kb/s
    Stream #0:1(chi): Video: vc1 (Advanced) (WVC1 / 0x31435657), yuv420p, 1352x696 [SAR 1:1 DAR 169:87], 3400 kb/s, 30 tbr, 1k tbn, 60 tbc
Stream mapping:
  Stream #0:1 -> #0:0 (vc1 (native) -> mjpeg (native))
Press [q] to stop, [?] for help
[swscaler @ 0000000002ecd4c0] deprecated pixel format used, make sure you did set range correctly
Output #0, image2, to 'E:\Test\projectVideos\images\1558578421815.jpg':
  Metadata:
    DeviceConformanceTemplate: M1
    WMFSDKNeeded    : 0.0.0.0000
    WM/WMADRCPeakReference: 7851
    WM/WMADRCPeakTarget: 7851
    WM/WMADRCAverageReference: 1027
    WM/WMADRCAverageTarget: 1027
    WMFSDKVersion   : 12.0.7601.17514
    IsVBR           : 0
    encoder         : Lavf58.27.103
    Stream #0:0(chi): Video: mjpeg, yuvj420p(pc), 154x90 [SAR 2535:2233 DAR 169:87], q=2-31, 200 kb/s, 30 fps, 30 tbn, 30 tbc
    Metadata:
      encoder         : Lavc58.52.100 mjpeg
    Side data:
      cpb: bitrate max/min/avg: 0/0/200000 buffer size: 0 vbv_delay: -1
[image2 @ 0000000000628e00] Could not get frame filename number 2 from pattern 'E:\Test\projectVideos\images\1558578421815.jpg'. Use '-frames:v 1' for a single image, or '-update' option, or use a pattern such as %03d within the filename.
av_interleaved_write_frame(): Invalid argument
frame=    2 fps=0.0 q=1.6 size=N/A time=00:00:00.06 bitrate=N/A speed=0.102x    
frame=    2 fps=0.0 q=1.6 Lsize=N/A time=00:00:00.06 bitrate=N/A speed=0.097x    
video:3kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
Conversion failed!
截图进程结束
截图成功! 

即出现了Conversion failed!!!

1个回答

lz仔细去查一查ffmpeg转码命令参数,看是否缺少什么命令参数,然后用vlc工具去播放转码后的MP4文件,如果能正常播放说明你的前端页面调用video.js编程有问题。若vlc不能正常播放那就是ffmpeg转码时命令缺少参数。
另外,网页调用video.js播放视频流时要把网页发布到服务器上最好,我当时就遇到过这样的坑,直接的本地网页怎么也打不开视频

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
立即提问
相关内容推荐