In the theory, if you install DLNA renderer/controller (player) on TV you could make appropriate DLNA media source from VLC or, maybe, ffmpeg.
Put it on RPi (as it could skip transcodnig and pass media streams as-is) and put into the box :)
We are on HN, after all!