On Monday 01 October 2007 06:33, Nick Rout wrote: > you need to know what codec you want to encode to.Know your phone wants > "mp4" is unhelpful unless you know the audio codec to put inside the mp4 > container. > > So find that out and then we will be able to get somewhere.Its possibly > aac. If you have a sample file that perhaps came with the phone software > (did you throw out that windows disk?) you can fun ffmpeg -i > filename.mp4 to see what is inside.
Ok. The utility I want is MP4Box, which is part of the gpac package (available in Mepis, therefore also in Ubuntu). I ran[1]: MP4Box -add grotesque.mp3 first.mp4 which created the file first.mp4 in a few seconds (i.e. I assert it did not transcode it, merely 'wrapped' it in a nice mp4 container). I can load and play the mp4 file with KMplayer, and it plays the same as the original mp3. If I run ffmpeg as you suggest, I see this (yes, it is a 4minute 5second file, hooray): [~]$ ffmpeg -i first.mp4 ffmpeg version CVS, build 3276800, Copyright (c) 2000-2004 Fabrice Bellard configuration: --extra-cflags=-fomit-frame-pointer -DRUNTIME_CPUDETECT --build i486-linux-gnu --enable-gpl --enable-pp --enable-zlib --enable-vorbis --enable-libogg --enable-theora --enable-a52 --enable-dts --enable-dc1394 --enable-libgsm --disable-debug --prefix=/usr built on Oct 4 2006 10:57:36, gcc: 4.0.3 (Ubuntu 4.0.3-1ubuntu5) Input #0, mov,mp4,m4a,3gp,3g2, from 'first.mp4': Duration: 00:04:05.4, start: 0.000000, bitrate: 193 kb/s Stream #0.0: Audio: mp4a / 0x6134706D, 44100 Hz, stereo Must supply at least one output file I fetched a built in MP4 file from the phone. When I run ffmpeg I see this (indeed, it is 19.3 seconds): [~]$ ffmpeg -i Techno\ Dance.mp4 ffmpeg version CVS, build 3276800, Copyright (c) 2000-2004 Fabrice Bellard configuration: --extra-cflags=-fomit-frame-pointer -DRUNTIME_CPUDETECT --build i486-linux-gnu --enable-gpl --enable-pp --enable-zlib --enable-vorbis --enable-libogg --enable-theora --enable-a52 --enable-dts --enable-dc1394 --enable-libgsm --disable-debug --prefix=/usr built on Oct 4 2006 10:57:36, gcc: 4.0.3 (Ubuntu 4.0.3-1ubuntu5) Input #0, mov,mp4,m4a,3gp,3g2, from 'Techno Dance.mp4': Duration: 00:00:19.3, start: 0.000000, bitrate: 147 kb/s Stream #0.0: Audio: mp4a / 0x6134706D, 44100 Hz, stereo Must supply at least one output file So... they're the same, mp4a, right? Not quite. I copied the encapsulated MP4 file that I made to the phone. It is recognised as a music file, but when I press 'play' there is a pause, then the phone says 'Invalid file'. This is further than I got before. When I just transferred an MP3 file verbatim the phone wouldn't recognise it as anything valid, and so it would not offer the option to 'play' it. Maybe I need to DRM it with a bogus DRM code, so that the software considers it to be protected, and therefore a legitimate item to be present on *my* phone. Or maybe not. A -- [1] A Flock of Seagulls
