Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

There are many videos on sites such as Youtube that simply contain album art and an audio track. This is easy to do with tools such as openshot or pitivi but it is time consuming. Is there a script or command that can be used to automate this process?

share|improve this question
    
Have you tried ffmpeg? –  ulidtko Feb 3 '11 at 23:38
    
@ulidko No, because I don't know how to use ffmpeg to do this. –  dv3500ea Feb 4 '11 at 0:13
    
To all readers, please remember to use these tools responsibly. The term "You shall not download any Content unless you see a 'download' or similar link displayed by YouTube" seems particularly relevant here. –  ændrük Feb 4 '11 at 3:39
add comment

1 Answer 1

up vote 4 down vote accepted

This may be helpful, even though it requires that you have the album art separate from the audio file. and that the audio be in .mp3 format, you could however, look at the command and alter it to suit other input and output formats.

At your terminal in a directory containing the image and audio files you could use ffmpeg like this:

ffmpeg -loop_input -r ntsc -i cover_art.jpg -i test.mp3 -acodec copy -shortest -qscale 5 out.avi

This will take cover_art.jpg and test.mp3 and create a video out.avi with cover_art.jpg as the video and test.mp3 as the audio track of length the duration of the audio track.

ffmpeg may have to be compiled with restricted formats enabled.

A great automation would be to find something that can extract the art from the audio file and use that image with ffmpeg.

share|improve this answer
    
This works great but I reccomend using -r 1 instead of -r ntsc because it speeds up the process. –  dv3500ea Feb 4 '11 at 10:14
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.