Author |
Message |
robsbox
|
Posted: Sat Apr 28, 2007 9:15 am |
|
Joined: Mon Jun 28, 2004 12:37 pm
Posts: 50
|
I wish to remove commercials from my HD recordings. I tried mythtranscode, but mythtranscode does not handle HD MPEG-2 streams very well at all. My recordings get doubled in size by lossless mythtranscode. I suspect it has something to do with converting from a transport stream, but I really know very little about the process. At any rate, it takes quite a bit of time, and does not produce good results, nor do I think it is necessary.
I really would like to just snip out the commercials detected automatically or marked manually by the commercial flagging. I'm looking for a simple command line utility that I might autorun as a user job. Note that this is NOT transcoding, just editing the MPEG-2 recording. Can someone point me in the right direction?
Thanks much,
Rob
_________________ Backend: 2.4GHz Celeron; 512Mb RAM; 130Gb IDE HDD; DVD-RW
Hauppauge Win-PVR 250; DViCO Fusion HDTV Lite
KnoppMyth R5E50 -> SVN
Frontends: Buffalo Link Theater, Mac Mini Intel duo core & Xbox
|
|
Top |
|
 |
ceenvee703
|
Posted: Sat Apr 28, 2007 10:07 am |
|
Joined: Fri Apr 02, 2004 10:08 am
Posts: 1637
Location:
Virginia, USA
|
You shouldn't have to use the mythtranscode command line option.
If you set up a "transcoding profile" (I think that's what it's called) and pick Lossless MPEG2 (again, I think that's what it's called), it will do what you want for both SD and HD MPEG2 recordings.
Once it's set as your transcoding profile from within MythTV frontend, all you do is start playing a program, press E to edit, press X to load the commercial cut list, adjust cut points with your arrow keys and the Enter key. I then press M for Menu and pick the Transcode option. Works great, no external applications needed. Note that I always set edit points to keyframes so that there is absolutely no recompression needed.
Hope this made sense, I'm away from my MythTV box now.
|
|
Top |
|
 |
robsbox
|
Posted: Sat Apr 28, 2007 12:06 pm |
|
Joined: Mon Jun 28, 2004 12:37 pm
Posts: 50
|
ceenvee703 wrote: You shouldn't have to use the mythtranscode command line option.
If you set up a "transcoding profile" (I think that's what it's called) and pick Lossless MPEG2 (again, I think that's what it's called), it will do what you want for both SD and HD MPEG2 recordings.
Hope this made sense, I'm away from my MythTV box now.
Thanks for the suggestion, but I tried that. I presume mythtranscode's so-called "lossless encoding" decodes the MPEG-2, removes the cutlist, and then re-encodes MPEG-2.  What I do know is that I end up with a recording that takes twice the storage to hold, so it does not work very well.  That's not what I want to do.
I just want to remove the commercials. This isn't transcoding -- it's editing. Does anyone know of a utility that will do this?
_________________ Backend: 2.4GHz Celeron; 512Mb RAM; 130Gb IDE HDD; DVD-RW
Hauppauge Win-PVR 250; DViCO Fusion HDTV Lite
KnoppMyth R5E50 -> SVN
Frontends: Buffalo Link Theater, Mac Mini Intel duo core & Xbox
|
|
Top |
|
 |
ceenvee703
|
Posted: Sat Apr 28, 2007 2:13 pm |
|
Joined: Fri Apr 02, 2004 10:08 am
Posts: 1637
Location:
Virginia, USA
|
As I said in my reply, I _am_ removing commercials. Quite successfully.
It is not inflating the file size, it's shrinking it by the amount of commercials I remove.
I'm not transcoding to another format: it is converting MPEG2->MPEG2 and is thus doing no transcoding at all, even though you set it up under Transcoding options and you start it off via "Start Transcoding."
I don't know if the front end is using mythtranscode or not. All I know is that via the frontend and the frontend alone, I'm doing what you want to do.
When you say you're using mythtranscode, are you talking about using it via command line in terminal? If so, that's not what I'm describing.
EDIT: To clarify, the "lossless transcoding" is indeed editing and not transcoding the MPEG2 file. If you are careful and only make cuts at keyframes, there is absolutely no "de-encoding/re-encoding" involved; it's making straight cuts to the MPEG2 file. If you choose to make cuts at frames OTHER than keyframes, there is de-encoding and re-encoding, because it has to build a new GOP and make new keyframes.
|
|
Top |
|
 |
