Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Capturing and Editing Video > HDTV / DVB / TiVo
Register FAQ Calendar Today's Posts Search

Reply
 
Thread Tools Search this Thread Display Modes
Old 19th January 2009, 14:38   #21  |  Link
LonelyPixel
Registered User
 
Join Date: Apr 2007
Posts: 90
Commercials and movies do not always start and end on GOP boundaries. That's why I'm looking for frame-level editing.

Actually, at the end you don't need to encode anything. Just leave out some frames after the cut. And can't you just take the first frame and apply all changes of the next frames and use that as your new first frame for the beginning of a new cut?

Anyway, we're only re-encoding the fraction of a second. That won't be much work (for the CPU) and the quality loss is almost invisible.
LonelyPixel is offline   Reply With Quote
Old 19th January 2009, 16:52   #22  |  Link
guodongzhe
Registered User
 
Join Date: Jan 2009
Posts: 17
Ya these are all okay in technology. But I do not have any practical program.

Like what we did to mpeg2, to avc/264, I can find IDR of the start point, start decoding from IDR, when we meet start point we re-encode frames into a new file, we keep doing so till we meet next IDR, called IDR2. Then we got a new prefix-264-file.

Second, I can demux original file from IDR2 into a new middle-part-file. Attention: this will also generate new audio stream file(s), call them middle-audio-file.

Third, I can link (prefix-264-file) and (middle-part-file + middle-audio-file) by a 264 re-mux operation.

I do have all these source code we need, but they are all coarse source code, needed to be combined together. That is not very difficult, but a time-consuming work.

And finally comes the real hard job: a/v sync. Since the prefix file has no audio boundled, select a start point of middle-audio will be important. This will lead to a/v out of sync if we do not take care of it.
The in-fluency you mentioned before, may comes from such kind of problem.

Sorry friend, I did not do any real help. I was busy on managing a project on web-video-stream, something relavant to 264/avc. May be after that, I can find some time, make a so-called 'smart' program. Not so many people need this high-demand thing, but it looks useful, and worth a try.

By the way, the middle-part-file may be held in the memory buffer, make the operation in-the-fly.

Last edited by guodongzhe; 19th January 2009 at 16:53. Reason: color not comfortable
guodongzhe is offline   Reply With Quote
Old 19th January 2009, 19:01   #23  |  Link
LonelyPixel
Registered User
 
Join Date: Apr 2007
Posts: 90
Sorry, too much techno-bubble. I didn't understand a word.
LonelyPixel is offline   Reply With Quote
Old 19th January 2009, 23:02   #24  |  Link
Ventolin
Registered User
 
Join Date: Oct 2001
Posts: 125
Hi,

TSPE actually can edit to Sub-GOP accuracy. It's not yet video frame accurate, but you can set end points at P frames. Start points need to be at I/IDR frames.

I know the UI is somewhat complicated, but you can remove some of the buttons. The workflow should still be pretty simple, there are some examples on the website.

The very basic workflow is to set the start point, set the end point, then hit edit. This will trim a file. 3 clicks and you are finished. I don't know how I can make that more simple!

If you need to edit out commercials, all you do is: Set start point, set end point, click Add, repeat for next segements, then hit edit. Again, 3 clicks per segment followed by 1 click for the edit. In some cases, TSPE will automatically find the start/end points for you. How much simpler do you want it?

One of TSPE's main objectives is to be able to open any type of transport stream and edit. It is not limited by any type or number of video streams or audio streams. It is also a transport stream analyser and can fix some types of errors in the stream.

Hope that helps,

Regards,

Vent
Ventolin is offline   Reply With Quote
Old 19th January 2009, 23:12   #25  |  Link
rebkell
Registered User
 
Join Date: Oct 2006
Posts: 303
Quote:
Originally Posted by Ventolin View Post
Hi,

TSPE actually can edit to Sub-GOP accuracy. It's not yet video frame accurate, but you can set end points at P frames. Start points need to be at I/IDR frames.

I know the UI is somewhat complicated, but you can remove some of the buttons. The workflow should still be pretty simple, there are some examples on the website.

The very basic workflow is to set the start point, set the end point, then hit edit. This will trim a file. 3 clicks and you are finished. I don't know how I can make that more simple!

If you need to edit out commercials, all you do is: Set start point, set end point, click Add, repeat for next segements, then hit edit. Again, 3 clicks per segment followed by 1 click for the edit. In some cases, TSPE will automatically find the start/end points for you. How much simpler do you want it?

One of TSPE's main objectives is to be able to open any type of transport stream and edit. It is not limited by any type or number of video streams or audio streams. It is also a transport stream analyser and can fix some types of errors in the stream.

Hope that helps,

Regards,

