I just got a new phone, and I wanted to customize it with some of my favorite things: my wife and songs that remind me of her, one being her incoming ring of course. I don’t care much for any other calls, but when my love calls, my heart skips a beat, so here we go.
First, select a photo. I choose this one because she’s smiling at me and looks lovely.
Next, I took a short video in order to reverse engineer the video format of the Samsung Rant m540. Turns out the sound is AAC, 128 kbps, and the video is mpeg-4 (reports as DIVX) and the frame size is 176×144 and the rate is 15 fps.
I want to create a video with a still picture along with a song by NEK called, "Laura no está" – the sentiment of the song is that Laura is not there, but in her absence, I am tormented, she is everywhere. I am unable to escape. Honey, your feet must be tired, because you’ve been running around in my head all day. Chuckle. So I want to loop a 16 second sample of that song (the refrain) along with the above still picture. Turns out that ffmpeg (in Linux) will help you out tons. Check out the following gem:
ffmpeg -loop_input -vframes 240 -r 15 -f image2 -i foo.jpg -i foo.wav -s 176x144 -f mp4 -acodec libfaac bar.m4v
-loop_input causes the image to repeat throughout the clip. -vframes 240 is 16 seconds multiplied by 15 frames per second to give total frames. -f image2 is from the man page of ffmpeg and and forces a format. Specify two inputs -i foo.wav and -i foo.jpg a frame size -s 176×144, and video format -f mp4 an audio codec -acodec libfaac (you have to compile ffmpeg with libfaac support) and the output file bar.m4v.
Take the resulting video file and copy it to the directory /dcim/100ssmed/ of your phone’s memory card. I think you have to rename the file to sspx000(?).3g2 where the "?" represents a sequential number. I had trouble getting the video to play properly at first, but I think it’s because I had the frame rate slightly off. I don’t know, however, because I changed the frame rate and the file name at the same time and the thing started playing, so I’m unsure which was the cause, the frame rate or special sequential internal naming of the Rant m540. Dunno, maybe I’ll mess around with some more and post my results here.
So there you go. Now every time my love calls, I am greeted with her smiling face and a song.