PDA

View Full Version : How to include the seektable in an mpeg2 recording?



fimbar
January 23rd, 2011, 03:20 PM
Hi,

I’m using MythTV 0.24 and can quite happily view my MythTV recordings via my media streamer (NETGEAR NTV550). The quality is great and life is good. However I am unable to ffwd or rewind with any accuracy; when I stop ffwding or rewinding the video will jump to some random place in the recording. From what I’ve read this is because there is not “seektable” in the recording itself, it is still inside the MythTV database.

So, my question is, how can I include the seektable contents in the recording itself so ffwd and rewind work properly? I’ve tried using nuvexport but it messes up the aspect ratio, takes forever to run and the quality is terrible. It used to work just fine in previous versions until they removed the –-transcode export_prog.

Or maybe my question should be; how can I make ffwd and rewind work properly when using something other than the MythTV Frontend to view the recordings?

Many thanks in anticipation.

fimbar
January 26th, 2011, 12:34 PM
No one able to help me? :(

Does anyone else have trouble with ffwd and rewind when viewing MythTV recordings on a streamer? Maybe it's my streamer rather than a seektable problem?

bcg30506
January 26th, 2011, 02:52 PM
I cannot say for sure, never having used a media streamer, but I think most of them require H264 to stream properly. It may be that the device doesn't support seeking in an MPEG2 file. You may need to run a transcode user job on your recordings and stream those?

fimbar
January 26th, 2011, 04:15 PM
I cannot say for sure, never having used a media streamer, but I think most of them require H264 to stream properly. It may be that the device doesn't support seeking in an MPEG2 file. You may need to run a transcode user job on your recordings and stream those?

Thanks for the reply.

Well, I'm very much the novice when it comes to containers and codecs etc. I thought I read that with MythTV the seektable is stored in an SQL Table for an mpeg2 recording and without the seektable (also if the seektable gets corrupted) then the MythTV front-end can't ffwd or rewind. My assumption is that the same would apply to my streamer? But as I say, I'm a novice and may be talking rubbish.

I've no issue with the prospect of transcoding, the only issue I've had is I can't get nuvexport to "fix" the video (to allow ffwd and rewind) without screwing up the aspect ratio. All my recordings are 16:9 but they come out as 4:3. My TV then tries to stretch them back to 16:9 and they look dreadful. Plus the transcoded video is all pixelated and "blocky". So, it's a toss up between a beautiful picture but no rewind/ffwd and a stretched dreadful picture that I can ffwd or rewind to my heart's content! :lolflag:

klc5555
January 26th, 2011, 04:40 PM
I don't know how you've got nuvexport set up to process your recordings, since there are a lot of possibilities.

But regardless, you can force nuvexport to output to a particular aspect ratio, either at the command line when the script is invoked, or, more simply by using a .nuvexportrc in your home directory (or a nuvexportrc -without the period- in the directory "/etc"), which includes the line:

force_aspect = 16:9

See the nuvexport wiki page at: http://www.mythtv.org/wiki/Nuvexport

fimbar
January 28th, 2011, 08:27 PM
I don't know how you've got nuvexport set up to process your recordings, since there are a lot of possibilities.

But regardless, you can force nuvexport to output to a particular aspect ratio, either at the command line when the script is invoked, or, more simply by using a .nuvexportrc in your home directory (or a nuvexportrc -without the period- in the directory "/etc"), which includes the line:

force_aspect = 16:9

See the nuvexport wiki page at: http://www.mythtv.org/wiki/Nuvexport

Thanks for the pointer. Can't remember whether I ever tried the force_aspect option. I tried so many things I can't remember what I tried and what I didn't try.

What export_prog do you use? "transcode" used to work fine but they removed it. :(

BicyclerBoy
January 28th, 2011, 09:04 PM
What do you mean by streaming from your media streamer (netgear)?
Are you streaming from the myth backend 'server' ?

All recordings made by mythtv have a seek-table.
Mythtv uses mpeg2-ts for recordings from tuners (this what tuners output).

Mpeg2-ts is ideal for streaming because playback can stop start anywhere (on key frame).
Mpeg2 PS is not the same as mpeg2-ts.
Mpeg2 & 4 PS can be re-arranged (somehow) to start playing before file is read completely.

AFAIK .mkv, & the .nuv from mythtranscode, seek okay if seektable is regenerated using mythcommflag or mythtranscode.

fimbar
January 28th, 2011, 10:33 PM
What do you mean by streaming from your media streamer (netgear)?
Are you streaming from the myth backend 'server' ?

All recordings made by mythtv have a seek-table.
Mythtv uses mpeg2-ts for recordings from tuners (this what tuners output).

Mpeg2-ts is ideal for streaming because playback can stop start anywhere (on key frame).
Mpeg2 PS is not the same as mpeg2-ts.
Mpeg2 & 4 PS can be re-arranged (somehow) to start playing before file is read completely.

AFAIK .mkv, & the .nuv from mythtranscode, seek okay if seektable is regenerated using mythcommflag or mythtranscode.

Hi BicyclerBoy,

Sorry for not explaining myself very well.

Yes these recordings are made using the mythtv backend using a DVB-T tuner.
So, MythTV records my TV programmes and then I want to view these programmes on my NETGEAR streamers.
Currently I'm not doing any sort of transcoding of the recordings. They are "asis" although I have used mythlink to present readable filenames to my streamers.

On my streamers I can start and stop the recordings ok and the picture quality is great. It's when I try and ffwd through adverts for example that I get the problem. Once I press the play button to resume playback the recording "jumps" to some random place (+/- a couple of minutes from the moment I hit the play button). This often means I miss the start of the programme or it jumps me back into the adverts again.

I don't see these random jumps when viewing other media files (DVD rips etc) so I don't think it's a problem with the streamers.

I'm thinking my problem is the seektable (which allows proper ffwd and rewind) is not stored in the recording itself but is still inside the MythTV database (which obviously my streamers don't know about). But as I've mentioned, I'm a total noob and am clutching at straws as to the cause of this issue.

So are you saying that it should work and so my problem is not what I think it is? :confused:

BicyclerBoy
January 29th, 2011, 02:00 AM
You are correct as far as I understand.
The seek-tables are in the database.

I did not understand why you were/are using NETGEAR streamers.
(& I still don't but that's not your fault)

AFAIK myth backend is an UpnP server.
http://www.mythtv.org/wiki/UPnP

fimbar
January 29th, 2011, 10:48 AM
You are correct as far as I understand.
The seek-tables are in the database.

I did not understand why you were/are using NETGEAR streamers.
(& I still don't but that's not your fault)

AFAIK myth backend is an UpnP server.
http://www.mythtv.org/wiki/UPnP

I'm using streamers for all the reasons people don't use HTPCs. If your question is why did I choose NETGEAR as opposed to another brand, then the answer is not quite so straight forward. ;-)

