High quality options for streaming to PS3

vbimport

#1

I’d like to take my favorite DVDs from my collection and make them into compatible files for steaming to the PS3. I already have streaming ability built in to my NAS box (Synology). I’m viewing the movies on a 52" 1080p HDTV with matching Dolby 5.1 and HDD storage space is not a concern. My PC is currently a Pentium 4 - 3Ghz so processing time is a concern.

Here are some of the options in DVD Fab Mobile and my experiences. Source in all cases is 480p 23.976fps with soft Telecine 3:2 Pulldown (a.k.a. 480i 29.970fps NTSC Film). Since quality was very important, the bitrate selected was always the highest possible. Streaming is over wired connection that routinely can handle 1080p content.

Playstation 3 Profile (mp4)

[ul]
[li]BAD: Encoding is very time consuming (~13fps)[/li][li]BAD: Only offers 2-channel AAC. FYI, I’ve used other programs to get 6-channel AAC but it is never as good as the original AC3.[/li][li]BAD: Playback is jerky[/li][/ul]
Generic avi h264 audiocopy

[ul]
[li]BAD: Comes up as unsupported on PS3[/li][/ul]
Generic avi xvid audiocopy

[ul]
[li]GOOD: Processing time (~55fps)[/li][li]GOOD: Dolby 5.1[/li][li]BAD: PS3 halts playback in places where original source had a frame order change of some sort (workaround is to fast forward past it).[/li][li]BAD: Added artifacts on dark colors and some edges[/li][/ul]
Generic mkv (any)

[ul]
[li]BAD: Container not supported by my UPNP server. MKV is only supported by one UPNP server that I am aware of.[/li][/ul]
Vob Stream Copy

[ul]
[li]GOOD: Original content stream with Dolby 5.1[/li][li]BAD: Frame judder due to 480i 29.970fps Telecine.[/li][/ul]
Even though most DVDs are made of 480p 23.976fps content, I have been unable to find a simple utility that will throw out the extra pulldown frames and leave the 480p 23.976fps frames. The best I can do is run it through mencoder using pullup and softskip to strip the extra frames but that involves a small loss of quality from re-compression. However, once the content is at 480p 23.976fps it plays without judder on the PS3 as a VOB.

I’m not picky about the container or codec used. My goals are simple:

[ul]
[li]Maintain the video quality of the original DVD.[/li][li]Keep the 5.1 channel AC3 Audio[/li][li]Streamed to the PS3 from my NAS[/li][/ul]
At some point Sony may update the PS3 to upscale streamed MPEG2 the same way as it plays DVDs. This would remove the frame judder issue from vob stream copies.

Suggestions are welcome.


#2

VOB Passthrough is much much faster, no audio issues. Lean on Sony. :slight_smile:


#3

I totally agree. I’ve been making single VOB files with IfoEdit for some time now. BTW, given that the files are not actually re-encoded and that the files are not really suited for a “mobile” device, I’m not sure DVDFab Mobile is the correct placement for the feature.

Yes, but this is kind of like pushing my car down the street sideways. I will probably have much better luck formatting the files the way the PS3 will play them correctly.


#4

LMAO
I think VOB Passthrough is where it is because all the DVD to DVD modes produce DVD-compliant output and it doesn’t. I guess it sort of fell into DVD to Mobile, and I have actually used it to put a couple of movies onto my Archos.

Your goals are simple to list but difficult to achieve with a PS3, particularly with its apparently less than adroit handling of the framerate/pulldown issues. I don’t have one to experiment with, but there are quite a few DVDFab users that are streaming content to their TVs with PS3s and in other ways. Perhaps some of them will see this and share their experiences. Good luck with Sony :).


#5

After lots more research and quite a bit of trial and error, I have arrived at a solution that is 95% what I was looking for. It is not the easiest of solutions but I’ll detail it here for other video quality nuts like me and in the hope that what I have figured out will inspire a DVDFab developer. I am now able to create a vob file without frame judder and minimal quality loss. In fact, on many movies the end result looks better than the original DVD because of noise reduction.

The principal cause of frame judder on the PS3 with a 60Hz (or 120Hz) display is the conversion from 24fps (NTSC Film) to 60fps (1080p). The PS3 does know how to do this properly, but it gets confused when an MPEG2 file with 480p 23.976fps Film content has been soft Telecined with 3:2 Pulldown to make it 480i 29.970fps. Telecine was necessary on old DVD players feeding Interlaced NTSC TV sets. With today’s HDTV sets telecine is no longer required and, besides that, the PS3 as well as most modern players can easily create the interlace information on-the-fly if necessary. The solution (until Sony fixes the PS3) for those of us with large 1080p displays is to remove the extra soft telecine information to reveal the original 24fps Film.

