请选择 进入手机版 | 继续访问电脑版

ChinaFFmpeg

 找回密码
 立即注册

QQ登录

只需一步,快速开始

查看: 9681|回复: 1

[Windows] ffmpeg.exe转码的视频文件无法播放

[复制链接]
发表于 2018-1-16 10:35:38 | 显示全部楼层 |阅读模式
process.StartInfo.Arguments = " -i " + inputFile + " -y -c:v libx264 -c:a libfdk_aac " + outPath + ".mp4";
                process.StartInfo.UseShellExecute = false;
                process.StartInfo.CreateNoWindow = true;
                process.StartInfo.RedirectStandardOutput = true;
                process.StartInfo.RedirectStandardInput = true;
                process.StartInfo.RedirectStandardError = true;

我需要将视频文件用h264重新编码,但是我在c#中调用用上面的方式调用ffmpeg.exe传递参数,转完码的视频无法再播放器中播放(暴风一闪而过,qq影音走进度条,但是黑屏),但是谷歌和qq浏览器播放时正常的,ie11无法播放,请问大神是否是我的命令写的不对,我希望一般的播放器可以播放,浏览器用viedo标签也可以播放,包括ie

回复

使用道具 举报

发表于 2018-1-16 13:56:14 | 显示全部楼层
[AppleScript] 纯文本查看 复制代码
ffmpeg version N-89672-g41e51fbcd9 Copyright (c) 2000-2018 the FFmpeg developers
  built with Apple LLVM version 9.0.0 (clang-900.0.39.2)
  configuration: --enable-fontconfig --enable-gpl --enable-libass --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libspeex --enable-libx264 --enable-libx265 --enable-libfdk-aac --enable-version3 --cc='ccache gcc' --enable-nonfree --enable-videotoolbox
  libavutil      56.  7.100 / 56.  7.100
  libavcodec     58.  9.100 / 58.  9.100
  libavformat    58.  3.100 / 58.  3.100
  libavdevice    58.  0.100 / 58.  0.100
  libavfilter     7.  8.100 /  7.  8.100
  libswscale      5.  0.101 /  5.  0.101
  libswresample   3.  0.101 /  3.  0.101
  libpostproc    55.  0.100 / 55.  0.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/Users/liuqi/1.MP4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf57.71.100
  Duration: 00:00:08.04, start: 0.000000, bitrate: 96 kb/s
    Stream #0:0(und): Video: h264 (High 4:2:2) (avc1 / 0x31637661), yuvj422p(pc), 256x192, 92 kb/s, 25 fps, 25 tbr, 12800 tbn, 50 tbc (default)
    Metadata:
      handler_name    : VideoHandler
At least one output file must be specified


你的视频是yuvj422p的pix_fmt, 一般硬解平台不一定会支持好,可以考虑加上-pix_fmt yuv420p解决,yuv420p比较通用
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

手机版|Archiver|ChinaFFmpeg

GMT+8, 2024-3-29 20:34 , Processed in 0.047972 second(s), 15 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表