Thanks for the tip about UPnP

BicyclerBoy
January 29th, 2011, 11:13 AM
So they (NETGEAR item) can be UPnP clients (& servers) ?

Some of the TVs work okay with Myth. Still some file formats that give problems AFAIK

fimbar
January 29th, 2011, 11:24 AM
So they (NETGEAR item) can be UPnP clients (& servers) ?


Only one of them can (the NTV550), the rest don't support it.

I read that I can transcode to .nuv which does embed the seektable into the recording. Trouble is, my streamers don't support .nuv files :(

Ho hum.

BicyclerBoy
January 29th, 2011, 11:34 AM
AFAIK .nuv nuppelvideo container is not to dissimilar to mpeg2-ts & mkv.
Don't think the seek-table is in the file, just the indexing is very well thought out.

I would think mpeg2-ts is an ideal container for streaming as this was designed for the task.

MythTV recordings from dvb-t tuners are mpeg2-ts.

klc5555
January 29th, 2011, 06:30 PM
What export_prog do you use? "transcode" used to work fine but they removed it. :(

Yes, the newer the mythtv release the less generally useful it seems to be. I prefer mencoder to ffmpeg. It may take longer but I find the output to be higher quality at the same settings. Just my opinion.

BicyclerBoy
January 29th, 2011, 09:00 PM
Mencoder & ffmpeg do not have the same parameters so to compare you would need the same bitrates etc.

The whole MythTV transcode process seems to have been overcome by the increased demands of HD etc.

But I think the reality is not that bad. AFAIK MythTV devs could be planning a different approach using complete externally scripted tools.
There is a userjob script for HD lossless cutting.

Myth internal tools are not able to lossless transcode/cut H264 (mpeg4/10).
Mytharchive cuts then transcodes so fails for H264.
mythtranscode does not work with H264.

The biggest problems are not with the MythTV 'tools' but with:
ffmpeg latm aac just solved
Avidemux2 latm aac no support.
ProjectX H264 ? latm_aac ?