The following is ONLY for DVD movies that have soft telicine and would not work for something like a TV show on DVD that was originally produced as interleve content. If you are unsure, open one of the main movie VOB files in Gspot once you have ripped it to the hard drive. It should have Pics/s of 23.976, Frames/s of 29.970, and Fields/s of 59.94 in the middle right section. If it doesn’t then this process is unlikely to help and a straight vob stream copy in DVD Fab Mobile would be a better choice.

The solution I am using is Mencoder which is part of the open source MPlayer project. For those of you that are already familiar with mencoder here is the full command that I usually put in a batch file:

c:\Movies_tools\MPlayer-1.0rc2\mencoder.exe dvd://1 -dvd-device “C:\Movies\FullDisc\MY MOVIE\VIDEO_TS” -oac copy -vf filmdint,hqdn3d,scale=1280:-2 -ovc lavc -lavcopts vcodec=mpeg2video:vqscale=2:vbitrate=8000:autoaspect:threads=2 -of mpeg -ofps 24000/1001 -mpegopts format=dvd:tsaf:vframerate=24000/1001 -o V:\My_Movie.vob

Now lets delve into whats important here and how you can modify the line to fit your needs:

c:\Movies_tools\MPlayer-1.0rc2\mencoder.exe

Update to where you saved MPlayer.

dvd://1 -dvd-device “C:\Movies\FullDisc\MY MOVIE\VIDEO_TS”

This part tells Mencoder the content you want to convert.

[ul]
[li]If you already have a stream copied vob file then replace this entire section with the path to that file.[/li][li]The “1” after “dvd://” is the title you want to convert (almost always 1). In DVD Fab Mobile you can easily see which is the correct title because it will usually default it for you.[/li][li]The “-dvd-device” is the rip folder of the DVD after DVD Fab or a direct DVD drive if the content does not have CSS protection.[/li][li]You can add “-chapter x-y” if you only want to do one or some of the chapters (x = start chapter, y = end chapter, use “2-2” if you only want chapter 2).[/li][/ul]

-oac copy

This part tells Mencoder to include the original audio track from the DVD (usually AC3 5.1). If the Dolby audio track that you want is something other than the first, you’ll have to add a command to identify which one. The documentation says it’s something like “−aid 128” but I haven’t tried it yet.

-vf filmdint,hqdn3d,scale=1280:-2

This is where the fun starts. The “filmdint” filter is what does the work of removing the soft telecine. The problem is that in order to run this filter Mencoder decompresses the MPEG2 video frames. In order to return the content to a VOB file we are later going to need to recompress the frames back to MPEG2 and this is where the wheels fall off. Detail was lost in the original compression from movie film capture to compressed MPEG2 video. Decompressing and then recompressing the video, even at the same bitrate results in more degredation and an amplification of compression artifacts (kind of like the digital version of a VHS to VHS copy). To help compensate, we add the “hqdn3d” filter which does high quality noise reduction

Next we use a little trick similar to what graphic artists use when recompressing JPEG images, "scale=1280:-2 ". This scales the image from 480p to 720p before it is recompressed resulting in marketedly reduced compression artifacts. On first glance you might think this would make the resulting MPEG2 stream overly large but in practice the result is slightly smaller than the original. One reason is that we gain a 20% reduction in file size by dumping the unneeded Telecine frames. The second is that although we are increasing the image size, we are not really making new information so the new image has higher compressability. Keep in mind that the destination device for the content is a 1080p HDTV so the content is going to be upscaled even further. I tried upscaling all the way to 1080p which works but my UPNP server wasn’t able to keep up with a 1080p MPEG2 stream.

-ovc lavc -lavcopts vcodec=mpeg2video:vqscale=2:vbitrate=8000:autoaspect:threads=2

This part of the string tell Mencoder to recompress the resulting video into MPEG2. The “vqscale=2” keeps the quality to a maximum, “vbitrate=8000” is the maximum for a compliant DVD MPEG2 stream, “autoaspect” tries to maintain the aspect ratio of the original, and “threads=2” allows you to take advantage of more processor power if you have it available (modify this last setting based on your computer’s ability).

-of mpeg -ofps 24000/1001 -mpegopts format=dvd:tsaf:vframerate=24000/1001