Vent
I've been using it some lately, and I know this is nitpicky and based on a personal thing, but I didn't notice anyway to add with a keystroke, it would be friendlier if the Add button was closer to the navigation buttons instead of down at the bottom, it seems out of place, I don't know where you would put it, but down at the bottom while editing in the middle of the screen doesn't seem to fit in the flow.

Another thing I've run into, when you highlight a couple of your edits in the edit list that the highlight doesn't stay, it sort of grays out and it's hard to determine that they are highlighted, which is no biggie, but if you finish editing and adding the sections you want for the final file and then click edit, the highlighted ones are the only ones that get processed.
rebkell is offline   Reply With Quote
Old 19th January 2009, 23:31   #26  |  Link
Ventolin
Registered User
 
Join Date: Oct 2001
Posts: 125
Hi,
Quote:
Originally Posted by rebkell View Post
I've been using it some lately, and I know this is nitpicky and based on a personal thing, but I didn't notice anyway to add with a keystroke, it would be friendlier if the Add button was closer to the navigation buttons instead of down at the bottom, it seems out of place, I don't know where you would put it, but down at the bottom while editing in the middle of the screen doesn't seem to fit in the flow.
If you do Help -> Keyboard shortcuts you can see there is a group of keys: I O J K L - I/O sets the In/Out (Start/End) points, J/L moves +/- I frames, K plays/pauses. CTRL and Shift modify these keys so you can do CTRL+I to set and test the Start point. ALT+A adds the start/end points to the list, but is undocumented. Similarly, ALT+E makes an edit.

Quote:
Originally Posted by rebkell View Post
Another thing I've run into, when you highlight a couple of your edits in the edit list that the highlight doesn't stay, it sort of grays out and it's hard to determine that they are highlighted, which is no biggie, but if you finish editing and adding the sections you want for the final file and then click edit, the highlighted ones are the only ones that get processed.
If no items in the EDL are selected, all items are processed when you press Edit. Otherwise, only the selected items are included in the edit. Selecting 2 items and right clicking lets you test the edit point between the 2 items.

Hope that helps, apologies for straying off topic! (please do post in the TSPE thread for further discussion)

Regards,

Vent
Ventolin is offline   Reply With Quote
Old 20th January 2009, 04:28   #27  |  Link
rebkell
Registered User
 
Join Date: Oct 2006
Posts: 303
Sorry about the off topic post, I actually thought I was in that thread.
rebkell is offline   Reply With Quote
Old 20th January 2009, 07:37   #28  |  Link
LonelyPixel
Registered User
 
Join Date: Apr 2007
Posts: 90
Quote:
Originally Posted by Ventolin View Post
If you need to edit out commercials, all you do is: Set start point, set end point, click Add, repeat for next segements, then hit edit. Again, 3 clicks per segment followed by 1 click for the edit. In some cases, TSPE will automatically find the start/end points for you. How much simpler do you want it?
Cut mode. Select start and end of commercials and cut it out. Sometimes they repeat a bit of the movie after the commercials, and then I look out for a good place to cut within the movie so that fading to/from black or the movie name in big letters is also cut out. I need to find the same place before and after the commercials block. It's not easy if this is on two different cuts.

Anyway, what is a P/I/IDR frame? Does it occur more often than every 100 ms? And when cutting within the movie, I really need to find the very same frame, not something a few 100 ms off.
LonelyPixel is offline   Reply With Quote
Old 15th February 2009, 18:02   #29  |  Link
Cela
Registered User
 
Join Date: May 2004
Posts: 185
Quote:
Originally Posted by guodongzhe View Post
Ya these are all okay in technology. But I do not have any practical program.

Like what we did to mpeg2, to avc/264, I can find IDR of the start point, start decoding from IDR, when we meet start point we re-encode frames into a new file, we keep doing so till we meet next IDR, called IDR2. Then we got a new prefix-264-file.

Second, I can demux original file from IDR2 into a new middle-part-file. Attention: this will also generate new audio stream file(s), call them middle-audio-file.

Third, I can link (prefix-264-file) and (middle-part-file + middle-audio-file) by a 264 re-mux operation.

I do have all these source code we need, but they are all coarse source code, needed to be combined together. That is not very difficult, but a time-consuming work.

And finally comes the real hard job: a/v sync. Since the prefix file has no audio boundled, select a start point of middle-audio will be important. This will lead to a/v out of sync if we do not take care of it.
The in-fluency you mentioned before, may comes from such kind of problem.

...

May be after that, I can find some time, make a so-called 'smart' program.
Hope you will find this time very soon! Many TB of H.264 footage is waiting on many external USB disks to be frame accurately smart cut with a/v-sync conserved throughout!

