Answers.Body: <p>You should specify the audio codec, e.g. <code>-c:a libvo_aacenc</code>.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-12-24T04:14:39.840Z
Answers.Text: 1) Not necessary. If not specified, AAC is implicitly effected for MP4 container. 2)The internal AAC encoder is now stable (since Dec 5 build) and preferable to the VO encoder
Answers.UserDisplayName: Gyan
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-12-24T10:53:22.783Z
Answers.Text: @Mulvya, that depends on the AVI's audio codec and the ffmpeg version. AAC is *not* an mp4 requirement, you can mux into an mp4 container practically any streaming format. It is true that ffmpeg will default to AAC when your source is a raw stream, but not when the source is already encoded (notwithstanding some subtle differences between ffmpeg versions). The result is a valid mp4 file which can not be played on a player that expects only h.264+aac. I usually prefer to first get the command line fixed, only if it still doesn't work then the OP should go into diagnosing by sending the dumps.
Answers.UserDisplayName: avnr
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-12-24T11:56:12.063Z
Answers.Text: Let me repeat for clarity: if no audio parameters are specified and the output container is MP4, then ffmpeg will encode the audio using the highest priority AAC encoder it has. This is not dependent on whether the source audio is PCM/MP3/other. I did not say AAC is a MP4 requirement, am only referring to ffmpeg's behaviour.
Answers.UserDisplayName: Gyan
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-12-23T20:59:18.583Z
Answers.LastActivityDate: 2015-12-23T20:59:18.583Z
Answers.UserDisplayName: avnr
Body: <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>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-12-23T08:43:52.373Z
Comments.Text: Paste full console output of the executed command.
Comments.UserDisplayName: Gyan
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-12-23T08:55:40.453Z
Comments.Text: @Mulvya actually with the plain version, I get Output file #0 does not contain any stream
Comments.UserDisplayName: Shina
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-12-23T09:25:08.533Z
Comments.Text: Can't diagnose issue without console output. Add `-report` option to generate a log file.
Comments.UserDisplayName: Gyan
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-12-23T17:07:22.037Z
Comments.Text: As an alternative, what's in the AVI file? Please [edit] and paste [MediaInfo](http://mediaarea.net/en/MediaInfo) of the file.
Comments.UserDisplayName: LiveWireBT
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-12-23T18:21:31.150Z
Comments.Text: The full, complete ffmpeg console output would be more informative than mediainfo output.
Comments.UserDisplayName: llogan
Tags: <video><ffmpeg><webvideos>
Title: ffmpeg trying to convert AVI to MP4 but not playing
UserDisplayName: Shina
ThreadText: # ffmpeg trying to convert AVI to MP4 but not playing
  
  (Asked by: username_0 on 2015-12-23)
  
  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.
  
  **Tags:** video, ffmpeg, webvideos
  
  > **Comments:**
  > **username_1**: Paste full console output of the executed command.  
  > **username_0**: @Mulvya actually with the plain version, I get Output file #0 does not contain any stream  
  > **username_1**: Can't diagnose issue without console output. Add `-report` option to generate a log file.  
  > **username_2**: As an alternative, what's in the AVI file? Please [edit] and paste [MediaInfo](http://mediaarea.net/en/MediaInfo) of the file.  
  > **username_3**: The full, complete ffmpeg console output would be more informative than mediainfo output.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_4 on 2015-12-23. Score: 1
  
  You should specify the audio codec, e.g. `-c:a libvo_aacenc`.
  
  > **Comments:**
  > **username_1**: 1) Not necessary. If not specified, AAC is implicitly effected for MP4 container. 2)The internal AAC encoder is now stable (since Dec 5 build) and preferable to the VO encoder  
  > **username_4**: @Mulvya, that depends on the AVI's audio codec and the ffmpeg version. AAC is *not* an mp4 requirement, you can mux into an mp4 container practically any streaming format. It is true that ffmpeg will default to AAC when your source is a raw stream, but not when the source is already encoded (notwithstanding some subtle differences between ffmpeg versions). The result is a valid mp4 file which can not be played on a player that expects only h.264+aac. I usually prefer to first get the command line fixed, only if it still doesn't work then the OP should go into diagnosing by sending the dumps.  
  > **username_1**: Let me repeat for clarity: if no audio parameters are specified and the output container is MP4, then ffmpeg will encode the audio using the highest priority AAC encoder it has. This is not dependent on whether the source audio is PCM/MP3/other. I did not say AAC is a MP4 requirement, am only referring to ffmpeg's behaviour.  
  
  ---
  
  