PS3 DivX wireless playback

Discussion in 'CloneDVD mobile' started by TechKat, Jan 30, 2008.

  1. TechKat

    TechKat New Member

    Hi All,

    I've searched the forums and whilst there are lots of posts around the various aspects of what I am trying to do - there doesn't seem to be any that specifically answer my question.

    I have detailed my questions below and the background to these below:
    a) Is there anyway in CloneDVDMobile to set the "maximum" bitrate above which the encoding will not go regardless of the quality setting?
    b) If a) above is not possible is there any way of seeing what the maximum bitrate used was after the encoding is complete (the video bitrate window says to click for more details on the frame statistics but this doesn't seem to work for me)

    If I'm missing anything obvious then please feel free to point it out. Video encoding is not something I'm that familiar with tbh

    p.s. great product SlySoft

    ---
    Background

    I've been experimenting with archiving some DVD's using CloneDVDmobile for wireless playback using a PS3. Whilst I've used CloneDVDmobile for playback on an Archos previously; these files were always optimised for size rather than quality and were stored locally on the Archos.

    This time I've gone for quality over file size as I'm playing these on a bigger screen. I've selected DivX for the speed and done a few test runs at the higher end of the video slider. However, I'm a bit confused over the "Estimated output" compared to what I actually get....

    For example using a sample 2 hour dvd at maximum quality (_28_) using 720x576 PAL TV resolution. This reports "Estimated Output File Size 2.73GB. 2835kbps" which I thought would be fine over wireless G transmission.

    During encoding the statistics window regularly shows peaks over the 4/5 line and reading elsewhere the scale for this appears to be 10Mbs suggesting an encoding of >8Mbs.

    This also seems to be the case during play back which hits specific segments that cause unwatchable stuttering. Looking at the playback stats indicates that this starts to happen when the feed goes above around 6-7Mbs. Below this and everything is fine with the ps3 hitting the wireless in pulses rather than continuously. This stuttering doesn't occur on playback of the original disks which also regularly go over this limit so I'm assuming it is the wireless struggling to stream the bitrate. So to stream these I need to be able to remove these "peaks" in the bitrate preferably without lowering the quality for the whole session.
     
    Last edited: Jan 30, 2008
  2. AtTheAsylum

    AtTheAsylum Well-Known Member

    Mencoder has an option available called 'vrc_maxrate' when using 'lavc' (libavcodec - used by CD-M when encoding DivX) which seems to be what you're looking for. 'vrc' in this context seems to mean 'video rate control'. The parameters sets the 'maximum bitrate in kbit/sec'. It also requires the use of the 'vrc_buf_size' parameter which sets the buffer size (ie: the period over which the bitrate is averaged) used during the 'vrc' process.

    Here's a demo profile that includes the two parameters mentioned. I've set the maximum video bitrate to 1000kbit/sec. Not sure how well it works though - I have only been able to perform some cursory tests.

    Code:
    [* Generic (DivX/2CH MP3) AVI]
    Res1=320x240
    Res2=480x360
    Res3=640x480
    Res4=720x540
    ResAna1=320x180
    ResAna2=480x270
    ResAna3=640x360
    ResAna4=720x404
    ResAna5=852x480
    AllowNativeTVResolution=1
    VTag=DIVX
    mopts=-audio-preload 0.8 -delay 0.1 -lameopts br=%abrate%
    lavcopts=vcodec=mpeg4:vrc_maxrate=1000:vrc_buf_size=1024
    moac=mp3lame
    Format=avi -noodml
    FileType=avi
    ARate=48000
    ABRate=128
    MVolume=10
    Quality=23
    useMencoder=1
    SubTitle=1
    MaxVBitrate=3000
    
    BTW - the 'MaxVBitrate' parameter in the profile seems to be used by the application to set the maximum values for the quality slide. It doesn't relate to the maximum video bitrate of the resultant encoded video file.

    Edit: The feature is also available when encoding to H264 video :) The two parameters 'vbv_maxrate' and 'vbv_bufsize' work the same way as those detailed above...
     
    Last edited: Jan 31, 2008
  3. profcolli

    profcolli Well-Known Member

    Also you can use a (free) program such as abcAVI tag editor - open your output avi file with it and it will tell you the actual bitrate.
    http://abcavi.tk
     
  4. KnoWei

    KnoWei Well-Known Member

    @AtTheAsylum,
    I'm curious how you reach this conclusion. (Not saying it's wrong, btw.)

    My experience is this. Starting with the Generic DiVX profile; I use the MaxVBitrate parm to adjust my bitrate up to 4700kbps. Typically I set my res to 640x480 (720x404 for widescreen source) and then move the quality slider until it shows a bit rate of 3000kbps or just over. When I check the final encoded file with GSPOT it tells me the bit rate is in the neighborhood of 3000kbps - typically +/- 3% of whatever was set on the quality slider.

    Windows properties on the other hand give all kinds of dubious values for the file which is why I started using GSPOT.

    I'm interested in your findings because it might cause me to change my response to TechKat. :agree:

    @TechKat,
    I think you are right that your video bit rate may be the cause of your problem. However I don't think you are exceeding 3000kbps (3Mbps) unless you have altered the MaxVBitrate parm in the Generic DiVX profile as I've referenced above. I'm assuming you are using the Generic DiVX profile - are you? I've experienced poor video streaming from my NAS to wireless PCs. I believe you will need to go wired in order to play the larger res/high bit rate files.

    Follow this link for an excellent essay (in 2 parts) on streaming video over wireless.
    http://www.smallnetbuilder.com/index.php?option=com_content&task=view&id=27523&Itemid=83

    Also, how did you overcome the 2GB file limit for a DiVX encoded avi file? Have you modified the DiVX profile with the -odml option or is the resulting file size actually less than 2GB? I don't believe Slysoft have implemented the -odml option as a default yet. But I haven't checked for latest version so not 100% sure on that.

    ~KnoWei
     
  5. KnoWei

    KnoWei Well-Known Member

    Here's the profile I use based on Generic DiVX. You can paste this right in to your Devices.ini file and it will show up in your selection list. At least until you upgrade and overwrite your Devices.ini file. :D

    The lines preceeded by "# ORIGINAL" are simply ignored by CDVD-M. I leave them in so you can see the original settings from Slysoft.

    Code:
    [* KnoWei's Custom DivX]
    Res1=320x240
    Res2=480x360
    Res3=640x480
    Res4=720x540
    ResAna1=320x180
    ResAna2=480x270
    ResAna3=640x360
    ResAna4=720x404
    ResAna5=852x480
    AllowNativeTVResolution=1
    VTag=DIVX
    # ORIGINAL mopts=-audio-preload 0.8 -delay 0.1 -lameopts br=%abrate%
    mopts=-audio-preload 0.8 -lameopts cbr:br=256
    # ORIGINAL lavcopts=vcodec=mpeg4
    lavcopts=vcodec=mpeg4:threads=2
    moac=mp3lame
    # ORIGINAL Format=avi -noodml
    Format=avi -odml
    FileType=avi
    ARate=48000
    ABRate=128
    # ORIGINAL MVolume=10
    MVolume=20
    Quality=23
    useMencoder=1
    SubTitle=1
    MaxVBitrate=4700
    
    ~KnoWei
     
  6. AtTheAsylum

    AtTheAsylum Well-Known Member

    KnoWei: No problems :) Happy to oblige :)

    Basically I looked at the command line (which you can get by right clicking on the log window and choosing 'Debugging information') that CD-M uses to encode.

    The bitrate value that you choose when adjusting the slider is sent to mencoder as the 'bitrate' parameter.

    Eg: Encoding to H264, if I choose a resolution of 852x480 and set the Video Quality slider to 37 (maximum allowable) I get an estimate output file size of 54.2MB, 2841 kpbs. The resultant mencoder command line output is:
    Code:
    "C:\Program Files\SlySoft\CloneDVDmobile\apps\mencoder.exe" - -af volume=10 -aspect 16:9 -of avi -oac copy -ovc x264 -x264encopts bitrate=2841:level_idc=41:bframes=3:frameref=2:nopsnr:nossim -vf scale=852:480,harddup -info name="TEST" -ofps 25 -o "D:\test\test.avi"|||c:\tmp\mnc84.tmp
    
    You'll notice that the bitrate sent to mencoder matches that reported by CD-M. Bitrate in this context (ie: mencoder parameter) is the average bitrate not the maximum bitrate.

    The 'MaxVBitrate' parameter sets the maximum value for the quality slider. If I change the profile value from 3000 to 5000 I can now move slider to 62 which equates to 4761 kbps.

    Average bitrate is also what tools such as GSpot report. When you actually watch the video the bitrate at any point in time varies by a large amount. I've seen peaks above 7000 kbps on a video encoded at 2000 kbps.

    You can use other mencoder parameters to control the maximum bitrate if you like. Eg: when encoding to H264 using x264enc use 'vbv_maxrate' and 'vbv_bufsize'.

    TechKat: I think the problems you are experiencing are directly related to the maximum bitrate. I have experienced the exact same problem with my PS3. Intermittent freezing and stuttering when the bitrate goes above 6 -7 mbps when played wirelessly. If I copy the same file to a portable hard drive, plug it into the PS3 and play, the problem goes away :)
     
    Last edited: Feb 1, 2008
  7. TechKat

    TechKat New Member

    Many thanks to you all for the excellent replies - good some stuff here that I will give some extensive testing to over the weekend.

    I've been doing all this using the Generic DivX profile with no custom settings other than changing the quality and res via the front end.


    @KnoWei re 2GB limit.
    Well this is the strange thing - see I thought I would hit that problem having read up on some of the posts on here and seeing that there was a workaround - but it simply worked. I've no idea how or why although I am running on NTFS rather than FAT32 and whilst I confess to not having watched the whole thing through on wireless playback I did fast forward to close to the end to see if something stopped and it didn't.

    Not really knowing where the 2GB limit comes from I'm stuck as to what I've missed or why it worked?

    @AtTheAsylum
    The peaking of the bitrate is exactly what I'm seeing and being reported by the ps3 info so I am going to give your parameters a try as I think they could well sort out my problem.

    Will report back after my next test

    Thanks again to you all :clap:
     
  8. KnoWei

    KnoWei Well-Known Member

    Yes I've observed that behavior in the Q-slider when upping the Devices.ini parm MaxVBitrate=nnnn

    I'll buy that. In fact after more careful review I concur that is exactly what GSPOT is reporting. So how are you measuring or monitoring the actual bit rate at any point in time? That's my real question. :D

    ~KnoWei
     
  9. KnoWei

    KnoWei Well-Known Member

    @TechKat:
    The 2GB is actually an avi container size limit set by the original DiVX developers and not related to your file sytem although I suppose FAT32 restrictions may have been a consideration for the developers at the time. I'm also using NTFS on my encoding machine and use EXT3 on my NAS drives. I'm sure back at the turn of the century no one imagined that disk space would become so cheap. ;) And of course a key objective of encoders was to compress a movie to fit on a 700MB CD-R with reasonably good quality. Then came the OpenDML extension which takes an avi file over 2GB and chunks it up with subheaders at each chunk. Very handy for creating high quality conversions when file size is of less concern.

    As for why your files >2GB are working that is a bit of a mystery. One thing I noticed in my original tests was that I could set the Q-slider for a bit higher than 2GB but the resulting file was actually just under 2GB. If your final file size is truly larger than 2GB then perhaps the PS3 is a forgiving player. My own experience was I could not get any .avi larger than 2GB to even load on the DiVX player I'm using until I started encoding using the -odml option.

    Search for OpenDML in this forum and you'll find my post with the test details. I would have paste a link but forum is causing me fits tonight and keeps giving me page not found errors.

    Good luck with your experimentation and keep us posted on what you find.

    ~KnoWei
     
  10. AtTheAsylum

    AtTheAsylum Well-Known Member

    I monitor the actual bitrate two ways :)

    On my PS3 if I press the display button on my remote while a video is playing it tells you the current bitrate. This is what I first looked at when I experienced the stuttering I talked about above.

    On my PC I use a nifty tool called 'Media Player Classic' (came with the K-Lite Codec Pack) to test my encoded videos before playing them on the PS3. If I choose the option View -> Statistics it displays both the average and current bitrates below the video as it plays :)
     
  11. KnoWei

    KnoWei Well-Known Member

    Someday I too will add a PS3 to my menagerie of networked devices. :agree:

    Sounds very useful. I'll look for something like that I can download. Thanks for the reply.

    @TechKat:
    Here is the thread I couldn't get to last night that explains my journey to the shores of OpenDML and the land of the really big avi file.:)
    http://forum.slysoft.com/showthread.php?t=11311

    ~KnoWei