Video segmentation and Merging

Source: Internet
Author: User

Video segmentation and merging are common in application scenarios, such as video clips, go ads, and more.
This article takes the MP4 file as the target, splits the merge

I. VLC pre-processing
If you need to highlight, sharpen, contrast, you can use VLC to achieve,
cvlc nikita.mp4--sout= "#transcode {vfilter={adjust{}:sharpen{sigma=0.12}: deinterlace{mode=mean}},vcodec=h264 , scale=0,acodec=mp4a}:file{dst=./0.mp4} "--sout-all--sout-keep

second, using FFmpeg for MP4 file segmentation
1. From 30 seconds, cut out the shard of 60 seconds long
./ffmpeg-ss 30-t 60-i nikita.mp4-same_quant seg1.mp4

Note:
1. The FFmpeg 2.4.3 version of the command is as follows
./ffmpeg-ss 30-t 60-i nikita.mp4-qscale 0-y seg1.mp4

2. Issues with the copy parameter
./ffmepg-i nikita.mp4-ss 30-t 60-vcodec copy-acodec copy-y seg1.mp4
can cause audio and video to be out of sync

third, the use of mencoder for slicing
./MENCODER-OVC X264-OAC facc-ss 30-t nikita.mp4-o seg1.mp4
it uses less memory than FFmpeg, always starts with the first IFRAME after 30s, and generates the MP4 format
or
./MENCODER-OVC COPY-OAC facc-ss 0.mp4-o 2.avi
It's a little faster than the above command,
or:
./MENCODER-OVC COPY-OAC facc-ss 0.mp4-of lavf-o 2.mp4

Iv. Segmentation MP4 merger
If this is a MP4 file, use mp4box merge directly
./mp4box-cat seg1.mp4-cat seg2.mp4-new merge.mp4

Video segmentation and Merging

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.