This part of the command specifies the output container format information including 23.976fps output (“24000/1001”) in a dvd compatible way. I’m not sure that “tsaf” is required, but it seems to be included in most of the examples I see.

-o V:\My_Movie.vob

The last part is the destination file. In this case I am writting directly to my NAS server which slows things down a little but saves me the trouble of copying the file later. Make sure the file extension is “vob” and that the save destination does not have a file size limitation (i.e. FAT32).

The result is a very crisp 720p 23.976fps VOB file. The only place I can find on-screen degredation that isn’t in the original source is a slite jagged edge on diagonal lines (like a capital “A” in the opening credits). My suggestion to those looking for a good test for image degredation is the first chapter of the movie “Stargate - Ark of Truth”. It opens with sideways and forward pans among mountains with the openning credits overlayed which gives lots of edges and dark spots to see judder and pixalation.

I hope someone finds this useful. It took a great deal of time to figure out. Of course, with my luck tomorrow Sony will fix the playback judder themselves.


#6

Congratulations! I can only say that your solution lived up to your username :bigsmile:.
And [B]special thanks [/B]:clap:for sharing this solution with your fellow DVDFab users here in the forum.
There are what were once good reasons for NTSC being the way it is, but they have long ago lost most of their relevance, leaving behind only their consequences to be dealt with as you did. Users interested in Mplayer can find more information here.
A Windows UI front end that also allows command line control is available here, and there are several others. I have not tried either.


#7

I’m not sure about the NAS box, but I use TVersity to stream to my PS3,
and I’ve yet to see (knock on wood) " playback judder" probs… guess I’m lucky eh!..I stream HD,SD content which play flawlessly(to my eyes) in my 61" 1080p DLP…:wink:


#8

UPDATE: Add the following in front of “-oac copy” to select the Dolby 5.1 English audio track.

−alang en −channels 6

BTW, the only downside to this process is that it takes a bit of processing time. I don’t mind as much since I can put several commands in a batch file and let it run. I’d like to do the same thing with DVD Fab for my TV episode discs that I convert to Xvid but I’m still waiting for DVD Fab to allow multiple tasks of the same type and tasks from multiple sources.


#9

[quote=t0nee1;2057280]I’m not sure about the NAS box, but I use TVersity to stream to my PS3,
and I’ve yet to see (knock on wood) " playback judder" probs… guess I’m lucky eh!..I stream HD,SD content which play flawlessly(to my eyes) in my 61" 1080p DLP…;)[/quote]

The problem is not a streaming issue, although TVersity could be doing something to mitigate the problem. Are you using VOB content from DVDs? If so, maybe you can try burning one of the files onto a DVD data disc and play it directly from the PS3.

I never have a problem with Xvid, H264, and Divx content because it has already been converted to a single FPS as either interlaced or progressive. However, converting to one of those formats while retaining the original quality is either impossible or ridiculously processor intensive. The problem is with DVD content which kind of bolts on Interlace frames to progressive content to make it NTSC compliant.


#10

Complication wrote’
“the problem is not a streaming issue, although TVersity could be doing something to mitigate the problem.”…
Most certainly, as I can stream or burn and play as data disc,no issues…BTW I thought the latest PS3 firmware update had issues with
Xvid,h264 ? before that I had no probs/issues streaming h264 content…haven’t tried lately though!..


#11

If you can burn the VOB file as a data disc and you do NOT get the judder issue then the problem does not exist for you and TVersity is not doing anything to fix it. It is possible that your DLP TV is able to remove the judder before presenting it.

Xvid content created by DVDFab works ok but will die at points. H264 only seems to work with AAC 2-channel audio in an MP4 container. Dixv6 HD content looks great but doesn’t seem to be supported by many encoding programs. And yes, I do have the latest PS3 firmware.

DVDFab is one of the very few programs that I have actually purchased. I think they do a great job. My hope is that they will come out with a new section called “Lossless” or “High Quality” rather than “generic” in which the defaults are designed to give you output that is as good as the original or as close as possible. It isn’t that you can’t already do something similar by cranking the bitrate or quality setting to maximum on each of the codecs. Rather, it is the thought that goes into the development when the goal is files with no quality loss. I am sure there are people that work on DVDFab with intricate knowledge of video encoding and they would likely come up with background tweaks that achieve minimal quality loss and maximum processing efficiency given the task.


#12

I hope so too as I want high quality streams from h264 so that I can rip my DVD collection on my central server and then stream the high quality output to Network Media Tank devices (Popcorn Hour A-100, Tvix, etc) on the LAN

