Adding microphone audio to an existing video












0















I have a video file which has no audio, I wanted to add audio description using mic while the video is being played i.e. video is being played and I will do a voice over on it and that get saved a new clip having audio and video.



How to do that with ffmpeg?










share|improve this question





























    0















    I have a video file which has no audio, I wanted to add audio description using mic while the video is being played i.e. video is being played and I will do a voice over on it and that get saved a new clip having audio and video.



    How to do that with ffmpeg?










    share|improve this question



























      0












      0








      0








      I have a video file which has no audio, I wanted to add audio description using mic while the video is being played i.e. video is being played and I will do a voice over on it and that get saved a new clip having audio and video.



      How to do that with ffmpeg?










      share|improve this question
















      I have a video file which has no audio, I wanted to add audio description using mic while the video is being played i.e. video is being played and I will do a voice over on it and that get saved a new clip having audio and video.



      How to do that with ffmpeg?







      ffmpeg






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Jan 3 at 8:56









      slhck

      161k47446468




      161k47446468










      asked Jan 3 at 4:23









      ChitsChits

      11




      11






















          1 Answer
          1






          active

          oldest

          votes


















          1














          I wouldn't recommend using ffmpeg for this. Rather use a proper nonlinear video editing software that allows you to align video and audio tracks graphically. You're likely going to want to do the recording in smaller chunks of audio and not record everything in one go. You could also use an audio program like Audacity to do the recording offline, and use a video player like VLC to preview the video, then stitch everything together in the end.



          That said, you can record microphone audio with ffmpeg while doing desktop recordings. The exact command depends on your operating system and method of input. Please refer to the Wiki for that.



          If you want to record audio while the video is playing, you have to use the original video as input, specify your microphone as a second input source, then output to both a file and an ffplay process to preview your video.



          For example — and this is just a quick solution —, under macOS, the microphone is selected with -f avfoundation -i ":0". The video is being copied (-c:v copy), the audio is encoded with aac, and everything is output to both output.mkv and a pipe that is fed to ffplay.



          ffmpeg -i screencast.mp4 -f avfoundation -i ":0" -c:v copy -c:a aac -f tee -map 0:v -map 1:a "output.mkv|[f=matroska]pipe:" | ffplay -



          Note that this will not be exactly synchronous — you might be seeing the video a little bit too late. Also, your recorded audio will be played back with a bit of delay. Mute your speakers in this case.






          share|improve this answer
























          • Thanks I will try this

            – Chits
            Jan 3 at 9:18











          Your Answer








          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "3"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1390042%2fadding-microphone-audio-to-an-existing-video%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          1














          I wouldn't recommend using ffmpeg for this. Rather use a proper nonlinear video editing software that allows you to align video and audio tracks graphically. You're likely going to want to do the recording in smaller chunks of audio and not record everything in one go. You could also use an audio program like Audacity to do the recording offline, and use a video player like VLC to preview the video, then stitch everything together in the end.



          That said, you can record microphone audio with ffmpeg while doing desktop recordings. The exact command depends on your operating system and method of input. Please refer to the Wiki for that.



          If you want to record audio while the video is playing, you have to use the original video as input, specify your microphone as a second input source, then output to both a file and an ffplay process to preview your video.



          For example — and this is just a quick solution —, under macOS, the microphone is selected with -f avfoundation -i ":0". The video is being copied (-c:v copy), the audio is encoded with aac, and everything is output to both output.mkv and a pipe that is fed to ffplay.



          ffmpeg -i screencast.mp4 -f avfoundation -i ":0" -c:v copy -c:a aac -f tee -map 0:v -map 1:a "output.mkv|[f=matroska]pipe:" | ffplay -



          Note that this will not be exactly synchronous — you might be seeing the video a little bit too late. Also, your recorded audio will be played back with a bit of delay. Mute your speakers in this case.






          share|improve this answer
























          • Thanks I will try this

            – Chits
            Jan 3 at 9:18
















          1














          I wouldn't recommend using ffmpeg for this. Rather use a proper nonlinear video editing software that allows you to align video and audio tracks graphically. You're likely going to want to do the recording in smaller chunks of audio and not record everything in one go. You could also use an audio program like Audacity to do the recording offline, and use a video player like VLC to preview the video, then stitch everything together in the end.



          That said, you can record microphone audio with ffmpeg while doing desktop recordings. The exact command depends on your operating system and method of input. Please refer to the Wiki for that.



          If you want to record audio while the video is playing, you have to use the original video as input, specify your microphone as a second input source, then output to both a file and an ffplay process to preview your video.



          For example — and this is just a quick solution —, under macOS, the microphone is selected with -f avfoundation -i ":0". The video is being copied (-c:v copy), the audio is encoded with aac, and everything is output to both output.mkv and a pipe that is fed to ffplay.



          ffmpeg -i screencast.mp4 -f avfoundation -i ":0" -c:v copy -c:a aac -f tee -map 0:v -map 1:a "output.mkv|[f=matroska]pipe:" | ffplay -



          Note that this will not be exactly synchronous — you might be seeing the video a little bit too late. Also, your recorded audio will be played back with a bit of delay. Mute your speakers in this case.






          share|improve this answer
























          • Thanks I will try this

            – Chits
            Jan 3 at 9:18














          1












          1








          1







          I wouldn't recommend using ffmpeg for this. Rather use a proper nonlinear video editing software that allows you to align video and audio tracks graphically. You're likely going to want to do the recording in smaller chunks of audio and not record everything in one go. You could also use an audio program like Audacity to do the recording offline, and use a video player like VLC to preview the video, then stitch everything together in the end.



          That said, you can record microphone audio with ffmpeg while doing desktop recordings. The exact command depends on your operating system and method of input. Please refer to the Wiki for that.



          If you want to record audio while the video is playing, you have to use the original video as input, specify your microphone as a second input source, then output to both a file and an ffplay process to preview your video.



          For example — and this is just a quick solution —, under macOS, the microphone is selected with -f avfoundation -i ":0". The video is being copied (-c:v copy), the audio is encoded with aac, and everything is output to both output.mkv and a pipe that is fed to ffplay.



          ffmpeg -i screencast.mp4 -f avfoundation -i ":0" -c:v copy -c:a aac -f tee -map 0:v -map 1:a "output.mkv|[f=matroska]pipe:" | ffplay -



          Note that this will not be exactly synchronous — you might be seeing the video a little bit too late. Also, your recorded audio will be played back with a bit of delay. Mute your speakers in this case.






          share|improve this answer













          I wouldn't recommend using ffmpeg for this. Rather use a proper nonlinear video editing software that allows you to align video and audio tracks graphically. You're likely going to want to do the recording in smaller chunks of audio and not record everything in one go. You could also use an audio program like Audacity to do the recording offline, and use a video player like VLC to preview the video, then stitch everything together in the end.



          That said, you can record microphone audio with ffmpeg while doing desktop recordings. The exact command depends on your operating system and method of input. Please refer to the Wiki for that.



          If you want to record audio while the video is playing, you have to use the original video as input, specify your microphone as a second input source, then output to both a file and an ffplay process to preview your video.



          For example — and this is just a quick solution —, under macOS, the microphone is selected with -f avfoundation -i ":0". The video is being copied (-c:v copy), the audio is encoded with aac, and everything is output to both output.mkv and a pipe that is fed to ffplay.



          ffmpeg -i screencast.mp4 -f avfoundation -i ":0" -c:v copy -c:a aac -f tee -map 0:v -map 1:a "output.mkv|[f=matroska]pipe:" | ffplay -



          Note that this will not be exactly synchronous — you might be seeing the video a little bit too late. Also, your recorded audio will be played back with a bit of delay. Mute your speakers in this case.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Jan 3 at 8:56









          slhckslhck

          161k47446468




          161k47446468













          • Thanks I will try this

            – Chits
            Jan 3 at 9:18



















          • Thanks I will try this

            – Chits
            Jan 3 at 9:18

















          Thanks I will try this

          – Chits
          Jan 3 at 9:18





          Thanks I will try this

          – Chits
          Jan 3 at 9:18


















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Super User!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1390042%2fadding-microphone-audio-to-an-existing-video%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          If I really need a card on my start hand, how many mulligans make sense? [duplicate]

          Alcedinidae

          Can an atomic nucleus contain both particles and antiparticles? [duplicate]