mjl
|
Posted: Sat Apr 28, 2007 6:59 pm |
|
Joined: Sun Jun 12, 2005 10:55 pm
Posts: 3161
Location:
Warwick, RI
|
Hi,
Before "lossless" transcoding can occur you do need to set it up. Under recording profile if I recall correctly.
Mike
|
|
Top |
|
 |
ceenvee703
|
Posted: Sat Apr 28, 2007 7:03 pm |
|
Joined: Fri Apr 02, 2004 10:08 am
Posts: 1637
Location:
Virginia, USA
|
|
Top |
|
 |
robsbox
|
Posted: Sun Apr 29, 2007 7:17 am |
|
Joined: Mon Jun 28, 2004 12:37 pm
Posts: 50
|
ceenvee703 wrote: I don't know if the front end is using mythtranscode or not. All I know is that via the frontend and the frontend alone, I'm doing what you want to do.
When you say you're using mythtranscode, are you talking about using it via command line in terminal? If so, that's not what I'm describing.
EDIT: To clarify, the "lossless transcoding" is indeed editing and not transcoding the MPEG2 file. If you are careful and only make cuts at keyframes, there is absolutely no "de-encoding/re-encoding" involved; it's making straight cuts to the MPEG2 file. If you choose to make cuts at frames OTHER than keyframes, there is de-encoding and re-encoding, because it has to build a new GOP and make new keyframes.
Ok, thank you very much for that clarification ceenvee. I must clarify too. I'm using a uPnP frontend. I can only play files, no other myth features are available (at the present time  )
Thus, I need and want to do my commercial removal automatically, and at the backend. As the linked page states, "[s]ince a list of commercial flags is not a cutlist, it is not removed automatically." My experience has been that "lossless" transcoding by the backend greatly inflates the size of the files, but I might not have something set up correctly. Before I try to troubleshoot that problem, I just want to know if what I'm trying to do is possible (time is my greatest enemy  ).
From the link to that page, it looks like the removecommercials script is the way to go. I'd like to hear if anyone has had experience, good or bad, with this script on a high definition recording in the backend, and any tips. I will experiment in the meantime.
_________________ Backend: 2.4GHz Celeron; 512Mb RAM; 130Gb IDE HDD; DVD-RW
Hauppauge Win-PVR 250; DViCO Fusion HDTV Lite
KnoppMyth R5E50 -> SVN
Frontends: Buffalo Link Theater, Mac Mini Intel duo core & Xbox
|
|
Top |
|
 |
tjc
|
Posted: Sun Apr 29, 2007 8:58 am |
|
Joined: Thu Mar 25, 2004 11:00 am
Posts: 9551
Location:
Arlington, MA
|
Lossless MPEG-2 commercial cutting (aka lossless transcoding) is based on the older scripts.
Having the files get bigger is a symptom of not having the transcoding profiles set up correctly. When it's set up properly it simply transfers frame data from input to output until it gets to the keyframes around your cuts and only reencodes the frames there, then goes back to transfering untouched frames.
|
|
Top |
|
 |
