View Full Version : 640x480 H264 MOBILE Output for iPod
jdobbs
4th February 2007, 17:30
This is for anyone who is adventurous and would like to encode some higher resolution movies for their iPod.
As many of you know the 5G iPod has some really curious requirements for accepting H.264, 640x480 sources. More-or-less they've added a UUID Atom and something called "Baseline Low Complexity Profile" to the requirement for loading. Bottom-line is: It's hard to make it to work except for the files you download from iTunes. :sly:
Anyway, I've created a profile and a quick method that should allow you to use DVD-RB Pro's mobile encoding feature to compress your DVD movie(s) into this format so you can get the most out of your iPod. Here's the steps:
Add the profile I've included in the attached text file below to your MOBILE.INI file. The file is located in your DVD-RB directory under the "Templates" folder. The default path for an English based system is:
"c:\Program Files\DVD-RB Pro\Template\mobile.ini"
It's a text file and can be edited with notepad or wordpad.
Download this program (http://nic.dnsalias.com/NicMP4Box.zip). It's a GNU program called "NicMP4Box" that has been modified by Nic (a genius) to add the signatures that make the file acceptable to the iTunes software.
Run DVD-RB and do a mobile encode using the profile (it will show up on the list after you've accomplished step 1. It will use FFMPEG to create an H264 based MP4 file (640x480) that is compatible with the iPod Video player.
From a DOS window, run NicMP4Box to add the iPod signatures to your output MP4 file (located in the output path's MOBILE folder) that will make it acceptable to iTunes -- here's an example:
NicMP4Box -add OriginalFile.mp4 NewFile.mp4
You can then drag-and-drop NewFile.mp4 into the iTunes "Movies" folder as you normally would.
Try it out and let me know how it works. If anyone has any suggestions as to how to do this better -- please speak up. Meanwhile I'm looking at possible ways to automate/optimize this process.
windtrader
4th February 2007, 22:16
Oh - I read the title with delight as I came here to figure out what is wrong with my mobile encode but missed the word "iPod".
Starting with PSP homebrew 3.03OE-B by Dark Angel the native XMB player will play 480x272 full screen MP4. It is just beautiful.
I have tried several times to get DVD rebuilder to get the mobile output in the proper format but still no luck.
The player in 3.03OE-c works fine as I have converted DVD files using freeware 3GP Converter and they play great. It uses FFMEG as well but my preference is to use a single interface rather than two.
I tried the following options and neither work. I am assuming the first is for MPEG4-SP and the second is MPEG4-AVC. These are the two formats supported by PSP.
[PSP-mpeg4]
vCodec=MPEG4
muxFormat=MP4
hSize=480
vSize=272
vMaxrate=2500
vBitrate=768
gopSize=300
aCodec=aac
aBitrate=128
AudioAmplify=1.3
ivtc=0
passes=2
[PSP-h264]
vCodec=H264
muxFormat=MP4
hSize=480
vSize=272
vMaxrate=2500
vBitrate=768
gopSize=300
aCodec=aac
aBitrate=128
AudioAmplify=1.3
ivtc=0
passes=2
EDIT
Couple more bits of info:
Output is stored on PSP in folder MP_ROOT\101ANV01 and named MAQ12345.mp4
Log from two runs:
[10:40:54] PREPARE/ENCODE/REBUILD completed in 3 min.
[10:43:44] One Click encoding activated...
-----------------
[10:43:44] Phase I, PREPARATION started.
- DVD-RB v1.21.0
- AVISYNTH 2.5.6.0
- ProCoder selected.
- Output in MOBILE format only.
- Audiostream (for mobile) is 0x80
- Source: AGENT_CODY_BANKS_2
- VTS_01: 28,581 sectors.
-- Scanning and writing .D2V & .AVS files
-- Processed 2,998 frames.
-- Building .AVS and .ECL files
- Reduction Level for DVD-5: 100.0%
- Overall Bitrate : 4,450/3,560Kbs
- Space for Video : 4,469,938KB
- HIGH/LOW/TYPICAL Bitrates: 3,561/1,178/3,560 Kbs
-- FEATURE does not require reencoding.
[10:43:51] Phase I, PREPARATION completed in 0 minutes.
[10:43:51] Phase II ENCODING started
- MOBILE Encoding:
- Video: MPEG4 (480x272) 768Kbs
- Audio: AAC 128Kbs
- Encoding: VTS01_PGC_00001.AVS
[10:45:26] Phase II ENCODING completed in 2 minutes.
Done.
[10:45:26] PREPARE/ENCODE/REBUILD completed in 2 min.
[10:52:46] One Click encoding activated...
-----------------
[10:52:46] Phase I, PREPARATION started.
- DVD-RB v1.21.0
- AVISYNTH 2.5.6.0
- ProCoder selected.
- Output in MOBILE format only.
- Audiostream (for mobile) is 0x80
- Source: AGENT_CODY_BANKS_2
- VTS_01: 28,581 sectors.
-- Scanning and writing .D2V & .AVS files
-- Processed 2,998 frames.
-- Building .AVS and .ECL files
- Reduction Level for DVD-5: 100.0%
- Overall Bitrate : 4,450/3,560Kbs
- Space for Video : 4,469,938KB
- HIGH/LOW/TYPICAL Bitrates: 3,561/1,178/3,560 Kbs
-- FEATURE does not require reencoding.
[10:52:53] Phase I, PREPARATION completed in 0 minutes.
[10:52:53] Phase II ENCODING started
- MOBILE Encoding:
- Video: H264 (480x272) 768Kbs
- Audio: AAC 128Kbs
- Encoding: VTS01_PGC_00001.AVS
[10:56:26] Phase II ENCODING completed in 4 minutes.
Done.
[10:56:26] PREPARE/ENCODE/REBUILD completed in 4 min.
edit2:
Here is the FFMEG parms from the 3gpconverter run that works.
[Item0]
Title=AVC (16:9,4:3) 29.97fps 1pass 768k
TitleE=AVC (16:9,4:3) 29.97fps 1pass 768k
Command0=""<%AppPath%>\cores\ffmpeg" -bitexact -y -i "<%InputFile%>" -title "<%Title%>" -timestamp "<%TimeStamp%>" -vcodec h264 -coder 1 -bufsize 128 -g 250 -s 480x272 -r 29.97 -b 768k -qmin 10 -qmax 31 -acodec aac -ac 2 -ar 48000 -ab 128 -vol 350 -f psp "<%OutputPath%>MAQ<%RandomNumber5%>.MP4""
Command1=""<%AppPath%>\cores\ffmpeg" -y -i "<%InputFile%>" -f image2 -ss 5 -vframes 1 -s 128x120 -an "<%OutputPath%>MAQ<%RandomNumber5%>.THM""
jdobbs
5th February 2007, 12:54
The presets look ok and should work -- but it looks like the encoder isn't being executed. Does the visual interface pop up when you run it? If so, double click on the background -- that way the command is captured to the clipboard. Then open up a DOS windows and paste the command in and run it. That way you can see what may be happening that is causing it to fail.
Something appears to be wrong when you do the PREPARE phase. It doesn't appear to be executing (0 minutes in both cases). I don't think the source is being scanned... either that or you've done some serious preprocessing? This certainly doesn't appear to be a standard DVD (with only 28,581 sectors). Are you sure the source is good?
Try running a standard DVD and see what happens. You can limit the output for testing by adding:
FrameLimit=3000
to the "[Mobile]" area of REBUILDER.INI. Don't forget to take it out, though.
[Edit]
I should have thought of this as a possibility: It appears you've created a test disc... DVD-RB has a limit set for itself to prevent any unimportant PGCs from being processing. So small PGCs are ignored.
Add this line:
pgc_minimum_frames=100
to the "[Mobile] area of REBUILDER.INI and it will bring the minimum frame count down.
windtrader
5th February 2007, 21:49
I do use a short trailer clip for testing. I know any preprocessing is frowned upon and I am quite careful to ensure the files have integrity. It plays fine in the sw player and loads in PGCEDIT without any warnings.
My understanding is when the mobile option is activated RB always uses FFMPEG. In the interface, the encoder selected is Procoder and there does not seem to be a way to manually specify FFMPEG. No big deal as FFMEG is used.
In the test runs I did have three added params:
VTS_MIN_SIZE=1, PGC_MINIMUM_FRAMES=100, FrameLimit=3000 as shown in the code below.
The FFMEG windows is minimized while running and will display if I click on it, it just doesn't pop open automatically. Procoder does pop up when I'd rather not see them at all..
I used the same settings and ran against a full backup set of vob/ifo. It seems like RB prepares the full movie, then went into encode which went quite fast. It finished without any errors. So, it does recognize the added parameters.
I loaded the RB output MP4 to the PSP but it still fails to play.
At this point, it seems there is some difference in the actual FFMEG parameter list being prepared by RB and that which I showed above from 3gpconverter. I'm not saying RB must use the exact same one, just that whatever the other app uses does work and the one RB generates does not. There is no log from 3gpconverter so nothing more to report.
One other thing. 480x272 video format is now supported by the native XMB player starting in Dark Angel's 3.03OE-B, I am running 3.03OE-c. You no longer need to use a homebrew player. The mobile output RB creates for PSP should follow the standards published for any MP4 it can natively play. I know there were earlier homebrew players like PMPplayer that needed different video formats.
Thanks,
Don
[12:17:56] One Click encoding activated...
-----------------
[12:17:56] Phase I, PREPARATION started.
- DVD-RB v1.21.0
- AVISYNTH 2.5.6.0
- ProCoder selected.
- Output in MOBILE format only.
- Audiostream (for mobile) is 0x80
- Source: XXX
- VTS_01: 2,273,326 sectors.
-- Scanning and writing .D2V & .AVS files
-- Processed 129,323 frames.
-- Building .AVS and .ECL files
- Reduction Level for DVD-5: 98.2%
- Overall Bitrate : 7,882/6,306Kbs
- Space for Video : 4,151,824KB
- HIGH/LOW/TYPICAL Bitrates: 6,764/786/6,306 Kbs
[12:20:26] Phase I, PREPARATION completed in 3 minutes.
[12:20:26] Phase II ENCODING started
- MOBILE Encoding:
- Video: MPEG4 (480x272) 768Kbs
- Audio: AAC 128Kbs
- Encoding: VTS01_PGC_00001.AVS
[12:22:09] Phase II ENCODING completed in 2 minutes.
Done.
[12:22:09] PREPARE/ENCODE/REBUILD completed in 5 min.
[Options]
VTS_MIN_SIZE=1
Mode=3
OneClick=1
ReduceOpt=0
NoWarn=1
AdditionalOutput=1
LogFile=1
QuEncHQ=1
EncoderMinimized=1
RemoveDTS=1
HC_Quality=1
HC_Matrix=1
SkinVersion=12
AudioDub=1
QuEncodeType=0
iDCT=0
GOP=0
DCPrec=0
MainMatrix=Encoder Default
LowMatrix=Same as Main Feature
VLowMatrix=Same as Main Feature
ExtraMatrix=Same as Main Feature
ProCoder_Quality=4
DVD_Label=AGENT_CODY_BANKS_2
DVD_Name=AGENT_CODY_BANKS_2.ISO
MovieOnly=0
HalfD1=00
Convert_16_9=00
DisableInterlace=00
ConvertToYUY2=1
CCE=3
Skin=Rebuilder Default
Completed=11
NewEditor=0
ForceEncode=1
[Paths]
QuEnc=C:\Program Files\DVD-RB PRO\Encoders\QuEnc\QuEnc.exe
ReJig=C:\Program Files\DVD-RB PRO\Encoders\ReJig\ReJig.exe
HC=C:\Program Files\DVD-RB PRO\Encoders\HC Encoder\HCbatch.EXE
FFMPEG=C:\Program Files\DVD-RB PRO\Encoders\FFMpeg\ffmpeg.exe
ProCoder=C:\Program Files\DVD-RB PRO\Encoders\EclPro\EclPro.exe
DECOMB=C:\Program Files\AviSynth 2.5\plugins\Decomb521.dll
NICAUDIO=C:\Program Files\AviSynth 2.5\plugins\nicaudio.dll
MPEG2DEC=C:\Program Files\DVD-RB PRO\DGDecode.dll
Working=W:\RB\
Output=W:\RB\
CCENew=C:\Program Files\Custom Technology\CCE SP Trial Version\cctspt.exe
Source=T:\TRAILERS\AGENT_CODY_BANKS_2\VIDEO_TS\
[Audio]
Selected=1
Remapping=
[Subpictures]
Selected=
[Mobile]
PGC_MINIMUM_FRAMES=100
FrameLimit=3000
Template=Custom
Format=1
Action=2
jdobbs
5th February 2007, 23:28
Can you playback the video on your computer? I looked at the parameter list you provided and the only thing I see that might have an effect is the "-f psp". I'm not positive that parameter is supported in the version of FFMPEG included with DVD-RB -- but I think it is -- you can try it by adding this line to the Profile in MOBILE.INI:
cmdline="-coder 1 -f psp"
For example:
[PSP-H264]
vCodec=H264
muxFormat=MP4
hSize=480
vSize=272
vMaxrate=2500
vBitrate=768
gopSize=250
aCodec=aac
aBitrate=128
AudioAmplify=1.3
ivtc=0
passes=1
cmdline="-coder 1 -f psp"
If that causes it to bomb -- you might try changing the path for FFMPEG in the REBUILDER.INI file so that it points to the that was included with 3gpconverter. I've also set the g value to 250 to match your example, and added the "-coder 1" parameter. I also set passes to 1 just to eliminate it as something that might affect encoding (the example was only doing one pass).
windtrader
6th February 2007, 04:33
Videos created by RB all play fine on computer.
I added the extra parameter as follows:
[Mobile]
cmdline="-coder 1 -f psp"
PGC_MINIMUM_FRAMES=100
FrameLimit=2000
Template=Custom
Format=1
Action=2
Still will not play on PSP.
I tried using the FFMPEG in the 3GP lib but it failed and says to read the log which I could not find or it did not create.
I went to the DOS command window to see what I could find out about the 3gp ffmeg version.
Some info:
FFmpeg version SUN-r7430 - built on Jan 9, 2007
There is a long list of the parameter values but it scrolls off and I forgot how to redirect output in DOS to a file.
I'm thinking it is something different in the FFmpeg settings that is creating the problem.
I'll see if I can find out if anything was changed in FFmpeg to accommodate PSP standards or homebrew 303OE.
Is this problem just me or are others not having any trouble with PSP video?
thx
jdobbs
6th February 2007, 05:08
Turn off the "Run Minimized" setting and double click on the popup when it runs... it's copy the FFMPEG command line to the clipboard, then post the command.
You can also run the command from a DOS window and see if it gives off any error messages.
I'm really not sure if anyone else is using it with PSP. But I'm sure there are lots of people using FFMPEG with PSP, so it has to work.
windtrader
6th February 2007, 06:02
Turn off the "Run Minimized" setting and double click on the popup when it runs... it's copy the FFMPEG command line to the clipboard, then post the command.Sorry, I could not find the place to turn of "run minimized" for 3gp. it is just an exe file in a directory, there is no install program or anything.
If there are so few RB users who want to encode for PSP, maybe you just want to drop it. If I'm the only one, I'm just fine with that. Sure seems like a lot of effort on your part to sort out this problem for one person.
There are other DVD to PSP programs such as xvid4psp that seem quite advanced and have lots of options and flexibility.
therat
6th February 2007, 10:19
I don't use the iPod output but i do like the xvid output. My dvd standalone player plays all mp4 variants (divx, xvid etc) just fine.
Having said that I can't get the xvid output to work on DVD-RB Pro 1.21. I get audio but no video.
this is the log:
[22:15:06] Phase I, PREPARATION started.
- DVD-RB v1.21.0
- AVISYNTH 2.5.6.0
- CCE 2.70.2.12 encoder selected.
- Output in MOBILE format only.
- Audiostream (for mobile) is 0x80
- Source: AU_101115
- VTS_02: 3,806,629 sectors.
-- Scanning and writing .D2V & .AVS files
-- Processed 252,100 frames.
-- Building .AVS and .ECL files
- Reduction Level for DVD-5: 52.2%
- Overall Bitrate : 2,851Kbs
- Space for Video : 3,509,578KB
- HIGH/LOW/TYPICAL Bitrates: 3,745/2,318/2,851 Kbs
[22:18:52] Phase I, PREPARATION completed in 3 minutes.
[12:41:49] Phase II ENCODING started
- MOBILE Encoding:
- Video: XVID (640x360) 704Kbs
- Audio: MP3 96Kbs
- Encoding: VTS02_PGC_00001.AVS
[13:55:55] Phase II ENCODING completed in 74 minutes.
movie is The Godfather
Maybe I should start a new thread rather than hijack this one.
cheers
varekai
6th February 2007, 11:52
Hello! :)
Just wanted to say that I appreciate this thread a lot!
I really like using DVD-RB pro for making quality mp4's for my iPod.
Been experementing some with these new settings jdobbs posted.
I'm afraid I don't have much to contribute when it comes to technical stuff...
All I can say is that it seems to work OK for me and my iPod,
the only thing I havn't got right yet is the subtitles.
The won't show up? But on the other hand, reading subs on a tiny iPod
screen isn't such a good idea in the first place...
What I really like is the easy use and the better quality I get
from DVD-RB pro! I have tested a few both free and commercial
mp4 encoders with various quality results, all from OK to awful.
Some of them were easy to use and some really complicated.
The absolute top benefit from using DVD-RB pro is the batch option!
It's a lifesaver when encoding lot's and lot's of shortmovies!!!
So thanks jdobbs for this new feature, I now have a 2in1 application!
Hell, I would even consider another donation for this new toy! :)
Thanks jdobbs for a great software and excellent support!
regards / varekai
jdobbs
6th February 2007, 11:57
@therat
Are you sure 640x360 is supported by your player? Does the video playback on your computer?
therat
6th February 2007, 12:03
@therat
Are you sure 640x360 is supported by your player? Does the video playback on your computer?
I've only tried it on my computer so far.
jdobbs
8th February 2007, 00:55
@windtrader
I just accidentally read at another site that the PSP doesn't support B-Frames. If that's so, it's probably the reason your output isn't supported.
If that's the case, you need to add:
bframes=0
to your Profile.
By the way, you added the cmdline="-coder 1 -f psp" to the wrong place. You added it to the REBUILDER.INI file -- it was meant to be added to the MOBILE.INI in the profile(s) you created (just like the bframes=0 I just mentioned) -- I provided an example in post #5.
Try this profile (add it to the MOBILE.INI):
[PSP- Test - mpeg4]
vCodec=MPEG4
muxFormat=MP4
bframes=0
hSize=480
vSize=272
vMaxrate=2500
vBitrate=768
gopSize=300
aCodec=aac
aBitrate=128
AudioAmplify=1.3
ivtc=0
passes=2
cmdline="-f psp"
windtrader
8th February 2007, 04:33
I made the changes to the MOBILE.INI and tried again. Both MPEG4 and H264. Still not playing on player.
Is there any utility that analyzes a video file and prints out all the detail properties? If we could extract all the video characteristics of the ones that play on the PSP, maybe some missing or incorrect settings may come to light.
[PSP-mpeg4]
vCodec=MPEG4
muxFormat=MP4
hSize=480
vSize=272
vMaxrate=2500
vBitrate=768
gopSize=300
aCodec=aac
aBitrate=128
AudioAmplify=1.3
cmdline="-coder 1 -f psp"
bframes=0
ivtc=0
passes=2
[PSP-h264]
vCodec=H264
muxFormat=MP4
hSize=480
vSize=272
vMaxrate=2500
vBitrate=768
gopSize=300
aCodec=aac
aBitrate=128
AudioAmplify=1.3
ivtc=0
passes=2
cmdline="-coder 1 -f psp"
bframes=0
varekai
8th February 2007, 12:59
@jdobbs
Tried H264 settings for my gen5 iPod and the NicMP4Box fix described
in your first post, steps 1-5 but my iPod won't accept the file.
Plays just fine on computer but Itunes 7 won't import any file,
no matter what resolution or settings.
Could you explain in detail, as if I'm a total newbie :o
the procedure of using NicMP4Box?
When I try it only flashes for half a sec and then... nothing?
varekai
jdobbs
8th February 2007, 22:42
NicMP4Box is meant to make the file compatible so it will import. You run it from the DOS command line. It will make an updated copy of the source file -- so if it seems to be running very quickly it probably isn't executing (unless you are testing a very small file).
When you run it you specify in input file (with path) and an output file. The names are up to you -- I just said "OriginalFile.mp4" and "NewFile.mp4" in my example. The output file is the version of the MP4 file that can be imported into the iPod.
I've tested it extensively -- and it works every time for me. I will comment that the iTunes software is pretty slow at importing it, though. It takes about 3 or 4 minutes for a full length movie.
varekai
11th February 2007, 08:52
@jdobbs
Got NicMP4Box working OK now! Didn't know it was so simple, hit "Start/Run/Open"
and just type or copy&paste path + "-add OriginalFile.mp4 NewFile.mp4" and hit "OK"
or "Enter" and Voilą! All done!
Trial&Error is an old friend of mine, maybe a slow one but still a very good friend... ;)
Anyway, NicMP4Box seems to do it's thing. Got it working! :)
Now imports just fine to iTunes and plays fine on my iPod! Needed to upgrade iPod firmware
to 1.2.1, had 1.1.1 before. Subs won't show up though and it looks like only 1 pass is
accepted, if using 2 pass iTunes won't take it.
Another question: is it possible to get NicMP4Box doing many jobs at the same time?
Got lots of mp4 who needs to have signatures added.
Thanks jdobbs for all your hard work! It's very much appreciated!
varekai
NWDaniels91
13th February 2007, 03:52
I don't know if this is the best place to ask this, but does FFmpeg use x264 to encode AVC? Videolan.org's x264 page (http://www.videolan.org/developers/x264.html) lists FFmpeg as using x264, but I am having trouble finding any more info on this.
If yes, is it possible to determine what revision of x264 FFmpeg is using? One reason I like using MeGUI is because I can always be sure I have the latest x264, DGIndex, etc. It will affect my decision on whether to use MeGUI or DVD-RB Pro for my iPod encodes.
Also, a feature request: when doing the "Mobile" encodes, ask what to name the file. It's not a big deal, but I usually don't want to name it the same as the DVD label plus 0001.
vBulletin® v3.8.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.