NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public NextPVR Support Legacy (v4.x and earlier) v
« Previous 1 … 416 417 418 419 420 … 433 Next »
TS and Comskip

TS and Comskip
petercooperjr
Offline

Member

Posts: 58
Threads: 10
Joined: Feb 2009
#1
2010-07-20, 02:06 PM
I think this may be something that sub already knows about, but I wanted to check and I guess see if it was on a to-do list somewhere.

When using GB-PVR with my HVR-1600 digital recordings with the dvr-ms mux, commercial detection worked really well. I recently switched to a HDHomeRun, but I needed to switch to the TS mux to get that to work. With the TS files from the HDHomeRun, it seems to jump early, like skipping over the last 5-10 seconds of show and resuming with 5-10 seconds of commercial left. I think the comskip files are correct, and it's just not matching them up with the playback right. I know that sub had said something at some point about not being able to know where one was in TS files as easily. So, I tried postprocessing with ffmpeg to turn the TS file into an MPEG PS file, which seemed to play just fine, but surprisingly to me had the same issues in the same way with the skipping not being quite right.

So, I've been trying to switch to NPVR, hoping that since it's designed from the ground up to work with TS files, that it would work better. But it seems to be the same. Where it skips just doesn't quite match up with where the commercials are.

I am a programmer, but I don't really know about the internals of MPEG, but I'm curious what's so hard about taking a frame number from the output of comskip and seeing when that frame number comes up. But I'm sure it must just be much more complicated than that.

I guess my questions are just (1) is this on the list of things to be worked on, (2) would there be any log files or comskip files or anything that I should attach to see if there's something I'm doing wrong, and (3) is there any way I could help this get fixed?

Thank you.
johnsonx42
Offline

Posting Freak

Posts: 7,298
Threads: 189
Joined: Sep 2008
#2
2010-07-20, 03:01 PM (This post was last modified: 2010-07-20, 04:27 PM by johnsonx42.)
I've been wondering for awhile whether re-muxing a .ts file to MPEG would make comskip work better. I kept meaning to try it, but never got to it. One question though, did you re-mux before running comskip, or after? If you re-muxed after the comskip file was already created it may not have helped. I'm not sure it will help the other way either though.

I think the fundamental issue with .ts, comskip and GB-PVR/NPVR is that time relative to frame count is a bit variable. Comskip reads the file and figures out which frames to mark as commercials. When the file is played back in GB-PVR/NPVR, the relative time position in the file isn't known exactly so the resulting skips are a little off from where comskip calculated them. GB-PVR/NPVR apparently does positioning in the file using time and framerate rather than direct frame count (and frame rate is the variable in .ts files). I recall sub saying the only solution would be to count every frame in the file, and do the skips based on exact frame number. I'm not sure though whether actually doing this is easily accomplished, or whether sub intends to do so.

Finding a solution perhaps hasn't been all that high on sub's list:
sub Wrote:I didnt bother building in any special direct running of comskip.exe, because I havnt used it for years, and have kind of lost interest in it.
server: NextPVR 5.0.7/Win10 2004/64-bit/AMD A6-7400k/hvr-2250 & hvr-1250/Winegard Flatwave antenna/Schedules Direct
main client: NextPVR 5.0.7 Desktop Client; LG 50UH5500 WebOS 3.0 TV
petercooperjr
Offline

Member

Posts: 58
Threads: 10
Joined: Feb 2009
#3
2010-07-20, 03:51 PM
johnsonx42 Wrote:I've been wondering for awhile whether re-muxing a .ts file to MPEG would make comskip work better. I kept meaning to try it, but never got to it. One question though, did you re-mux before running comskip, or after? If you re-muxed after the comskip file was already created it may not have helped. I'm not sure it will help the other way either though.

