Answers.Body: <p>To pipe to x264 and encode to AAC file in the same command, use</p>
  
  <pre><code>ffmpeg -i in.mp4 -map v -f yuv4mpegpipe - -map a -c:a libfaac v.aac | x264 --demuxer y4m --crf 18 --output "v.mp4" -
  </code></pre>
  
  <p>Then you can mux it via</p>
  
  <pre><code>mp4box -add v.mp4 -add v.aac -new va.mp4
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-01-18T15:17:15.057Z
Answers.Text: Thank you very much, but I got problem, the time of audio isn't like video , video time is 1:40 and audio time is 1;25 , for output, Why ?!
Answers.UserDisplayName: AL-KOON
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-01-18T15:37:40.963Z
Answers.Text: Show the full console output of the command and also ffprobe of the mp4box output.
Answers.UserDisplayName: Gyan
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-01-18T16:08:43.880Z
Answers.Text: ffmpeg -i DC.mp4 -map v -f yuv4mpegpipe - -c:a aac audio.aac  | x264 --demuxer y4m --crf 18 --output "out.mp4" -    /////
  
  Screenshot 1 : https://postimg.org/image/xelash2sn/
  
  Screenshot 2 : https://postimg.org/image/ps6rpp8xt/      ///////    I didn't use mp4box yet.
Answers.UserDisplayName: AL-KOON
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-01-18T16:18:30.340Z
Answers.Text: What does `ffprobe audio.aac` and `ffprobe -show_entries stream=duration dc.mp4` say?
Answers.UserDisplayName: Gyan
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-01-18T20:17:33.020Z
Answers.Text: I think the problem with input file video test .. anyway this is Video input : https://postimg.org/image/s5z9zwqb5/
  
  audio output : https://postimg.org/image/3o76c0nqp/
  
  // I just upload input Video https://www.solidfiles.com/v/GDRWZBkXxXxBX
Answers.UserDisplayName: AL-KOON
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-01-19T11:22:01.153Z
Answers.Text: When I used avs to import video , still same problem!
Answers.UserDisplayName: AL-KOON
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-01-18T14:39:28.353Z
Answers.LastActivityDate: 2017-01-18T14:39:28.353Z
Answers.UserDisplayName: Gyan
Body: <p>I just want to know if it's possible to encode audio &amp; video at the
   same time by FFmpeg</p>
  
  <p>-c:a libfaac  for  audio
   &amp;
   x264.exe for video.</p>
  
  <p>and any example! </p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-01-18T12:26:42.413Z
Comments.Text: Not clear on what you are looking for, but in general, yes. It is very much possible to encode audio and video at the same time, muxing the results into the same file, or separate files.
Comments.UserDisplayName: Gyan
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-01-18T13:24:51.880Z
Comments.Text: Thanx Mulvya. What I want exactly is how to use x264.exe encoder & libfaac (aac) to encode video and audio at the same time by FFmpeg.
Comments.UserDisplayName: AL-KOON
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-01-18T13:35:45.093Z
Comments.Text: Something like    /   
  ffmpeg -i test.avi -c:a libfaac -b:a 128k | x264 --crf 18 -o test.mp4 -
Comments.UserDisplayName: AL-KOON
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-01-18T13:50:12.997Z
Comments.Text: You don't want to use libx264 in ffmpeg?
Comments.UserDisplayName: Gyan
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-01-18T13:59:22.320Z
Comments.Text: No, I want to use x264-10bit which come with FFmpeg build.
  I tried this  :( ffmpeg -i DC_MV.mp4 | x264.exe --crf 18 --output "test.mp4")   but it says " At least one output file must specified"
Comments.UserDisplayName: AL-KOON
Tags: <ffmpeg><x264>
Title: Multiple FFmpeg input & output
UserDisplayName: AL-KOON
ThreadText: # Multiple FFmpeg input & output
  
  (Asked by: username_0 on 2017-01-18)
  
  I just want to know if it's possible to encode audio & video at the
  same time by FFmpeg
  
  -c:a libfaac for audio
  &
  x264.exe for video.
  
  and any example!
  
  **Tags:** ffmpeg, x264
  
  > **Comments:**
  > **username_1**: Not clear on what you are looking for, but in general, yes. It is very much possible to encode audio and video at the same time, muxing the results into the same file, or separate files.  
  > **username_0**: Thanx Mulvya. What I want exactly is how to use x264.exe encoder & libfaac (aac) to encode video and audio at the same time by FFmpeg.  
  > **username_0**: Something like    /    ffmpeg -i test.avi -c:a libfaac -b:a 128k | x264 --crf 18 -o test.mp4 -  
  > **username_1**: You don't want to use libx264 in ffmpeg?  
  > **username_0**: No, I want to use x264-10bit which come with FFmpeg build. I tried this  :( ffmpeg -i DC_MV.mp4 | x264.exe --crf 18 --output "test.mp4")   but it says " At least one output file must specified"  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2017-01-18. Score: 1
  
  To pipe to x264 and encode to AAC file in the same command, use
  
  ```
  ffmpeg -i in.mp4 -map v -f yuv4mpegpipe - -map a -c:a libfaac v.aac | x264 --demuxer y4m --crf 18 --output "v.mp4" -
  
  ```
  
  Then you can mux it via
  
  ```
  mp4box -add v.mp4 -add v.aac -new va.mp4
  
  ```
  
  > **Comments:**
  > **username_0**: Thank you very much, but I got problem, the time of audio isn't like video , video time is 1:40 and audio time is 1;25 , for output, Why ?!  
  > **username_1**: Show the full console output of the command and also ffprobe of the mp4box output.  
  > **username_0**: ffmpeg -i DC.mp4 -map v -f yuv4mpegpipe - -c:a aac audio.aac  | x264 --demuxer y4m --crf 18 --output "out.mp4" -    /////  Screenshot 1 : https://postimg.org/image/xelash2sn/  Screenshot 2 : https://postimg.org/image/ps6rpp8xt/      ///////    I didn't use mp4box yet.  
  > **username_1**: What does `ffprobe audio.aac` and `ffprobe -show_entries stream=duration dc.mp4` say?  
  > **username_0**: I think the problem with input file video test .. anyway this is Video input : https://postimg.org/image/s5z9zwqb5/  audio output : https://postimg.org/image/3o76c0nqp/  // I just upload input Video https://www.solidfiles.com/v/GDRWZBkXxXxBX  
  > **username_0**: When I used avs to import video , still same problem!  
  
  ---
  
  