【问题标题】:Invalid too big FFmpeg CropFFmpeg 裁剪过大无效
【发布时间】:2021-07-02 09:09:12
【问题描述】:

我的视频裁剪器对我测试的所有视频都可以正常工作,但是来自 s20 ultra 的视频在 FFmpeg 中给了我一些错误,我真的不知道视频是否过大或不是我的源代码https://github.com/rushidevmurari/RushiCropVideo/blob/213166834b0bc6ce83ab3f4ac494f261a57d7436/app/src/main/java/com/androworld/allinonevideoeditor/videocrop/VideoCropActivity.java

我得到了这些链接,但对我的工作没有任何好处Error when cropping video using FFMPEG

  [graph 0 input from stream 0:0 @ 0x7673807a4b40] sws_param option is deprecated and ignored
    [Parsed_crop_0 @ 0x7673807a4c80] Invalid too big or non positive size for width '3840' or height '1920'
    [Parsed_crop_0 @ 0x7673807a4c80] Failed to configure input pad on Parsed_crop_0
    Error reinitializing filters!
    Failed to inject frame into filter network: Invalid argument
    Error while processing the decoded data for stream #0:0
    Conversion failed!

我的命令

I/System.out: "-y" "-ss" "0" "-t" "31" "-i" "/storage/emulated/0/Download/20210227_175547.mp4" "-strict" "experimental" "-vf" "crop=w=3837:h=2160:x=1:y=-2070" "-r" "15" "-ab" "128k" "-vcodec" "mpeg4" "-acodec" "copy" "-b:v" "2500k" "-sample_fmt" "s16" "-ss" "0" "-t" "31" "/storage/emulated/0/VEditor/VideoCroper/20210227_175547-0-13.mp4"

I/mobile-ffmpeg:正在加载 mobile-ffmpeg。

我的完整日志https://ghostbin.co/paste/s2qdw

【问题讨论】:

  • 添加 -report 并重新运行。分享报告。
  • 指挥?试试看
  • 你必须从阅读错误开始:Invalid too big or non positive size for width '3840' or height '1920'

标签: java android ffmpeg android-ffmpeg


【解决方案1】:

由于旋转侧数据,ffmpeg 正在自动旋转视频,因此在被裁剪之前它变为 2160x3840,从而导致错误。您可以使用-noautorotate 输入选项告诉它不要自动旋转。

I/System.out: "-y" "-noautorotate" "-ss" "0" "-t" "31" "-i" "/storage/emulated/0/Download/20210227_175547.mp4" "-vf" "crop=w=3837:h=2160:x=1:y=-2070" "-r" "15" "-vcodec" "mpeg4" "-acodec" "copy" "-b:v" "2500k" "/storage/emulated/0/VEditor/VideoCroper/20210227_175547-0-13.mp4"

我删除了不执行任何操作的选项。

【讨论】:

  • 哦,哇,非常感谢,终于在一周内解决了这个问题。第一次使用 FFmpeg :D
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2022-08-17
  • 2021-05-13
  • 1970-01-01
  • 1970-01-01
  • 2020-11-03
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多