Quote:
Originally Posted by guodongzhe View Post
Not so many people need this high-demand thing, but it looks useful, and worth a try.
Not so many people? Here you are definitly wrong! EVERYBODY (including me and some million other users) needs frame accurate, a/v-sync conserving, smart editing (no re-encoding, only copying of middle part)!
Everybody takes this for granted from mpeg2 editing. For mpeg2 there is excellent freeware availble which sets a comfortable standard, for example Mpeg2Schnitt for PAL footage. We need and want the same comfort for h.264!
It is astonishing, all those who can do it with re-encoding seem to not want to do it with re-encoding the first and last edited GOP only. Maybe they are so proud being able to re-encode that simply to copy the middle part is too less a challange for them?

Quote:
Originally Posted by guodongzhe View Post
By the way, the middle-part-file may be held in the memory buffer, make the operation in-the-fly.
With HDTV captures the (copy only) middle-part generally is some GB. I do not have so much free buffer memory on my laptop.

I am happy to use Ventolin's TSPE until you or somebody else will come up with a "H264Cutter" with features for h.264 footage like Mpeg2Schnitt provides for mpeg2 footage.
TSPE does an excellent job for all projects where cutting to a millisecond is not required. You learn to use it fluently by doing 2 or 3 jobs. Then it is easy to use. Gives exact control of what is done. Produces output at the speed of a copy operation. Best of all, a/v-sync is conserved throughout all processing and does not require demuxing and remuxing steps in the workflow!

It will be an interesting competition. Who will be first to provide the real thing? Ventolin, guodongzhe or others working to the same goal?
For the time being, Ventolin is ahead, only multi-stream support and frame-accurate smart editing of first and final GOP of each EDL needs to be added. Then it will be perfect.
Or, take Ventolin's a/v-sync solution and mix it with guodongzhe's prefix/postfix-264-file solution... Just dreaming...

Quote:
Originally Posted by LonelyPixel
...Anyway, what is a P/I/IDR frame?
LonelyPixel, a good question for an user with your nickname! Anyway, what is a pixel? Aren't pixels small details of frames? Aren't there frames with more and with less pixels, even with lonely pixels? You forgot to mention key frames. Have a look at Wikipedia. Download TSPE trial and explore it yourself.

Quote:
Originally Posted by LonelyPixel
... And when cutting within the movie, I really need to find the very same frame, not something a few 100 ms off.
I fully agree with you that this will be the goal. No need to worry about finding other suitable cut points at key frames where the flow of video and audio does not get interrupted. Give the wise guys some more weeks and we will get what we really want!

Cheers,

Cela

Last edited by Cela; 15th February 2009 at 18:08.
Cela is offline   Reply With Quote
Old 15th February 2009, 20:54   #30  |  Link
LonelyPixel
Registered User
 
Join Date: Apr 2007
Posts: 90
Mpeg2Schnitt is not frame-accurate!
LonelyPixel is offline   Reply With Quote
Old 16th February 2009, 12:27   #31  |  Link
Gavino
Avisynth language lover
 
Join Date: Dec 2007
Location: Spain
Posts: 3,431
Cuttermaran (which is free) provides frame-accurate MPEG1/2 editing, re-encoding only where necessary to rebuild an edited GOP.
Gavino is offline   Reply With Quote
Old 16th February 2009, 18:03   #32  |  Link
Cela
Registered User
 
Join Date: May 2004
Posts: 185
Quote:
Originally Posted by LonelyPixel View Post
Mpeg2Schnitt is not frame-accurate!
LOL. Mpeg2Schnitt (german for "Mpeg2Cut"), like Cuttermaran, IS frame-accurate if you use it correctly!

You may not use it often. Or, if you use it, you did not set it up correctly. I use its frame-accurate cut feature every day!

Google translation from the appropriate section in the (german) help file:
3. Cuts Set
The parts of the video or (and) the audio files into the newly-cut files are to be taken must be cut in the cut list will be added (positive list). Each section consists of one IN and one OUT intersection. The IN-intersection is the first picture that is being adopted and the OUT-intersection is the last picture is still on. To create the cuts do you control the corresponding point in the video and then press the IN or OUT button. The intersection is taken over and the key right next to it appears. Clicking this button allows the slider to jump to the appropriate position. In addition, the cut as a blue area on the sliding scale. Is the IN and OUT of the intersection must be cut down in the cut list will be inserted. For this you click on the bottom button (with the small scissors). As cuts in the cut list can be inserted under Options -> cut list -> Others can be set. Should another short Einfügeart {~ input mode} can be used by Rechtsklich {~ right mouse button click} on this button a sub menu. The entry will overwrite the change in the cut list, cut marked with the actual value. If the IN or OUT button with a question mark and red text must be an intersection at this point to be recalculated. The intersection must be calculated are also in the cut list red. Cuts with no new points are calculated only on I and P frames possible. The sequence of cuts in cut list can push through with the mouse will change. Some functions, such as "Intersection delete", are available only through the context menu of the editing window or keystrokes away.

