# Real-time video encoding and streaming over home network?



## Deleted member 106413 (Apr 30, 2013)

Hello everyone, a weird idea is walking around my brain these days... 
I recently got a Raspberry PI model B, which I currently use to stream movies from an ext4 HDD connected to it. The issue is, some movies are really big and have a high bitrate (20-24Mbps) so it stutters a bit when streaming over wifi. Some movies are unfortunately unwatchable due to this and I have to re-encode them (I use MediaCoder with CUDA and my GTX680 to reduce the bitrate to 8-10Mbps).
What I was wondering is, since my gaming pc is connected via ethernet and I get full 100Mbit speed to the raspberry, could I:
1) Get the movie file streammed by the raspberry
2) Encode it in real-time to 8-10Mbit/s
3) Stream it in live to the laptop connected via wifi
I know it seems really complicated and probably impossible, but I'd like to know your opinions about this, and maybe a better and easier method it there happens to be one.
Thanks in advance.


----------



## _Zod_ (Apr 30, 2013)

Re-encoding is the only reliable option. The other option (way less reliable) is to cough up cash (because the free ones never work correctly and format compatibility is nill) for a DLNA media server software and stream from the PC leaving the raspberry as a table wedge.


----------



## Deleted member 106413 (Apr 30, 2013)

_Zod_ said:


> Re-encoding is the only reliable option. The other option (way less reliable) is to cough up cash (because the free ones never work correctly and format compatibility is nill) for a DLNA media server software and stream from the PC leaving the raspberry as a table wedge.



Is there any way that you know of to encode and stream a file in real time? And what would be the advantages of having a DLNA server? How would that solve my problem?


----------



## Deleted member 106413 (May 1, 2013)

I *might* have solved using XBMC and putting this code in the *Users\<your_user_name>\AppData\Roaming\XBMC\userdata\advancedsettings.xml* file:

```
<advancedsettings>
  <network>
    <cachemembuffersize>0</cachemembuffersize>  
  </network>
</advancedsettings>
```


----------



## jihadjoe (May 4, 2013)

Isn't this exactly what PS3 Media server does? Basically take any sort of movie from your PC and encode on the fly to a format and bitrate that's playable on PS3. The bitrate and other codec-specific parameters can even be adjusted in the expert mode menus.


----------



## Deleted member 106413 (May 4, 2013)

jihadjoe said:


> Isn't this exactly what PS3 Media server does? Basically take any sort of movie from your PC and encode on the fly to a format and bitrate that's playable on PS3. The bitrate and other codec-specific parameters can even be adjusted in the expert mode menus.



Thanks for the info, but thinking again I didn't need to change the bitrate, as I can play about any 10-15GB 1080p movies I throw at it. The issue was that MPC-HC didn't keep as much buffer as XBMC with the advancedsettings tweaks does. Basically with this tweak, XBMC downloads the entire file on the go and plays it while doing so. This way, I always have 1-2 minutes in the cache ready to be streammed, even when there is a lot of action.


----------