Paul


#13

My solution was somewaht simpler…and works 100%…not sure I lose a thing either…

Just use DVDFAB to copy ‘mainmovie’ but store the files on your HDD and not another DVD.

Grab a copy of VOBMerge (google it to find it!) and just 'merge all the VOB’s into a single VOB …rename it to .MPG … and just stream it to the device of your choice…

It works quite happilly on my PS3 and TV 50" Sony 1080p… Also on my streaming Philips box whicjh normally cant handle anything…all streamed off my Vista PC from Media Player (not Media Center which i detest).

All works for me…I tried this becuase all the mobile options were so inconsistentand I wanted to retian as much quality a spossible…oh disk space is cheap too so 2Gb or 4GB doesn’t bother me…

Entire process takes about 15 minutes per DVD…

Enjoy…


#14

This is similar to VOB Stream copy in DVDFab Mobile except that you will get all audio tracks copied rather than just the one(s) you want. You would also need to figure out which VOB set is the right one (widescreen, fullscreen, extras) where DVDFab makes that easy.

You are quite lucky that you don’t get or don’t notice frame judder with direct VOB playback. It mostly appears on film content (e.g. movies) and can be quite unwatchable when it happens.


#15

First off, I have to give out a huge THANK YOU for this information Complication!! The judder has been bugging me to death, and I have found nothing else on how to address this problem.

I do have a problem that I can’t figure out. I am using the following steps to rip DVDs to VOBs to MPGs for PS3 streaming: http://funkysquid.net/audiovideo/34-howto/44-ripdvdstompgs. I am using DVDFab Decrypter 4 to create the VOB set. When I use mencoder.exe as you described on either the VOB set before it is combined or the resulting combined VOB set, it always has a problem before it finishes. For example, I got an error just now (after 1 hr 15 min) of “Couldn’t realloc frame bufer(idx), abort 6 min 3558MB A-V:-0.022 [7274:448] PARSE_MPEG12: add_frames(20464) failed, exit”. When the resulting VOB is created, it looks great on the PS3 as you said until it gets to around the spot where the error occured, then the picture freezes on that frame and the sound keeps going. The original VOB plays just fine, but the one that mencoder creates (of course) has the problem. I have tried this on 3 different movies with similar results on each one (somewhere near the end, it bombs). For a particular input VOB, the error always happens in the same spot. Any idea why? Have you had similar problems with mencoder?

I have 30 GB free of HDD space and 1GB of RAM running on Vista so, I shouldn’t have a problem with memory. I am assuming it is a problem with mencoder.exe, but could it be the original VOB sets created by DVDFab?


#16

I am having an issue with one particular title, but I’m not sure it is the same issue or not. The error you are getting is from the MPEG muxing code. I haven’t seen the error on my side, but I wasn’t looking for it so I could have missed it. I have the a similar issue; the movie stops playing video at a particular point in the file but continues with the audio. This is the first time I’ve had the problem. Other movies play fine to the end. Just to be sure, what version of mencoder are you using? Execute mencode.exe without any parameters if you are unsure.

The interesting thing is that when I play the movie it is listed as the correct length (maybe because the audio keeps going). However, when I play the file on my Popcorn Hour, a jump to the 90% position (one of the button options) jumps to 90% of the playable video rather than 90% of the runtime.

In looking at the source code, mencoder seems to be dependent on a variable called “vbuf_size” for the muxer. The default value for DVD is 232 and I have read that when doing HD (which we are since we are creating 720p) the value should be more like 400. Add “:vbuf_size=400” to the end of the “-mpegopts” settings so that the section reads:

-mpegopts format=dvd:tsaf:vframerate=24000/1001:vbuf_size=400

I’m going to try it too, but my PC is slow.


#17

Mencoder.exe version: 1.0rc2-4.2.1

I just kicked off one of my failed conversions with the added parameter now. I’ll post the results when it finishes.


#18

[quote=shaggyjb;2062957]Mencoder.exe version: 1.0rc2-4.2.1

I just kicked off one of my failed conversions with the added parameter now. I’ll post the results when it finishes.[/quote]

The change in vbuf_size fixed my problem movie. Hope it did for you too.

I also found 2 other changes to try that may or may not improve the video quality. I am still trying to get rid of some jagged edges on diagonal lines and people’s faces. The default scaler is bicubic but I have read that it is better to use bilinear when upscaling. If you’d like to try bilinear then add “-sws 1” to the command line. I added it just after the filters like this:

