Files are getting too big
Added by Hanspeter Müller almost 11 years ago
Hi,
starting Dezember 4, my recordings are getting way too big. I've recorded a 24-min-show for a few months, the recordings where always somewhere 650-700MB. Now they are 900-1000MB. If i run them trough tsDoctor (without cutting), it "shrinks" a file from 980MB down to 703MB, discarding 277MB without removing any PIDs:
Starting at packet 0000006A PCR: -00:00:00.037 (14:26:34.540)
Cutted packets at the beginning: 54
Cutted packets at the end: 0
Discarded packets (not needed): 1547203
on an older recording, tsDoctor only fixes a few ~5MB:
Starting at packet 00000015 PCR: 00:00:00.000 (-00:00:00.000)
Cutted packets at the beginning: 19
Cutted packets at the end: 0
Discarded packets (not needed): 38211
There are several commits mention work on the muxer, is it possible the newer code is padding the stream with unneeded zeros or something? Any hints what tools i can use to analyze what exactly tsDoctor is fixing/discarding, the log from it isn't much help...
/hanspeter
Replies (3)
RE: Files are getting too big - Added by Adam Sutton almost 11 years ago
I think you'll find it's definitely removing PIDs, and I'd be pretty sure its going to be 0x12.
I will sort it out at some point, but people were wanting more stuff to be passed through using the passthru muxer and this includes additional metadata, such as NIT, SDT and most notably (on some networks) full EIT. Clearly most of the EIT data is not wanted, really we only want EITpf, however filtering that in a simple fashion isn't obvious (since it implies decoding the tables and then re-generating them, the code exists, but its not really what we want in the muxer).
In the medium term I'll add an option to the DVR config to include/exclude all the various metadata. But in the short term you'll just have to live with the extra data (disk is relatively cheap, and a quick ffmpeg run will soon strip it away).
Adam
RE: Files are getting too big - Added by Hanspeter Müller almost 11 years ago
Adam Sutton wrote:
I think you'll find it's definitely removing PIDs, and I'd be pretty sure its going to be 0x12.
Yeah you're right of course, i meant, "i didnt de-select audiotracks or something else". With 0x12 you're spot on, tsDoctor doesn't explicitly state what it removes, but the numbers seem to add up:
$01D0: 71% = MPEG2 Video (PES_StreamID E0 = Video_Stream_0) [PCR,PTS,DTS]
$0012: 17% = EIT,ST
$0011: 7% = SDT,BAT,ST
$01E3: 0% = [SCRAMBLED 100.00%]
$0000: 0% = PAT
$01E4: 0% = PMT
$01DC: 1% = AC3 Audio (PES_StreamID BD = Private_Stream_1) [PTS][PESLength]
$01DB: 4% = AC3 Audio (PES_StreamID BD = Private_Stream_1) [PTS][PESLength]
11+12 combined is exactly the amount that's dropped. In the old recordings, neighter of them are there.
I will sort it out at some point, but people were wanting more stuff to be passed through using the passthru muxer and this includes additional metadata, such as NIT, SDT and most notably (on some networks) full EIT. Clearly most of the EIT data is not wanted, really we only want EITpf, however filtering that in a simple fashion isn't obvious (since it implies decoding the tables and then re-generating them, the code exists, but its not really what we want in the muxer).
<scaryvoice> Ahhhhh, it all makes sense now </scaryvoice> ;). Since a few days, tsDoctor offers to do automatic cutting based on EPG data, so i guess that's the EIT data from above...?
In the medium term I'll add an option to the DVR config to include/exclude all the various metadata.
Errr, i'm confused, isn't that what "Rewrite PMT" is supposed to do? Or does that just change the PMT, but not remove the actual data...?
But in the short term you'll just have to live with the extra data (disk is relatively cheap, and a quick ffmpeg run will soon strip it away).
It's not a problem at all (i cut the recordings anyway with tsDcotor), i just wasn't sure if it's a bug that snuck in, because it didn't happen until about two weeks ago. And if it's allowing new stuff like automatic cutting, it's worth it anyway ;).
Many thanks for your time (for programing tvheadend and answering my questions) :-)
/hanspeter
RE: Files are getting too big - Added by Adam Sutton almost 11 years ago
Great.
No the rewrite PAT/PMT options are just that, they're for rewriting those tables only. leaving not present programmes in PAT apparently confuses some HW based decoders, but nothing SW that we know of. Same goes for PMT it's generally better to leave PMT as is, as some HW decoders can get confused by out rewritten ones.
The other metadata, that's not programme specific (SDT,BAT,NIT,EIT, etc...) is completely unaffected by these options. For the most part it adds a small overhead and means you get things like channel names etc... (from SDT typically). For broadcasters that have a full EIT schedule on each mux, it can represent (as you've seen) a reasonable overhead.
However the reason for its addition is mainly to get the EITpf data, for exactly the reason you've noted. It will allow for much better auto-cutting of stuff using that data. So I think in general its a small price to pay. And eventually I'll probably make it optional just so those that don't care can have it filtered out by TVH.
Adam