Code: Select all
time cat moviefile.m2ts > /dev/null
Check your nfs mount options. I'm currently using:goujam wrote:I know this is an old thread but just wondered where this got to, I have a sample clip (Terminator 2 (lossless) THX sample) available from http://www.demo-world.eu/trailers/high- ... ailers.php. This has DTS-MA sound but should play the DTS core ok, im using an av reciever so the audio goes through that.
I have tried many settings but im unable to get the clip to play without stuttering in places. This is a VC-1 M2ts file im going to try it converted to MKV AVC to see if this helps. This is all tested from my NAS over a wired network using NFS. Im using openelec to play the file if that makes any difference.
Not quite sure with OpenelELECgoujam wrote:I did some tests on the network but used my laptop to test the speed on my wdtv cable as a benchmark and I got 81Mbps write and 80Mbps read.
I then checked on the cable to the pi and I got 81Mbps write and 69Mbps write. So its slower but the pi is further away than the wdtv. Now even with the lower speed its higher than the maximum required for the file I'm playing which is 48Mbps according to mediainfo.
Which points me towards Dom's suggestion, could you point me towards where I can find my NFS mount setup? I just set the NFS link using openelec but I presume it will have set the values in a file somewhere ?
No, VC-1 shoudn't be any harder than H264. m2ts (generally any of the transport streams/program streams) is more expensive than a container like mkv, so you could try remuxing the file to mkv (without re-encoding).goujam wrote:Thanks Dom Ill try it later, Ive had a look and I think I need to make a file called Autostart.sh and put my mount options in there. Apparently when you use the gui to create the mounts in XBMC it can slow your network spped down so im hoping this form of mounting will increase my speeds!
Also does VC-1 use more cpu than other codecs, I have noticed when I play my clip of a M2ts file my CPU is at almost 100% even when playing it from a USB stick. It does have DTS-MA audio on it so it maybe using the CPU to strip the core?
does it stutter if it is on the SD cardpeterdk wrote:I just had a Bluray Rip of a animation film that stuttered and used VC1. It's cpu usage is around 80% and sometimes hangs. I have removed all audio tracks and only created a AC3 5.1 track, which I would suspect the pi handles ok. However, it still stutters, both from network (where full bluray rips play all fine) and from USB. I will try a dolby logic 2 encode for the audio, but it looks like something is still not working ok with VC1.
VC1 codec is enabled according to the vcgencmd.
I could upload a 2 minutes clip if that would help?
I think it would be a worthwhile test.peterdk wrote:Well, I haven't tested it on the sd card, since the usb stick is 10+MB/s and even my 30mbps bluray rips don't have any issues using network or stick.
Light stuttering is probably due to frame rate sync - have you enabled "adjust refresh rate to match video" - assuming your TV supports 24Hz.peterdk wrote:Well.. I guess I was a little stubborn, but to my surprise it plays much better when played from internal sdcard.
SDCard is class 10 and hdparm gives 22MB/s read speed.
I still see some light stuttering, but will check with xbmc overlay to see if there are actual dropped frames or if it's just the animation.
What could be causing this difference? I have a fully wired network, and the usb stick is 10MB+? CPU usage with this movie from SD is around 80%, I can imagine that handling the network stuff or USB will cause too much CPU and therefor the stuttering. Still, with h264 encode it works all ok.
Yes, I am aware of the framerate sync. I love my PI for it's perfect sync with my tv, it's as fluent as my bluray player.dom wrote: Light stuttering is probably due to frame rate sync - have you enabled "adjust refresh rate to match video" - assuming your TV supports 24Hz.
If network is slow, check iperf from PC to Pi. You shoud get close to 90Mbit/s.
What network protocol? SMB is pretty inefficient from linux. You should use NFS.
What's the format of the video. Unindexed/unframed formats like m2ts require a lot more arm cpu than indexed formats (e.g. mkv).peterdk wrote:When enabling the XBMC overlay, it shows indeed that the caching fails after a while when playing from the network. However, more important is that the VC1 video decoding takes up around 25-40% of the CPU (dcpu). Resulting in total CPU of 100% sometimes when playing from network. This dcpu level is also the case when playing from the sd card. It looks a bit high too me. A 20+ mbit h264 rip consumes about 10% less dcpu on average, what probably causes the network buffering issues. Is it expected that VC1 is just more CPU intensive?
If you produce a sample (e.g. a few hundred MB) of the VC1 file I can take a look.peterdk wrote:I compared a 30mbit bluray h264 rip with a vc1 bluray rip. Not with similar video/audio. However, both had passthrough enabled, so audio-cpu was 1%. MKV files both, with subtitles. I understand a proper comparison would be a re-encode of the VC1 file to H264 with similar bitrate, I will maybe look into that. For now I use a h264 file, with a lower bitrate then the original file to make it work ok for me.
Having several bluray rips that are MKV H264 (and direct non-transcoded rips of disc) that all play fine, and now a VC1 MKV copy that hangs makes me conclude that this difference in cpu-usage is probably there.
Code: Select all
pi@raspbmc:~$ omxplayer -i Arriety-2minutes.mkv [matroska,webm @ 0x715230] Could not find codec parameters for stream 2 (Video: vc1 (WVC1 / 0x31435657), 1920x1080): unspecified pixel format Consider increasing the value for the 'analyzeduration' and 'probesize' options [matroska,webm @ 0x715230] Could not find codec parameters for stream 3 (Audio: dts, 48000 Hz, 6 channels, fltp): no decodable DTS frames Consider increasing the value for the 'analyzeduration' and 'probesize' options [matroska,webm @ 0x715230] Could not find codec parameters for stream 4 (Subtitle: hdmv_pgs_subtitle): unspecified size Consider increasing the value for the 'analyzeduration' and 'probesize' options Chapter : 0 Chapter 01 0.00 Input #0, matroska,webm, from 'Arriety-2minutes.mkv': Metadata: title : Arrietty creation_time : 2013-11-21 10:16:28 Duration: 00:02:00.61, start: 0.000000, bitrate: 27156 kb/s Chapter #0.0: start 0.000000, end 120.576000 Metadata: title : Chapter 01 Stream #0:0(jpn): Audio: dts (DTS-HD MA), 48000 Hz, 5.1(side), fltp, 1536 kb/s Metadata: title : Lossless Stream #0:1(eng): Audio: ac3, 48000 Hz, 6 channels, fltp (default) Stream #0:2(eng): Video: vc1 (WVC1 / 0x31435657), 1920x1080, SAR 1:1 DAR 16:9, 23.98 fps, 23.98 tbr, 1k tbn, 1k tbc Stream #0:3(jpn): Audio: dts, 48000 Hz, 6 channels, fltp Metadata: title : 3/2+1 Stream #0:4(dut): Subtitle: hdmv_pgs_subtitle
I can't see any frame drops. You will need "-r" passed to omxplayer and a TV capable of 24p to view this without frame drops. Can you confirm you are testing with "-r" and TV switches to 24p mode?peterdk wrote: I would love to see this fixed, is there anything else I can do/provide?