How to add MP3 audio delayed in MP4 video?


Hits: 70  

FFMPEG Command: Add MP3 Audio file delayed in MP4 video file

# ffmpeg.exe -i “fox-story.mp4” -itsoffset 5.00 -i “fox-story.mp3” -map 0:v -map 1:a -vcodec copy -acodec copy “The Fox and Crow Story.mp4”

Input: fox-story.mp4 and fox-story.mp3
Output: The Fox and Crow Story.mp4

-itsoffset 5.00 -i “movie.mp3”
Offsets timestamps of audio streams by 5.00 seconds

-map 1:v -map 0:a
Takes audio stream from the second (delayed) input and video stream from the first input

Couldn’t find video filter ‘x264’


Hits: 2435  
X264
X264

x264 is a free software library for encoding video streams into the H.264/MPEG-4 AVC format. It is released under the terms of the GNU General Public License.

x264 itself provides a command line interface as well as a library-level interface.

x264 is used to encode video files in mp4, m4v, h.264 (HD) output format.

Install x264
------------

*  Download the latest snapshot(tarball) here:
# wget ftp://ftp.videolan.org/pub/videolan/x264/snapshots/x264-snapshot-20090113-2245.tar.bz2

* Extract tarball
# bzip2 -cd x264-snapshot-20090113-2245.tar.bz2 | tar xvf -
# cd x264-snapshot-20090113-2245

* Build and install
# ./configure
# make
# make install

Some problems with mplayer & x264

Install/compile mplayer with x264 support

-x264encopts is not an MEncoder option
Checking for x264 ... no (in libavcodec: no)   (./configure)

# svn checkout svn://svn.mplayerhq.hu/mplayer/trunk mplayer

# cd /usr/local/src/mplayer

# svn update

# ./configure

After configure make sure you got

Checking for x264 ... yes (in libavcodec: yes)

# make && make install

Try latest version of video tools ffmpeg, mplayer, mencoder, flvtool2, mediainfo  🙂

Find correct path where you installed these components try …..

# locate command

“make sure you are using /usr/bin/mencode and NOT /usr/lib/bin/mencode”

🙂