With GB-PVR, I had tried re-muxing to a program stream MPEG and using the same comskip files, as well as re-running comskip on the program stream MPEG afterward, and either way seemed to get the same results. There could be something wrong with how I'm doing it, too.
I'm running (from memory)
Code:
ffmpeg -i file.ts -acodec copy -vcodec copy -f dvd file.mpg
which seems to give me a good file although it gives a lot of buffer warnings, I assume because the dvd format isn't designed to deal with a HD MPEG file.

If someone's had success getting comskip to work with a better/different remuxing, in either GB-PVR or N-PVR, maybe that would be a good solution.

But it seems like one ought to be able to get it to work with transport streams, too.

Thanks.
johnsonx42
Offline

Posting Freak

Posts: 7,298
Threads: 189
Joined: Sep 2008
#4
2010-07-20, 04:00 PM
That is, as far as I know, the correct ffmpeg command to remux the file. The only way I think you could get it to work without changes to NPVR is to re-encode the file to MPEG rather than just re-muxing it; this would take a lot more time, and could degrade the quality. Just re-muxing it preserves the frame rate issues of the .ts file, so the end result is the same.

I think we need to hope sub decides to fix this for us, though it won't be trivial.

Anyone else have any ideas?
server: NextPVR 5.0.7/Win10 2004/64-bit/AMD A6-7400k/hvr-2250 & hvr-1250/Winegard Flatwave antenna/Schedules Direct
main client: NextPVR 5.0.7 Desktop Client; LG 50UH5500 WebOS 3.0 TV
peter_h
Offline

Member

Posts: 67
Threads: 24
Joined: Jan 2008
#5
2010-07-20, 10:51 PM
I'm a bit of newbie to .TS files and PVR, and being a bit of a techie too, I've been doing a lot of reading lately, trying to figure things out.

From what I've read (so if anybody wants to expand, please do), it's very common to have sync issues with transcoding .TS files that come from broadcasts (DVB-T). Something to do with it being packetized and packets arriving corrupted and/or because the audio may not necessarily arrive at the same time as the audio, particularly when the broadcaster switches streams (e.g. cuts from studio to outside broadcasts during live; inserts commercials).

It seems that many people recommend the first thing to do before any processing is fix any errors in the .TS stream, using tools like Quickstream Fix in VideoRedo v4 beta*; TS-Doctor; or TS Packet Editor (Unfortunately, all of which are US$50-$75. But trials are available).

* As yet, I've only tried VideoRedo v4 beta, but found that though it does handle h.264 but still has a problem writing out correct streams with HE-AAC, so I have deemed it not suitable yet for our DVB-T files.

Some TS theory: http://www.bitstreamtools.com/Theory/index.php
Pete
Karori, Wellington, NZ

HARDWARE: AMD x4 9550, WinXP sp3, Hauppauge HVR-4000 (Freeview/DVB-T only ATM); Hauppauge HVR-1700 (DVB-T); 2 x GeForce 9600GT; All latest drivers; SPDIF out;
UHF rooftop aerial with a direct line-of-sight 3km to Mt KauKau.
SOFTWARE: MediaPortal 1.1; NPVR; Latest HVR4000 drivers; WinTV7; ArcSoft TotalMedia; Cyberlink PowerDVD 7.0; MPV Decoder; AC3Filter; Mpeg2DecFilter.ax; mmaacd.ax (Morgan AAC decoder)
pBS
Offline

Posting Freak

Posts: 4,829
Threads: 182
Joined: Aug 2005
#6
2010-07-20, 11:21 PM (This post was last modified: 2010-07-20, 11:26 PM by pBS.)
try: ffmpeg -y -i %1 -vcodec copy -acodec copy -f vob "%~dpn1.mpg"

you'll notice it takes a bit longer to produce and has slightly different file sizes...
and may fix your timing issues...Big Grin
Hardware: HDHR Prime, HDPVR 1212, Raspberry pi2, VFD display w/LCDSmartie
petercooperjr
Offline

Member

