[FFmpeg-user] h264 and opus in mp4 container
barsnick at gmx.net
Mon Feb 26 13:08:10 EET 2018
On Mon, Feb 26, 2018 at 10:06:36 +0530, Vittalprasad wrote:
> external player like mplayer, vlc and kmp are failing to decode voice . i.e
> while playing mp4 file there is only video no voice.
Are you sure that your external players support this? This feature was
only recently added to the standard, and its support is only
experimental in ffmpeg. (That said, my mpv plays it fine.)
> Procedure followed using ffmpeg:
> 1. From sample mp4 file, i have separated audio(aac codec) and video(h264)
> in to different files .
> 2. aac trans-coded to opus
> 3. tried to merge video and audio(opus) in to single mp4
You can do all that in one step, if your ffmpeg supports the opus or
the libopus encoder(s).
> 1. whether ffmpeg support above codecs in single mp4 file or issue with
> external player .
ffmpeg does have support. It will give you an error that it is
experimental if you don't add "-strict experimental" as an output
> If anyone has mp4 file with h264 and opus codecs please provide me along
> with procedure to convert.
Assuming you have H.264 in your input file:
ffmpeg -i inputfile -c:v copy -c:a libopus -strict experimental outputfile.mp4
More information about the ffmpeg-user