h.264 / formats and file sizes
Added by joe riggle over 10 years ago
Hello all. I've just switched over from Myth, largely as the web interface in tvheadend is so lovely!
Only thing is, my frontend can't seem to cope with the mkv file sizes. Even switching to passthrough, I get choppy video on the .ts files, and a massive delay before it starts playing them for some reason (would they still be taking advantage of the VDPAU Nvidia chipset?).
For all the problems I had with Myth, the .mp4 files were a breeze and my frontend (XBMC on an Atom with Nvidia Geforce) coped fine. Is there a way of adding mp4 to 'Media container' options? Incidentally I'm in UK, so a mixture of mpg4 / h.264 & mpeg2 transmissions, I believe?)...
Replies (17)
RE: h.264 / formats and file sizes - Added by Eric Valette over 10 years ago
Maybe you should say what player you do use and on what hardware platform! Then you probably mix containers (mp4/mkv) and codec (h264/mpeg2) in your description.
RE: h.264 / formats and file sizes - Added by joe riggle over 10 years ago
Frontend is Zotac Zbox (Atom 2550 & Nvidia GT610) running XBMC Gotham
Backend is custom build 64bit intel, running Ubuntu 13.10 with tvheadend.
I may be getting my containers and formats confused, but what I do know is:
- Live TV is fine.
- Recordings on Myth were mp4 which played fine on the front end
- On tvheadend neither .ts nor .mkv files (the only options that I can find) will play more than 10 seconds without cutting out
RE: h.264 / formats and file sizes - Added by Eric Valette over 10 years ago
What OS/distrib do you have on the frontend? Where did you get gotham from?
RE: h.264 / formats and file sizes - Added by joe riggle over 10 years ago
It's xbmcbuntu, but I upgraded the binaries to Gotham via the repo.
$ uname -a
Linux zbox 3.5.0-46-generic #70-Ubuntu SMP Wed Jan 8 18:43:34 UTC 2014 i686 i686 i686 GNU/Linux
RE: h.264 / formats and file sizes - Added by Prof Yaffle over 10 years ago
Likely a Gotham config issue - perhaps audio/video, as that would impact sync, although wouldn't explain it stopping. Switch debugging on in XBMC and take a look.
As Eric said, containers and contents are different - the fact that Myth saved it as MP4 and tvheadend uses mkv and ts shouldn't change the underlying streams, it merely determines how they're stored (e.g. how audio and video are interleaved). UK HD is all H.264, SD is MPEG-2 as you say, audio streams can vary depending on satellite vs terrestrial.
So, it's possible that tvheadend is creating grotty files. You'd need to play them on VLC or something else to see.
It's possibly a transmission problem, so try playing them locally on your backend (local XBMC or local VLC) and try playing them locally on your frontend (copy them over).
It could be a PVR addon problem, so try playing them over an NFS or SMB share instead of via the Live TV -> Recordings option.
It could be a container problem, so try remuxing with mkvmergegui or similar.
It could be a specific XBMC decoder/demuxer problem, so try a different version of XBMC (you don't say if you're on a Gotham Alpha build, the Beta or a nightly).
Some thoughts for you... all I can say is that I record UK HD stuff all the time on my 'buntu box and it all plays quite happily - on ION/OpenElec, Windows and Android. So I can't immediately say that there's an intrinsic problem with tvheadend.
If all else fails, I'll test a sample for you or provide a sample recording in return - that might help isolate things.
RE: h.264 / formats and file sizes - Added by joe riggle over 10 years ago
Thanks for a very helpful post there - that was a great help in narrowing it down. It is pointing to the PVR add-on.
Both the mkv files and the ts files play without any issues locally, and even from an NFS share from the backend to the front end. It's only when trying to play them through the add-on that the problem occurs.
I'm pulling from: http://ppa.launchpad.net/team-xbmc/unstable/ubuntu/ and I have just upgraded again following the instructions here: http://wiki.xbmc.org/index.php?title=XBMC_v13_(Gotham)_FAQ#XBMCbuntu_update
The tvheadend add-on has now changed from v 1.9.23 to v 1.9.25 but the problem still persists after a reboot, even.
What would my best course of action be now I wonder?
RE: h.264 / formats and file sizes - Added by joe riggle over 10 years ago
Forgot debug log: http://pastebin.com/Bwij490D
(Tried to watch 'EastEnders')...
RE: h.264 / formats and file sizes - Added by Prof Yaffle over 10 years ago
I wish I really knew how to interpret log files better... there's nothing that tells me what the problem is, but I'm sure a seasoned expert would see something.
Suggestions:
1. Check whether the problem persists if you switch VDPAU off. Yes, it'll run like a dog without the hardware acceleration, but it might point to a driver issue.
2. You can try the new pvr.tvh addon that Adam's been working on: http://forum.xbmc.org/showthread.php?tid=187521
3. Check and recheck your audio settings, especially if you've upgraded from Frodo. You've got some passthrough audio messages in there that don't look entirely right to my untrained eye.
4. Surrender and only play them over an NFS share (not such a facetious statement - I always do this for historical reasons and simply have the recordings folder marked as a favourite in XBMC - it's then just a click away behind the star on the main screen, next to the power down icon)
Given that the problem appears to be on the XBMC side, you might be better off shifting over to that forum - maybe post with an unedited version of your debug log and see where it takes you.
RE: h.264 / formats and file sizes - Added by Eric Valette over 10 years ago
joe riggle wrote:
Forgot debug log: http://pastebin.com/Bwij490D
(Tried to watch 'EastEnders')...
The log shows that you have both VDPAU and vaapi activated which is not necessary because you have a vdpau compatible card and vaapi api is less powerful but the problem comes from the hts plugging. When you updated XBMC, did this also update the plugging?
RE: h.264 / formats and file sizes - Added by joe riggle over 10 years ago
Ok, so I've disabled vaapi, and switched the audio back to HDMI - don't know how that changed, but well spotted Prof
Playing of recordings still exhibits the same problem however the hardware / software acceleration is set up. So could just be the add-on that doesn't want to play ball. I've been messing around trying to compile the latest pvr.tvh from that link you posted Prof, but I'm getting errors about C++ not being able to create binaries, so I'm wandering out of my depth somewhat
Maybe I should just go for the NFS share to play recordings.... :/
RE: h.264 / formats and file sizes - Added by joe riggle over 10 years ago
Ah! Didn't have build-essential installed. I am learning Giving it another try...
RE: h.264 / formats and file sizes - Added by Prof Yaffle over 10 years ago
FWIW, I upgraded to Gotham Beta 2 on several systems yesterday, and none exhibit this behaviour with pvt.hts to tvheadend 3.9.430~g9398e6d. I strongly suspect it's something about the config on your XBMCbuntu system, therefore.
I even have VDPAU and VAAPI enabled, as OpenElec does this by default - the system should choose which one to use (although I agree it's unnecessary).
Q: do you need 'buntu on your Zotac? Would OE work for you as an appliance? I switched just as XBMClive was being put out to pasture, and I've no regrets at all... it obviously depends on whether this is a pure HTPC or whether you need a browser/desktop as well.
RE: h.264 / formats and file sizes - Added by joe riggle over 10 years ago
Sorry for the time gap - I missed the last post from you prof yaffle, somehow!
TBH I don't really need 'buntu on it I guess... my main requirement is to be able to SSH to it (and my only experience of OpenELEC is that I couldn't do that out of the box, think I had to fiddle with a file on the SD card or something, as it was a pi)...?
Would OpenELEC fix my issues do you think, and would it work well with the TVH backend? Am happy to blow away my xbmcbuntu install again and stick OpenELEC on it if you think that will work better for me...?
RE: h.264 / formats and file sizes - Added by Prof Yaffle over 10 years ago
sshing into OE is trivial - you create one file through any SMB-compliant file views (e.g. Windows Explorer, obviously!) and you're done.
OE works very well with tvheadend in my experience. Playing with the addons is slightly complicated by the 'bundle' approach, but there's a thread over on the XBMC forums with people posting compiled pvr.thv addons and there are instructions around as to how to crowbar it into OE. So it's all doable... if you even have to, I don't get any problems playing stuff back through pvr.hts to my OE boxes.
Try OE from USB. It won't take long to set up, enabling pvr.hts takes moments and off you go...
RE: h.264 / formats and file sizes - Added by joe riggle over 10 years ago
Great, I'll give that a go... out of interest, what sort of delay do you get between selecting an HD channel, and the stream appearing on screen?
RE: h.264 / formats and file sizes - Added by Prof Yaffle over 10 years ago
About 1 second for video to appear, and audio comes along less than a second after that. That's for BBC-to-BBC, so probably the same mux - BBC HD to Channel 4 HD maybe adds half a second more.
That's OE 4.0 (XBMC 0d1d803, 5th May), pvr.hts 1.9.27, tvheadend 3.9.438~gd328f74 and PCTV 460e DVB-S2 USB tuners if you want the full environment.
RE: h.264 / formats and file sizes - Added by joe riggle over 10 years ago
That's great! I was getting about 5-10 seconds with my old build, so will be interesting to see what OpenELEC gives me... thanks