Posts: 58
Threads: 10
Joined: Feb 2009
#7
2010-07-21, 01:53 AM
pBS Wrote:try: ffmpeg -y -i %1 -vcodec copy -acodec copy -f vob "%~dpn1.mpg"

Thanks for the tip, but it didn't seem to help. It produces a slightly different file as you say, but after running that and then comskip on the new file, N-PVR still skips and resumes about 10 seconds early or so.
Reddwarf
Offline

Posting Freak

Posts: 6,629
Threads: 230
Joined: Mar 2007
#8
2010-07-21, 06:31 AM
pBS Wrote:try: ffmpeg -y -i %1 -vcodec copy -acodec copy -f vob "%~dpn1.mpg"

you'll notice it takes a bit longer to produce and has slightly different file sizes...
and may fix your timing issues...Big Grin

would it be possible to include any subtitle streams to the .mpg file?

"I'd rather have a bottle in front of me than a frontal lobotomy"
petercooperjr
Offline

Member

Posts: 58
Threads: 10
Joined: Feb 2009
#9
2010-07-24, 07:28 PM
I don't think there are any "subtitle" streams in the file, although the Closed Captioning data is certainly in there somewhere (and can get played by N-PVR after the remuxing, so it presumably gets through the process okay.

I don't think my original questions have been answered, on whether this is something sub plans on working on (he said he's not most interested in it, but I don't know if that's an outright "no, never"), or if there's something I can do to help. I'd be happy to try and take a look through the source code if sub wants to do that route (although I totally understand if he doesn't), and I'd be happy to contribute money toward the time to get this feature completely working. It looks like I'm not the only one experiencing issues with comskip skipping on TS files, so hopefully other people would be willing to contribute time and/or money as well.

Thank you very much. (And this is the only thing wrong with my setup now, and I'm loving the new program.) This is just the one thing that's not perfect yet.
sub
Online

Administrator

NextPVR HQ, New Zealand
Posts: 106,723
Threads: 767
Joined: Nov 2003
#10
2010-07-24, 08:18 PM
petercooperjr Wrote:I don't think my original questions have been answered, on whether this is something sub plans on working on (he said he's not most interested in it, but I don't know if that's an outright "no, never")
I'm always looking to have better skipping and duration reporting, and there will always be on going improvements in this area over time.

Its not on the top of my priority list though, with so much other stuff still to be done in NPVR, and with skipping being "good enough" for most manual skipping.
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)

Pages (5): 1 2 3 4 5 Next »


Possibly Related Threads…
Thread Author Replies Views Last Post
  Comskip Playback Odd Behavior kirschey 3 1,688 2021-09-27, 06:16 PM
Last Post: sub
  Fast-forward and comskip issues manic_biker 11 3,848 2021-07-12, 02:17 AM
Last Post: Robazz
  Comskip edl files ignored dbguru 3 2,196 2019-10-24, 06:11 PM
Last Post: mvallevand
  VideoReDo vs Comskip drmargarit 2 1,536 2019-02-07, 12:08 AM
Last Post: drmargarit
  Npvr not skipping comskip break points glb1945 3 1,367 2018-11-18, 01:51 AM
Last Post: ga_mueller
  Installed NPVR on New PC, Comskip Now Not Working GWCowling323 12 4,149 2018-10-11, 04:44 PM
Last Post: mvallevand
  Comskip freeezes and other performance issues kirschey 0 791 2018-01-29, 12:03 AM
Last Post: kirschey
  Comskip Gets Out-of-Sync asolof 0 1,089 2017-12-15, 05:25 AM
Last Post: asolof
  ComSkip not Working for Me GWCowling323 23 9,246 2017-11-06, 01:37 PM
Last Post: BrettB
  Recording / Comskip on SSD Reddwarf 2 1,567 2017-02-18, 08:11 AM
Last Post: Reddwarf

  • View a Printable Version
  • Subscribe to this thread
Forum Jump:

© Designed by D&D, modified by NextPVR - Powered by MyBB

Linear Mode
Threaded Mode