Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

PS3 and mediatomb performance

2010-01-02
2013-05-30
  • Hi,
    I am using mediatomb 0.11.0-3 (debian stable 5.0). With a PlayStation 3.  So far so good. i am able to see mostly all files. But it takes forever. I am unable to whacth videos without little stops. I want to see where actually is the performance bottle neck. Any hints?

     
  • Jin
    Jin
    2010-01-02

    Well, let's look at the usual suspects

    - are you using wired or wireless? If you're on wireless make a check with wired, just to be sure
    - do you use transcoding? if yes, is your CPU fast enough to keep up with your transcoding settings?

    Otherwise I do not really see a reason for those stops, we have users who run MediaTomb on NAS devices and watch HD movies on their PS3s, so at least you know - it should be possible to make it work :)

     
  • Ed Silva
    Ed Silva
    2010-01-08

    Let me guess, the files that stutter are mp4 video? But divx/avi files work just fine?

    There is a bug in the PS3 DNLA client that saturates the bandwidth when trying to stream mp4 files. Even a small mp4 file will stutter and pause. It's not just with mediatomb either.

    I know this has been mentioned many times on the PS3 forums, but I don't know if Sony has acknowledged it or not.

     
  • headrush69
    headrush69
    2010-01-09

    Weird, I have a collection of about 200 movies in mp4 format and everything streams perfect on my PS3.

    Is that for a specific firmware version maybe?

    And saying mp4 alone really is pretty vague since encoding options can vary so much.

    What level profile? Variable bit rate, constant bit rate…?

     
  • Hi,
    Sorry for this late reply. I am using wireless, on the P3 Menu to test the conection.
    I have a 65% strength signa, but the download rate is 1.9 Mps is that good enought?.
    The system is a CoreDuo and I did not notice CPU problem. Plus I am seeing the problem when displaying pictures as well. So I guess that trans coding is not the problem.

     
  • Jin
    Jin
    2010-01-10

    I can't tell you anything what is "enough" or not "enough", I suggest to simply make a test using a wired connection and compare the results, I think it's the easiest thing that you can do. If you see that it performs fine on wired, then you immediately know that wifi is the problem…

     
  • headrush69
    headrush69
    2010-01-10

    Bit rate of movies can fluctuate significantly especially using x264 options like CRF (constant rate factor). In this case the encoder increases the QP (Quantizer Parameter) in high motion scenes which results in higher bit rates. I have often seen movies playing that go over 1.9Mps.

    Wireless is just not the best good choice for video streaming. Throughput is just not constant and can vary.

    Your best beat is probably to transcode everything using the appropriate options to force a lower constant bit rate that your wireless network with buffering can handle flawlessly.

    Whether the output is good enough for you is a personal call.

    For me even if it happens occasionally, pauses/stuttering/skips during playback is unacceptable. I bit the bullet and found a way to install gigabit ethernet and so glad I did.

     
  • Tux68-Hamburg
    Tux68-Hamburg
    2010-01-11

    Wireless often stutters, a music stream is enough to hear such things if the radios did not buffer a lot to fix that. 1.9MBit isn't much, normally a sd mpg2 did reach 2MBit and will stutter. I got breakless streams only with lan devices, the wlan between router and laptop / radio break sometimes. My nas will send 9MBit over lan, could be more with a gigabit switch.

     
  • sscc
    sscc
    2010-01-15

    I notice a huge bottleneck in the transfer speeds of a mediatomb server to ps3.

    Background:

    I have a very power system: Hostname: true - OS: Linux 2.6.32.2-grsec/x86_64 - CPU: 4 x Intel(R) Xeon(R) (2833.398 MHz) memory usage: 833.76MB/8002.90MB (10.42%) - Disk Usage: 2084.44GB/3423.62GB (60.88%) running Mediatomb 0.11.0-3 (.deb package) on a GIGABIT wired connection.

    I am transcoding via FFMPEG mkv files on the fly with the following script:

    #!/bin/bash
    INPUT="$1"
    OUTPUT="$2"
    VIDEO_CODEC="mpeg2video"
    #VIDEO_BITRATE="16384k"
    VIDEO_BITRATE="32768k"
    AUDIO_CODEC="ac3"
    AUDIO_BITRATE="384k"
    AUDIO_SAMPLERATE="48000"
    AUDIO_CHANNELS="6"
    FORMAT="dvd"

    exec /usr/local/bin/ffmpeg -threads 4 -i "${INPUT}" -vcodec ${VIDEO_CODEC} -b ${VIDEO_BITRATE} \
    -acodec ${AUDIO_CODEC} -ab ${AUDIO_BITRATE} -ar ${AUDIO_SAMPLERATE} -ac ${AUDIO_CHANNELS} \
    -f ${FORMAT} - > "${OUTPUT}" 2>/dev/null

    This works great for a majority of 1080p videos.  However, when the bitrate gets very high (for detail scenes), there is a stuttering.  I checked all my hardware and bandwidth across my network, all very low.  Very strange.

    I then ran a test where I copied the MKV file from my server to my ps3, and it was going 2-3 MB/sec.  I copied a .AVI file from my server to ps3, it went between 7-9mb/sec.  Still very low, but faster than the MKV copy.

    My question, which I believe relates to this topic, is why is the transfer speed and the streaming speed between the server and ps3 limited to such slow speeds?  It is impossible for this to be related to anything besides:

    1. Mediatomb
    2. UPnP (somehow)
    3. PS3 limitations

    I am very confused by all of the above.  I also do not have a windows box to test other solutions, like tversity or ps3mediaserver.

    Please shed some light on this.

    Thanks,
    Scott

     
  • Sorry,
    did you said that you have the PS3 plugged on the gigabyte Network?

     
  • sscc
    sscc
    2010-01-15

    Yes

     
  • Jin
    Jin
    2010-01-16

    > I then ran a test where I copied the MKV file from my server to my ps3, and it was going 2-3 MB/sec. I copied a .AVI file from my server to ps3, it went between 7-9mb/sec. Still very low, but faster than the MKV copy.

    How exactly did you do this test?

    From my perspective there could be three scenarios.

    First - maybe the transcoding buffer is running dry? I.e. on high bitrate scenes it gets read out by the player faster than data is coming in from ffmpeg. I know, you were saying you have a very fast machine and so on, but it still possible that ffmpeg chokes on some scenes and just needs more time.

    Here it would be helpful to actually watch the buffer, if compile with debug mode (if you run 0.12 you could already try the -debug option without recompiling), you should see the buffer fill levels printed in the terminal/to the log file when transcoding takes place. So you should be able to see if the buffer is always full, or if it is running dry on the stuttering scenes.

    If this is the case, you could try to increase the buffer and hope, that on lower bitrate scenes it will get filled "into the future", which would help you to seamlessly survive the high bitrate scenes.

    Second scenario - MediaTomb is not serving the data fast enough. Now, that'd be quite easy to check, have a look at the Cidero point in the FAQ, look up the URL of the object in the XML and simply try to download that url using wget from another machine on your network. Try it without transcoding, we just want to see how fast data is coming from MediaTomb and if that would generally be enough for your use case. Once you get the approximate measurements from wget (or you could also use curl), you could try and calculate - what's the bitrate of our transcoded output and is the speed fast enough to get it over to your player.

    Third scenario is similar to the second, but now with transcoding involved, maybe there is some bottleneck in this "chain" that we build up to pipe the data through the transcoder. You could try and setup a transcoding profile that basically does nothing, i.e. dd if=%in of=%out and try the wget test again. Of course the results here will be slower and you could also try to play around with chunk size values, but here you should also be able to measure and then calculate if it is enough or not.

     
  • Hi,
    well in my scenario the trouble is the wireless link. I did download Cidero and got a url to test using wget.

    - on the same machine  17,1 MB/s
    - laptop by the Access Point 2,25 MB/s
    - laptop by the PS3 0,6 MB/s

    The trouble is that wifi negotiate  5Mb instead of 54Mb (plus

     
  • headrush69
    headrush69
    2010-01-18

    sscc, what size are those files you are transferring to test network speed?

    My guess is you are using the GUI output from what ever client you are using for the file transfer to determine the throughput?

    Either way it's not a good measurement. I would suggest using iperf which is a quick simple compile on any platform and finding out if your network is truly performing at the level it should. (after testing mediatomb as stated above)

    If you are only getting <10Mbps something is truly wrong.

    P.S. Are you using jumbo frames, and do you have any devices that DON'T support them?