Combine Picture with specific MP3

November 5, 2012 at 07:00:20
Specs: Windows 7
I want to combine sound with a specific picture. (no slide show, and without powerpoint) So view picture test2.jpg which then automatically start to play test2.mp3 from the same directory, like subtitles with movies do.
Now I can use fotobabble to do this `in the cloud` but I would prefer it off line.
Question: How can or will (/) that be done?
One would expect that this is wideley available, but days of google searches had no results.
Is there a way to script the combined operation of standard Microsoft or freeware programs?
Showing a picture is no problem, playing a mp3 is no problem, but combining them..??

See More: Combine Picture with specific MP3

Report •

November 5, 2012 at 11:22:55
I got this to kind of work:

::==== begin batchscript. Usage: picplay file
@echo off & setlocal
if [%1] equ [] (set /p name=what to play?) else (set name=%1)
start /min %name%.mp3
start /w %name%.jpg
taskkill /f /IM wmplayer.exe
::==== end
when you kill the picture-viewer, the batch stops (or tries to stop) the playback. Also need to check that wmplayer is playing the sound, and if not, change line 4 to handle a different player.

I made it so the mp3 and the jpg have the same name, but if you add a second argument, so that one arg. is the mp3 name and the other is the jpg name, then you can avoid that (but you have to manually associate them on the commandline each time, unless you want to use some kind of association file).
Another approach might be to use internet explorer and some html code combined with vbscript or javascript, but I"m not very proficient with html.

Report •

November 5, 2012 at 13:05:24
thnx nbrane, look nice! But you over-estimated my PC knowlegde..
How do I get this to work?

I googled about batchfiles, so I suppose I have to create a .bat file [lets call it fotobabble,bat] with notepad to include the lines you showed?

I googled "How to start Windows files and other programs from a batch file". and found
To run Microsoft Windows programs or files use the START command. The below example would run Windows Notepad.
You can also specify the direct location of the file by typing the below command.
*Windows users who have a different directory (e.g. Windows 2000 users) would need to substitute WINNT or the name of their directory in place of Windows in the above example.

Will that do the trick?

Report •

November 5, 2012 at 17:12:00
Sorry about that - all different levels come in here for help...

I guess first just "see if the dam thing works" before going any further. Cut/paste my code into an open notepad, and save it as fotobabble.bat, in the directory that you want to develop (containing the jpg files and the mp3 files.) It will run from that directory without having to do a lot of path maintenance. You should be able to use explorer to open that directory and dbl-click on the fotobabble.bat icon, and get some result. Or, if you want, go out to the command prompt and run it from there.
run CMD.EXE and when you get the black window, type (for example):
cd \x\y\mypics (or wherever you have your project located, under whatever name)
fotobabble pic1 (or whatever the jpg filename is, without the .jpg extension

Like I said, as written, your mp3 file needs to have the same name as your jpg picture (but with mp3 extension of course). So you have, like, "summer vacation1.jpg", then your chosen mp3 accompaniment is "summer vacation1.mp3".
(which reminds me, spaces in filenames must have quotes! like:
fotobabble "summer vacation1"

I fixed the batch to handle prompting for input, to be "explorer-friendly"

Report •

Related Solutions

November 6, 2012 at 00:19:30
Thnx nbrane, Think I am missing a detail somewhere? btw I am on W7, is that of any relevance? Have put the error messages on dropbox. Any more tips? Feel we get there...

Report •

Ask Question