2

1) I have created the few images from my original xyz.mp4 (using ffmpeg)

2) I am again creating the video from the images but the output.mp4 does not have the audio.

I use the following command to create the video from images. ffmpeg -b:v 850 -r 10 -i out%d.png -s 640X480 -vcodec libx264 -sameq output.mp4

Kindly let me know the the way for following steps

1) create images from video (.mp4)

2) create video(.mp4) from those images ( with audio in output file)

Thank you.

SchmitzIT
  • 9,227
  • 9
  • 65
  • 92
sameer
  • 21
  • 3
  • You should add additional source for audio: ... -i out%d.png -i audio_for_video.mp3 -s 640x480 ... – Juris Malinens Nov 06 '12 at 13:45
  • Thanks, it seems it is correct way as per suggestion i will try it and post comment here. – sameer Nov 06 '12 at 17:13
  • Do no use sameq: [sameq does not mean "same quality"](http://superuser.com/a/478550/110524). You're applying `-b:v 850` as an input option instead of an output option. Best to remove it because the libx264 defaults are decent. Also, the `-b` options takes a value in bits, not kilobits, so you would need to change it to `-b:v 850k` if you were to use it. – llogan Nov 06 '12 at 19:02
  • Thanks for inputs , I will try this options also as right now the output mp4 is little bit slow than the original. – sameer Nov 07 '12 at 05:52

1 Answers1

3

For the output video to have an audio, you must have an audio source that has the audi recorded for the video. You cannot expect the images to produce the sound right? So will also need a sound recorder along with the screen recorder, and then use ffmpeg to convert the video and audio file together into output.mp4.

Here are some links to audio recorders :

[Link1], [Link2]...

The second link I have tried and works fine, just compile and run. Once you have this audio file you can convert the images and audio file to an output video with the help of these links.

[Link1],[Link2],[Link3]..

or use:

ffmpeg -r 4 -i img%d.png -i audio.wav -acodec copy -r 30 output.avi
Community
  • 1
  • 1
Optimus Prime
  • 6,817
  • 5
  • 32
  • 60