Quantcast

Create a video from jpeg and mp3

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Create a video from jpeg and mp3

james shipton
Hi

I am trying to create a video file for upload to YouTube

I would like to use a single jpeg image for the video and an mp3 file
for the audio.

I have tried a few things but they do not appear to work

e.g.
ffmpeg -f image2 -i image1.jpg video.mpg
ffmpeg -i video.mpg -i audio.mp3 -acodec copy -vcodec copy newvideo.avi

ffmpeg -i image.jpg -i audio.mp3 -acodec copy -vcodec mpeg4 newvideo.mp4


If the audio is 5minutes long, how do i set the video to also be 5 minutes long?

thanks James
_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Create a video from jpeg and mp3

Justin Ruggles
james shipton wrote:

> Hi
>
> I am trying to create a video file for upload to YouTube
>
> I would like to use a single jpeg image for the video and an mp3 file
> for the audio.
>
> I have tried a few things but they do not appear to work
>
> e.g.
> ffmpeg -f image2 -i image1.jpg video.mpg
> ffmpeg -i video.mpg -i audio.mp3 -acodec copy -vcodec copy newvideo.avi
>
> ffmpeg -i image.jpg -i audio.mp3 -acodec copy -vcodec mpeg4 newvideo.mp4
>
>
> If the audio is 5minutes long, how do i set the video to also be 5 minutes long?

./ffmpeg -f image2 -loop_input -i image.jpg -i audio.mp3 -vcodec
mpeg1video -qscale 2 -acodec copy -shortest newvideo.avi

or if you don't care about file size you can output mjpeg video:

./ffmpeg -f image2 -loop_input -i image.jpg -i audio.mp3 -vcodec copy
-acodec copy -shortest newvideo.avi
_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-user
Loading...