如何修剪视频在android系统? [英] How to trim video in android?

查看:258
本文介绍了如何修剪视频在android系统?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道,同样的问题已经被问了很多次,但我没有能够解决我的问题。

您好,我试过FFmpeg的命令修剪视频和放大器;它的工作原理相当不错。我想剪辑视频和放大器;它的工作原理,但我唯一的问题是,它需要太多的时间来修剪file.A 24MB的视频文件大约需要3分钟修剪2.30 minutes.Is有什么办法可以缩短这一时间。
我曾尝试以下修剪视频指挥。即。

 的ffmpeg -y -i /sdcard/DCIM/Besharam.mp4 -ss 0时00分05秒-to 0点02分35秒1 -async -strict -2 / SD卡/西/cut.mp4

 的ffmpeg -y -i /sdcard/DCIM/Besharam.mp4 -ss 0时00分05秒-to 0点02分35秒1 -async -strict -2 -s 640×360  - R 15 -v​​ codeC MPEG4 -b 2097152 -AB 48000 -ac 2 -b 2097152 -ar 22050 /sdcard/sai/cut.mp4


解决方案

您可以通过提供 -c复制选项复制输入文件的codeCS。指定输入文件之前寻求另外据说要快,但不准确。

在实施这些改变2您的命令看起来像:

 的ffmpeg -y -ss〇点00分05秒-i /sdcard/DCIM/Besharam.mp4 -to 0点02分35秒1 -async -strict -2 -C拷贝/ SD卡/西/ cut.mp4

I know the same question has been asked so many times, but I am not able to solve my issue.

Hi, I tried FFmpeg command for trimming video & it works quite good. I want to trim a video & it works, but the only problem I have is that it takes too much time to trim the file.A 24MB video file takes around 3 minutes to trim 2.30 minutes.Is there any way I can reduce this time. I have tried following command for trimming video. i.e.

ffmpeg -y -i /sdcard/DCIM/Besharam.mp4 -ss 00:00:05 -to 00:02:35 -async 1 -strict -2 /sdcard/sai/cut.mp4

and

ffmpeg -y -i /sdcard/DCIM/Besharam.mp4 -ss 00:00:05 -to 00:02:35 -async 1 -strict -2 -s 640x360 -r 15 -vcodec mpeg4 -b 2097152 -ab 48000 -ac 2 -b 2097152 -ar 22050 /sdcard/sai/cut.mp4

解决方案

You can copy the codecs of your input file by providing the -c copy option. Furthermore seeking before specifying the input file is said to be faster but less accurate.

After implementing these 2 changes your command would look like:

ffmpeg -y -ss 00:00:05 -i /sdcard/DCIM/Besharam.mp4 -to 00:02:35 -async 1 -strict -2 -c copy /sdcard/sai/cut.mp4

这篇关于如何修剪视频在android系统?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