HDTV (S2) channels: Stuttering video on Live-TV & Recorder TV (1 Viewer)

cp9999

Portal Member
April 13, 2008
7
4
Home Country
Netherlands Netherlands
TV-Server Version: 1.0 RC1 (multiseat)
MediaPortal Version: 1.0 RC1
MediaPortal Skin: Blue Two
Windows Version: Windows XP SP2 (both server & client)
CPU Type: Server: P4 3.4GHz HT / Client: AMD Athlon 64 X2 4800+
HDD: Samsung HD501LJ, SP1213N
Memory: 2GB
Motherboard: Client: Asus M2N-SLI Deluxe
Video Card: Client: Gigabyte, nVidia 7600GT
Video Card Driver: Forceware 169.21
Sound Card: Onboard, Soundmax HD Audio
Sound Card AC3:
Sound Card Driver: Soundmax 5.10.1.4530
1. TV Card: Server: FloppyDTV-S2
1. TV Card Type: DVB-S2
1. TV Card Driver:
2. TV Card:
2. TV Card Type:
2. TV Card Driver:
3. TV Card:
3. TV Card Type:
3. TV Card Driver:
4. TV Card:
4. TV Card Type:
4. TV Card Driver:
MPEG2 Video Codec: MPV Decoder Filter
MPEG2 Audio Codec: AC3 Filter, 1.11
h.264 Video Codec: CoreAVC 1.7
Satelite/CableTV Provider:
HTPC Case: Antec Solo
Cooling:
Power Supply:
Remote:
TV:
TV - HTPC Connection: Component

I am using multiseat setup. On the client, Mediaportal is running fullscreen on my second monitor (is HDTV).

When I am watching HDTV channels (both Live TV or Recorded TV) the fps drops to an avg of approx. 20 fps (in stead of the required 25 fps).
The cpu load on both the server (<15%) and the client (max. 60%) does not appear to be the problem. Watching the recorded streams from a network share using MyVideos is perfectly smooth at 25 fps (CoreAVC 1.7 & AC Filter codec set for both Movie Player & Television).

Using different codecs seems to make no difference. Also disabling antivirus and firewall (both server & client) does not change anything (except the cpu load is further reduced).

I have included my log files. I have executed the following scenario:
1) Start watching Live TV & started manual recording
2) Stopped recording
3) Watched the recorded program
4) Goto MyVideos and viewed the recorded program from the network share (actual location where it was stored by the TVServer)

During this process I have monitored the network usage and I noticed that the network usage is limited to approx 12 Mbps when watching Live TV / Recorded TV, where the stream requires about 15-20 Mbps to play at 25 fps. (I am using a wired 100Mbps network).
The network usage is not limited when using MyVideos. I have also included a snapshot of the network usage graph. It shows network usage for respectively LiveTv, Recorded Tv and MyVideo playback.

P.S. I have Timeshift location set on a dedicated physical drive.
 

Attachments

  • Networking.jpg
    Networking.jpg
    64.2 KB

Paranoid Delusion

Moderation Manager
  • Premium Supporter
  • June 13, 2005
    13,062
    2,978
    Cheshire
    Home Country
    United Kingdom United Kingdom
    Make sure you have the amd dual core optimizer installed, this can cause stuttering with any X2 processor.
     

    cp9999

    Portal Member
    April 13, 2008
    7
    4
    Home Country
    Netherlands Netherlands
    Didn't have that installed.
    Just installed it, but it makes no difference.
     

    cp9999

    Portal Member
    April 13, 2008
    7
    4
    Home Country
    Netherlands Netherlands
    Did some additional testing today, using two clients simultaneously.
    I used a recorded program (soccer match from Premiere HD) that requires 17-20 Mbps to play at 25 fps.

    1) Played the recorded program using MyVideos on both clients.
    Network usage on server: 35-44 Mbps, both client excellent.

    2) Played the recorded program from MyTV - Recorded TV
    Network usage on server: 15 Mbps,
    Network usage on each client approx. 7-8 Mbps, Both play with 10-12 fp

    3) Played using MyTv from one client, using MyVideos on other client
    Network usage on server: 30-35 Mbps
    Network usage on MyTv client: max 15 Mbps,
    Network usage on MyVideos client: 70-20 Mbps, perfect quality
    (no difference when switching clients)

    Noticed something else with scenario 3. With MyTv-Recorded TV, the recorded program is also played without dropping any frames, it just plays slower.

    The problem seems to be that the total streaming capacity of the StreamingServer is limited to 15Mbps on my setup.

    Is there anyone else having the same problem?

    Any help would be appreciated.
     

    cp9999

    Portal Member
    April 13, 2008
    7
    4
    Home Country
    Netherlands Netherlands
    I have looked into the StreamingServer project myself (I am a professional software engineer).
    My problem is caused by the way winsock usage is implemented.
    1) I noticed that the StreamingServer.dll is linked with winsock32.lib (which is for winsock version 1.1) in stead of ws2_32.lib.
    2) The 15 Mbps limitation when using multiseat setup (on my server PC, pentium 2.4 GHz HT processor, 1.5GB RAM) is caused by the winsock function call 'sendto()' which just takes to much time to execute.

    I have made a test version using winsock sockets in Overlapped I/O mode (needs winsock version 2). With this test version the 15Mbps streaming limit is gone. I tested with 2 simultaneous clients and the StreamingServer seems able to supply both clients with the correct data (network throughput 35-40 Mbps).

    If any of the developpers want's to have some additional information, just send me a PM.
     

    Olli0815

    MP Donator
  • Premium Supporter
  • August 22, 2006
    182
    17
    Hi Chrisjan,

    i have the same problem. Maybe you can explain in detai what to do, to get it working....


    Regards,
    Olli
     

    cp9999

    Portal Member
    April 13, 2008
    7
    4
    Home Country
    Netherlands Netherlands
    Hello Olli,

    I have created my own version of the StreamingServer.dll.
    The changes I made are not in SVN. I created it to test if I could solve this problem and I focused only on the throughput of the RTSP server. You are free to try this dll to see if it solves your problem.

    Regards,
    Chrisjan
     

    cp9999

    Portal Member
    April 13, 2008
    7
    4
    Home Country
    Netherlands Netherlands
    I forgot to mention:
    The file must be copied into the "MediaPortal TV Server" folder (make a backup of the existing file first)

    Regards,
    Chrisjan
     

    Olli0815

    MP Donator
  • Premium Supporter
  • August 22, 2006
    182
    17
    Great !! I will try it later !!!


    Thanks,
    Olli

    -> That cool !!!! It works great. Thank you very, very much !!
     

    bigj

    Portal Pro
    January 10, 2005
    245
    1
    Hi cp9999, sounds like you did some good work testing and then solving this problem!
    Hopefully a dev will read this and get the fix from you.
    **BUMP** :)
     

    Users who are viewing this thread

    Top Bottom