-vf filmdint,hqdn3d,scale=1280:-2 -sws 1

While trying to find a fix for video stop problem I read a back and forth between a few video nuts (like me). They seem to think that allowing multiple threads (e.g. “threads=2”) causes more distortion then the documentation would lead one to believe. Unfortunately, I loose about 25% in frames-per-second processing speed when disabling thread support.

I’m running tests overnight with/without threads and bicubic/bilinear combinations to see what looks better.

I’ve gotten in the habit of looking for the encoding errors while watching a movie, but when I step back and look at the video created by this process I am quite impressed already. Even if Sony fixes the PS3 judder issue, I may keep processing the moves this way because of how good they look.


#19

Yes, this fixed it, and it looks great. The movie size for grew from 3.7 GBs (original) to 5.8 GBs after the conversion. Again, thanks for your help!! I am very surprised more people aren’t seeing this problem.

I am going to be very surprised if bilinear looks better than bicubic. Depending on the implementation of bicubic interpolation, this is typically a superior way to upscale as it uses more of the original data to compute the output data. Bilinear is very simple as it just uses four data points and a simple weighted interpolation to create each output pixel. One potential downside to bicubic are defects similar to sharpening defects (ringing), but overall, most people prefer bicubic over bilinear. The “jagged” lines that you are seeing are likely very similar to jagged lines that you get from sharpening an image like text. When those lines get smoothed out, so will other features of the image that you will likely prefer to be sharp.


#20

[quote=shaggyjb;2063180]
I am going to be very surprised if bilinear looks better than bicubic. Depending on the implementation of bicubic interpolation, this is typically a superior way to upscale as it uses more of the original data to compute the output data. Bilinear is very simple as it just uses four data points and a simple weighted interpolation to create each output pixel. One potential downside to bicubic are defects similar to sharpening defects (ringing), but overall, most people prefer bicubic over bilinear. The “jagged” lines that you are seeing are likely very similar to jagged lines that you get from sharpening an image like text. When those lines get smoothed out, so will other features of the image that you will likely prefer to be sharp.[/quote]

You’re right, bilinear was not better. No threads did make a difference if you can stomach the reduction in processing speed.

Next up is cropping. I don’t care much about file size, but the process is currently wasting time compressing and storing the black bars. It also increases time for the filters and scaling. Again, this is where I wish DVDFab had better options for cropping and scaling. I cannot seem to get DVDFab to crop out the top and bottom bars without also cropping the width.

This may be just a reporting error on DVDFab. I start with widescreen content encoded at 720x480. If I disable auto-cropping then DVDFab reports 720x404 on DVDFab Mobile. If I turn on auto-cropping then DVDFab reports that it is going to chop 0 on the sides and 60/62 for top/bottom. The final resolution reported is then 704x294 (WTF?). When I use crop detection in mplayer it comes back as 720x352 starting at 0x64. DVDFab doesn’t have a MPEG2 output option other than VOB copy so maybe this has to do with square vs. rectangular pixels or something. Again, this is one of those areas where a DVDFab HD product with accompanying developer focus might solve the problem(s). I’m fine doing the research but at the end of the day I want to click a few buttons and just watch the movies.

If you would like to try cropping to increase processing speed and decrease file size then run mplayer with crop detection:

c:\Movies_tools\MPlayer-1.0rc2\mplayer dvd://1 -dvd-device “C:\Movies\My Movie\VIDEO_TS” -vf cropdetect
Let it run long enough that you are into the main movie (you can also added something like “-chapter 3” if you don’t want to wait). You should get output that looks like this:

[CROP] Crop area: X: 0..719  Y: 59..417  (-vf crop=720:352:0:64).

Luckily, one of our existing filters can do the crop on-the-fly. Copy the “crop=” with the four numbers and add it to the “filmdint” part with an equals. That section should look like this:

-vf filmdint=crop=720:352:0:64,hqdn3d,scale=1280:-2

For those of you playing along at home, here is the current command without cropping:

c:\Movies_tools\MPlayer-1.0rc2\mencoder.exe dvd://1 -dvd-device “C:\Movies\My Movie\VIDEO_TS” -alang en -channels 6 -oac copy -vf filmdint,hqdn3d,scale=1280:-2 -ovc lavc -lavcopts vcodec=mpeg2video:vqscale=2:vbitrate=8000:autoaspect:keyint=10 -of mpeg -ofps 24000/1001 -mpegopts format=dvd:tsaf:vframerate=24000/1001:vbuf_size=400 -o V:\My_Movie.vob