[FFmpeg-user] Automatically crop longer file when merging

Stevens, Thom (US - SCPL) thom.stevens at meggitt.com
Thu Jan 23 18:51:49 CET 2014


Hi Samir,

Get the length of the video: see, e.g., http://askubuntu.com/questions/224237/how-to-check-how-long-a-video-mp4-is-using-the-shell

Transcode (copy) the audio to end at that duration: see, e.g., http://askubuntu.com/questions/56022/what-to-use-to-quickly-cut-audio-video



Thom Stevens
Sr. Systems Engineer

Securaplane Technologies
12350 N. Vistoso Park Road
Oro Valley, AZ 85755  USA
USA

Tel (Mobile):   +1 520 369-0464
Tel (Tucson):   +1 520 425-8163
Facsimile:      +1 520 498-4924
Skype:          thom.stevens.mplc
thom.stevens at meggitt.com

www.securaplane.com
www.meggitt.com

Please cc: SCPL-RD1209 at meggitt.com on all communication to non-US persons regarding RD1209 [GCSS].

Please consider the environment before printing this e-mail.


-----Original Message-----
From: ffmpeg-user-bounces at ffmpeg.org [mailto:ffmpeg-user-bounces at ffmpeg.org] On Behalf Of Samir
Sent: Wednesday, January 22, 2014 4:23 AM
To: ffmpeg-user at ffmpeg.org
Subject: [FFmpeg-user] Automatically crop longer file when merging

Hello,

I have recorded separatly two files for the same sequence: an mp4 file for the video part and a wav for the audio part. I can mix them easily with ffmpeg.

My problem is that the audio file is longer than the video file, about 1 second only but it produces an out of sync video...

I know I can crop my audio file but I need first to get the duration for my files to known how many time i need to cut.

Is there a way to tell ffmpeg to automatically crop the audio file to fit the duration of my video file?
_______________________________________________
ffmpeg-user mailing list
ffmpeg-user at ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

________________________________
Securaplane Technologies, Inc d/b/a Securaplane

This e-mail may contain proprietary information and/or copyright material. This e-mail is intended for the use of the addressee only. Any unauthorized use may be unlawful. If you receive this e-mail by mistake, please advise the sender immediately by using the reply facility in your e-mail software.

Information contained in and/or attached to this document may be subject to export control regulations of the European Community, USA, or other countries. Each recipient of this document is responsible to ensure that usage and/or transfer of any information contained in this document complies with all relevant export control regulations. If you are in any doubt about the export control restrictions that apply to this information, please contact the sender immediately.

Be aware that Meggitt may monitor incoming and outgoing e-mails to ensure compliance with the Meggitt IT Use policy.

This transmittal and any attached documents may contain technical data, the use of which may be restricted by the U.S. Arms Export Control Act and/or the Export Administration Act. By accepting such data, the recipient agrees to comply with the International Traffic in Arms Regulations (ITAR) and/or the Export Administration Regulations, as applicable.


More information about the ffmpeg-user mailing list