robsbox
|
Posted: Sun Apr 29, 2007 11:50 am |
|
Joined: Mon Jun 28, 2004 12:37 pm
Posts: 50
|
tjc wrote: Lossless MPEG-2 commercial cutting (aka lossless transcoding) is based on the older scripts.
Having the files get bigger is a symptom of not having the transcoding profiles set up correctly. When it's set up properly it simply transfers frame data from input to output until it gets to the keyframes around your cuts and only reencodes the frames there, then goes back to transfering untouched frames.
I'm using R5E50 out of the box. What should I do to set up the profiles correctly?
BTW, the script is running on a high definition recording, I'll post the results when it finishes.
_________________ Backend: 2.4GHz Celeron; 512Mb RAM; 130Gb IDE HDD; DVD-RW
Hauppauge Win-PVR 250; DViCO Fusion HDTV Lite
KnoppMyth R5E50 -> SVN
Frontends: Buffalo Link Theater, Mac Mini Intel duo core & Xbox
|
|
Top |
|
 |
ceenvee703
|
Posted: Sun Apr 29, 2007 2:58 pm |
|
Joined: Fri Apr 02, 2004 10:08 am
Posts: 1637
Location:
Virginia, USA
|
robsbox wrote: I'm using R5E50 out of the box. What should I do to set up the profiles correctly?
Out of the box, I think the default transcoding setting is to transcode MPEG2->RTJPEG, which would indeed inflate the file size (but which provides a much more editable video than either SD or HD MPEG2).
You need to change the transcoding setting for lossless MPEG2 conversion rathher than RTJPEG. I'm used to doing this via MythTV's front end; if you can't run the front end I'm not sure how to set it.
Edit: I'll also add that it's rare that the automatic commercial flagging gets a program completely right. I always check it--again, via the front end--to make sure that the edit points are correct, and only then do I start transcoding.
|
|
Top |
|
 |
robsbox
|
Posted: Sun Apr 29, 2007 4:38 pm |
|
Joined: Mon Jun 28, 2004 12:37 pm
Posts: 50
|
ceenvee703 wrote: You need to change the transcoding setting for lossless MPEG2 conversion rathher than RTJPEG. I'm used to doing this via MythTV's front end; if you can't run the front end I'm not sure how to set it.
I imagine I just have to change settings in the mysql database. I'll probably use webmin to do that. ceenvee703 wrote: Edit: I'll also add that it's rare that the automatic commercial flagging gets a program completely right. I always check it--again, via the front end--to make sure that the edit points are correct, and only then do I start transcoding.
That kinda defeats the whole purpose. If the cutpoints are no longer than two minutes, I'd say it couldn't screw up too badly. Do you find that is sometimes the case? False positives are worse than missing a commercial in my view.
_________________ Backend: 2.4GHz Celeron; 512Mb RAM; 130Gb IDE HDD; DVD-RW
Hauppauge Win-PVR 250; DViCO Fusion HDTV Lite
KnoppMyth R5E50 -> SVN
Frontends: Buffalo Link Theater, Mac Mini Intel duo core & Xbox
|
|
Top |
|
 |
ceenvee703
|
Posted: Sun Apr 29, 2007 7:15 pm |
|
Joined: Fri Apr 02, 2004 10:08 am
Posts: 1637
Location:
Virginia, USA
|
Others can report on their results with commercial flagging; plus there are at least three or four different modes you can pick for detecting commercials, so your results may be different depending on the mode you've selected.
I find that it can be wildly wrong on the main shows I need it to be correct on: 24 and Lost. Sometimes it starts a recording a few seconds after the show's started, and that can seem to mess up the beginning of the shows. The cuts tend to be correct after the beginning of 24 but you'd think that would be pretty easy to detect. With Lost the detection can get confused with dark scenes or fades to white. And yes, we're talking false positives here: if I would let it cut commercials automatically I would be losing parts of the show.
I'd definitely recommend trying different modes, or trying it on a less important program first, to see how well it works for you.
|
|
Top |
|
 |
tjc
|
Posted: Sun Apr 29, 2007 7:39 pm |
|
Joined: Thu Mar 25, 2004 11:00 am
Posts: 9551
Location:
Arlington, MA
|
|
Top |
|
 |
whoa
|
Posted: Sat May 26, 2007 11:08 am |
|
Joined: Fri Oct 07, 2005 7:18 am
Posts: 77
Location:
Dallas, TX
|
|
Top |
|
 |