user12370: I'm trying to convert a video file from AVI to MP4 but it doesn't seem to play, my code:
exec("ffmpeg -i ".$video." -c:v libx264 -pix_fmt yuv420p -movflags faststart ".$withoutExt.".mp4")

Even plain code:
exec("ffmpeg -i ".$video." ".$withoutExt.".mp4")

Any ideas please and thanks in advance.

user8079: You should specify the audio codec, e.g. -c:a libvo_aacenc.

12370: <p>I'm trying to convert a video file from AVI to MP4 but it doesn't seem to play, my code:</p>

<pre><code>exec("ffmpeg -i ".$video." -c:v libx264 -pix_fmt yuv420p -movflags faststart ".$withoutExt.".mp4")
</code></pre>

<p>Even plain code:</p>

<pre><code>exec("ffmpeg -i ".$video." ".$withoutExt.".mp4")
</code></pre>

<p>Any ideas please and thanks in advance.</p>
 8079: <p>You should specify the audio codec, e.g. <code>-c:a libvo_aacenc</code>.</p>