This translation is really bad. But what it tells is:
Mpeg2Schnitt does I-to-I frame and I-to-P frame cuts WITHOUT re-encoding and other cuts (marked with red text) WITH re-encoding (recalculation) to and from the next I frame. To use re-encoding you have to setup the connection between Mpeg2Schnitt and your favourite encoder first!

In short:
Quote:
Originally Posted by Gavino View Post
Cuttermaran (which is free) provides frame-accurate MPEG1/2 editing, re-encoding only where necessary to rebuild an edited GOP.
Same applies to Mpeg2Schnitt (which is free)!

Cela

Last edited by Cela; 16th February 2009 at 18:06.
Cela is offline   Reply With Quote
Old 16th February 2009, 18:16   #33  |  Link
LonelyPixel
Registered User
 
Join Date: Apr 2007
Posts: 90
Last time I tried version 0.91, it did not allow to set in/out points somewhere else than every few frames. NOT everywhere. Can you please point me to the help page? I cannot find the text you're referring to. (German description is okay.)
LonelyPixel is offline   Reply With Quote
Old 16th February 2009, 22:18   #34  |  Link
Cela
Registered User
 
Join Date: May 2004
Posts: 185
Quote:
Originally Posted by LonelyPixel View Post
Last time I tried version 0.91, it did not allow to set in/out points somewhere else than every few frames. NOT everywhere. Can you please point me to the help page? I cannot find the text you're referring to. (German description is okay.)
Mpeg2Schnitt homepage (in german):
http://www.mdienert.de/mpeg2schnitt/

Mpeg2Schnitt forum (in german):
http://forum.dvbtechnics.info/forumdisplay.php?f=15

For a correct setup of frame-accurate cutting, please, refer to the instructions in the "Hilfe" (Help):
> open Mpeg2Schnitt homepage (in german) at http://www.mdienert.de/mpeg2schnitt/
> Select "Hilfe" (Help) at the left side of the HP and you will get "Hilfe zum Mpeg2Schnitt-Programmpaket" (Help for Mpen2Schnitt)
You can also download the Help File "Mpeg2Schnitt09HtmlHilfe.zip" in the Download section.

Start reading by selcting "Erste Schritte" (first steps)
> Einfuehrung in (Introduction to) Mpeg2Schnitt
> Systemvoraussetzungen und Installation (System requirements and installation)
> In wenigen Schritten zum geschnittenen Video (In a few steps to the cut video)

For setup of frame-accurate cutting, please, consult
> "Hilfe" > "Wie macht man was" (How to do it)
> There select "Programmeinstellungen" (program settings)
> The select "Encoder - framegenauer Schnitt, lange GOPs kürzen" (Encoder - frame-accurate cut, shorten long GOPS)

It is very important to follow all the instructions precisely.
I use "Encoder\EncoderHC21.prg"
DGDecode.dll Version 1.4.8.0 217 KB
HCenc_021.exe Version 0.21.0.0 1.168 KB
and
HC.ini
with the following 4 lines as content:
Code:
*MAXBITRATE       6000
*MATRIX           mpeg
*NOSCD
*WAIT             0
and
EncoderHC21.prg with the following content:
Code:
[Encoder HC021]
X0X=*interlaced
X1X=
:enc
Echo Videoteil berechnen ($BeginIndex#, $EndIndex#)
cpsourcefile
copyx "$ProgramDirectory#\Encoder\HC-M2S-org.ini" "$TempDirectory#\HC-M2S.ini"
:eff
copyx "$ProgramDirectory#\Encoder\HC-M2S-Eff-org.ini" "$TempDirectory#\HC-M2S.ini"
Rem :all
Rem "$ProgramDirectory#\Encoder\DGmpgdec\DGIndex.exe" -IF=[$PartFile#] -OF=[$PartFiled2v#] -hide -exit
:enc
RunnotCml "$ProgramDirectory#\Encoder\HCEnc\HCenc_021.exe" -i "$PartFiled2v#" -o "$NewFile#" -ini "$TempDirectory#\HC-M2S.ini"
:eff
RunnotCml "$ProgramDirectory#\Encoder\HCEnc\HCenc_021.exe" -i "$TempDirectory#\AViSynthscript.avs" -o "$NewFile#" -ini "$TempDirectory#\HC-M2S.ini"
:all
Rem DeleteTempFiles=0
The Google translation quotes the following section of the "Hilfe":
> Erste Schritte (First steps)
>> In wenigen Schritten zum geschnittenen Video (Few steps to the cut video)
>>> 3. Schnitte festlegen (Doing the cuts - How to cut)

There should be an english version out there, at least I know from the forum that there were translations done. But since my german is better than my english, I did not follow up.

If you need more informations feel free to contact me by PM.

Good luck,

Cela
Cela is offline   Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 18:20.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.