VideoHelp Forum

Our website is made possible by displaying online advertisements to our visitors. Consider supporting us by disable your adblocker or Try ConvertXtoDVD and convert all your movies to DVD. Free trial ! :)
+ Reply to Thread
Results 1 to 10 of 10
  1. Hi
    This question has been asked before in this forum but it is very old now and even the links posted doesn't work anymore.

    Any how as the title suggests, I have a collection of about 300 audio (mp3) files each with an hour of 1hr in length and I need to combine those with the same picture to make a video file so that I can upload those videos in to youtube.

    I know I can use Windows Movie Maker for combining, but since there are around 300 files I would like to know whether there is a software that does the same thing in batch without me having to do each individually.

    thank you
    Quote Quote  
  2. Member Budman1's Avatar
    Join Date
    Jul 2012
    Search Comp PM
    Might try this thread. Sounds like what you want to do and the method is posted there as well:

    Looks like it uses FFMpeg to accomplish the feat.

    If you don't care if they are AVI or MP4 you can usee Virtualdub and select audio->audio from other file and select your audio file. Then change the Video->Frame Rate-> change so audio and video match and create your AVI or MP4(Virtualdub 1.10.3 using external encoder).
    Click image for larger version

Name:	ScreenHunter_480 Mar. 07 00.29.jpg
Views:	906
Size:	137.0 KB
ID:	16642
    Quote Quote  
  3. Hey Thanks for the answer.

    Actually I asked the original poster from that thread about the way he did it and that is why he says "at the request of someone" and that last reply by him was just yesterday (Mar6th 2013) compared to the second to last post which was in 2009.
    I will be using his method, but since it involves coding in FFMpeg which I am not familiar with I have to wait till the weekend to get help from one of my friends in doing it.

    Anyhow regarding the second suggestion you made, it really doesn't matter if the output file is.avi format.
    But according to your explanation, I am not sure how to use virtualdub to do that specific task (join an image and an audio file to make a video file) in batch form.

    Can you explain how to use virtualdub to do it for more than 1 audio file at a time. If it is possible?
    Quote Quote  
  4. Member Cornucopia's Avatar
    Join Date
    Oct 2001
    Deep in the Heart of Texas
    Search PM
    Another way to do it is a little old-school but still works well:
    1. Using MJPEGTools (can be found with VCDEasy, or just use VCDEasy as the GUI), convert photo to MPEG "HiRez" Still (aka 720x480 SD size)
    2. Using toolame, convert mp3 to mp2 (use slightly higher bitrate to maintain similar quality, as mp2 is less efficient than mp3)
    3. Using Muxer (TMPGEnc, Imago, etc) mux the still(s) and MP2 audio together. Good idea to follow this guide:
    4. Using svcdstl (uploaded, as my old website is no longer working), patch the mpg (stills stream headers) to support the stills in regular players.

    Yes, it would mean you are stuck with SD resolution pictures, and yes, it means you have to use MP2 audio, but it works perfectly fine in most players that support MPG1 or MPG2, and it doesn't use much more bitrate than the audio alone would.

    Image Attached Files
    Quote Quote  
  5. Member Budman1's Avatar
    Join Date
    Jul 2012
    Search Comp PM
    Virtualdub wasn't really made for this type of batch file conversion since the Audio wiill be changing for each file. There is a way to do with FFMpeg when you get your friend to help. Just put all your audio files (we'll assume mp3) and the image you will use (we'll assume JPG) and the FFMpeg.exe all in one folder. Open a command window in this folder or navigate to it. Then type the following, replacing the word Herringbone with the name of your image <for mp4 output>

    for %a in (*.mp3) do "ffmpeg" -loop 1 -r 1 -shortest -i "Herringbone.jpg" -vcodec mpeg4 -i %a -acodec copy %a".mp4"

    Or type the following, replacing the word Herringbone with the name of your image <for flv output>

    for %a in (*.mp3) do "ffmpeg" -loop 1 -r 1 -shortest -i "Herringbone.jpg" -vcodec flv -i %a -acodec copy %a".flv"

    %a is replaced by each mp3 name and runs FFMpeg for each one and outputs it in mp4 or flv format to a concatenated filename like "MyAudio.mp3.MP4" or "yourAudio.mp3.FLV"

    Since you want to upload to YouTube, those are the 2 most likely compatible with that site. I tried this on my folder and it worked great. If you have problems it most likely is the file size not being correct for the mpeg4 or flv codec. Just cropping it to a size divisible by 2 should work. I'm sure there are other methods but this takes about 15 minutes if the files are ok to start with.

    IMPORTANT: Make sure your image and audio have no spaces in them since %a will be replaced with a title like "image one.jpg" without the quotes and ffmpeg will stop reading after the space and think its an image called "image" since there are no quotes and tell you no such file found.

    The later versions of ffmpeg are fussier about where you put the -shortest, determining whether you mean input or output (-i), and when you use quotes.

    BATCH file script below, using 'herringbone.jpg' and 'happy birthday.mp3', run in CMD window:. (Need extra % sign for batch files, not needed if typed directly into CMD window and SOME quotes for happy birthday.mp3 with space in it)

    for %%a in (*.mp3) do "ffmpeg" -loop 1 -r 1 -i "Herringbone.jpg" -vcodec flv -i "%%a" -acodec copy -shortest "%%a.flv"
    WILL work with the quotes missing from the first %%a

    for "%%a" in (*.mp3) do "ffmpeg" -loop 1 -r 1 -i "Herringbone.jpg" -vcodec flv -i "%%a" -acodec copy -shortest "%%a.flv"
    will NOT work
    giving error:

    C:\Users\Bud\Desktop\mp3video>C:\Users\Bud\Desktop \mp3video\mp3video.bat
    "%a" was unexpected at this time.
    You may have to use the error and thrial and error to get it right.
    Last edited by Budman1; 1st Nov 2017 at 23:27.
    Quote Quote  
  6. Thank to both Cornucopia and Budman1 for your great suggestion.
    @Budman1, I seem to like your method better and it almost worked except for few issues.

    As I have mentioned before, the audio files are about 1hr in length (55mb in size), but still I wanted to check your method with smaller audio files and I wanted to check it myself since you wrote a really good explanation on what to type on the command window and all the other details associated with it..

    Please see the attach picture. It has a print screen about the problem I am having now.

    So I grabbed two mp3s from internet (2.30 min/ 2.5mb in size) and tried to join with an image.
    The file names for the audio are Don Trip You Gotti and Young Taz No Worries (just disregard the stupid names, those are the first ones I could find online)

    As you could see from the picture, a flv file for the first audio file in the folder was made pretty quickly by the FFMpeg, but the flv for the second audio file was not made even after more than 45 minutes from the start of the process and instead the FFMpeg kept running without any specific output as you can see from the command prompt window.

    I typed the command prompt as it appears in the word file with the replaced image name for what you had there.

    Do you have any suggestion for what I might be doing wrong for the FFMpeg to not produce the 2nd video file and on instead kept running.

    Can there be something wrong with the spacings in the command prompt. I basically copied what you had and only changed the image name.
    Sorry for all the trouble, but this is the first time I'm using command prompt to execute something.Click image for larger version

Name:	Print Screen.png
Views:	281
Size:	329.8 KB
ID:	16664
    Quote Quote  
  7. Member Budman1's Avatar
    Join Date
    Jul 2012
    Search Comp PM
    Sorry it took so long to reply but I didn't seem to get a notice. Anyway, I tried your scenario and I got the same sort of results and then I realized I had updated FFMpeg. I tried the last 3 versions I had used and got, surprisingly, 3 different results. The 3 versions were:
    Click image for larger version

Name:	ScreenHunter_481 Mar. 16 23.30.jpg
Views:	634
Size:	34.8 KB
ID:	16779

    With the 20130110 version, I got the same results as you caused by a high frame count being encoded.
    Click image for larger version

Name:	ScreenHunter_481 Mar. 16 23.38.jpg
Views:	630
Size:	126.1 KB
ID:	16780

    With 20130314 version I got an error and it failed completely:
    Click image for larger version

Name:	ScreenHunter_481 Mar. 16 23.40.jpg
Views:	637
Size:	168.1 KB
ID:	16781

    But with the 20120426 version 2 files converted in a few seconds as was my last attempts:
    Click image for larger version

Name:	ScreenHunter_481 Mar. 16 23.42.jpg
Views:	638
Size:	135.7 KB
ID:	16782

    You might also notice my notation one one version that works with EBUR128 and it fails on the latest also. Guess the moral is FFMpeg is great but different versions seem to be VERY different in some uses. I'm noting all that work now and which ones so I can try all the failures on any new versions. I downloaded the 20120426 version at and there are a lot between there and 20130110 version I updated to but I'd start with the one that works and work up from there if you wish.

    It works fine on all I try with 20120426, hope it does for you.

    See my update to post #5 above for the correct syntax that was tested in later versions.
    Last edited by Budman1; 1st Nov 2017 at 23:31.
    Quote Quote  
  8. Hello Budman 1,

    It finally worked after using the 20120426 version. The conversion is so fast that in the time it takes to do one video with Windows Movie Maker, ffmpeg does like 50 videos (no kidding!!!!!!)

    I just can't thank you enough for all the time and effort you put in to help me out in this problem and you don't know how important this is to me.

    Again thank you very much for the help and I hope you find quick and easy answers to any problems you may face in future as well.
    Quote Quote  
  9. This line works in 2019 with Ffmpeg 4.1.1

    for %a in (*.mp3) do "ffmpeg" -loop 1 -r 1 -i "Herringbone.jpg" -vcodec mpeg4 -i %a -acodec copy -shortest %a".mp4"

    I just had to change the place of the -shortest

    The file name has to be like thisisit.mp3 it can not be like "This Is It.mp3" else the command line prompts a error.

    Thanks for the work! I had to convert my 1900+ instrumentals to videos so I can upload them to youtube..

    Last edited by Aluode; 6th Apr 2019 at 01:18.
    Quote Quote  
  10. Thanks Aloude for confirming the command prompt line for the latest Ffmpeg version.

    I still thank Budman1 for his help in getting this to work.

    And happy this helped you. I have also uploaded more than 3000 1hour videos to youtube and without this thread it wouldn't have been possible.
    Quote Quote  

Similar Threads