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 > Video Encoding > MPEG-4 AVC / H.264

Reply
 
Thread Tools Search this Thread Display Modes
Old 15th October 2010, 00:22   #1  |  Link
asarian
Registered User
 
Join Date: May 2005
Posts: 1,426
Splicing x264 encoded parts together?

Let's say I have an encoded movie (with x264), with some artifacts in a frame in the first 5 minutes.

If I re-encoded the first 5 minutes (same settings and all), could I splice the two parts together somehow? (without having to re-encode both). I mean, it's all a stream being encoded in a run-length sorta way, but does it ever stop and start from scratch? Like with the start of a new frame, or end of a GOP or something? If so, I might be able to splice pieces together.

Thanks.
__________________
Gorgeous, delicious, deculture!
asarian is offline   Reply With Quote
Old 15th October 2010, 02:27   #2  |  Link
Blue_MiSfit
Derek Prestegard IRL
 
Blue_MiSfit's Avatar
 
Join Date: Nov 2003
Location: Los Angeles
Posts: 5,864
It's definitely possible, though it should happen on GOP boundaries - probably only on true "IDR" I frames.

I don't know of a tool that does this off the top of my head.

You're probably best off just re-encoding the whole thing :P

Derek
__________________
These are all my personal statements, not those of my employer :)
Blue_MiSfit is offline   Reply With Quote
Old 15th October 2010, 02:43   #3  |  Link
asarian
Registered User
 
Join Date: May 2005
Posts: 1,426
Quote:
Originally Posted by Blue_MiSfit View Post
It's definitely possible, though it should happen on GOP boundaries - probably only on true "IDR" I frames.

I don't know of a tool that does this off the top of my head.

You're probably best off just re-encoding the whole thing :P

Derek
Thanks for the reply.

Yeah, I would normally just re-encode; but in this particular case, I'm having a movie ("Stargate") which keeps crashing the MCTemporalDenoise process a lot (tried all different sorts of thread numbers). Anyway, as it finally encoded properly, there appeared exactly 1 frame in it that has artifacts. So, I was hoping of maybe just having to redo the first few minutes.
__________________
Gorgeous, delicious, deculture!
asarian is offline   Reply With Quote
Old 15th October 2010, 02:45   #4  |  Link
roozhou
Registered User
 
Join Date: Apr 2008
Posts: 1,181
This is called segment re-encoding. Professional encoders like CineVision can do this. If you are using x264, mkvmerge can help you split and join encoded videos.
roozhou is offline   Reply With Quote
Old 15th October 2010, 03:35   #5  |  Link
asarian
Registered User
 
Join Date: May 2005
Posts: 1,426
Quote:
Originally Posted by roozhou View Post
This is called segment re-encoding. Professional encoders like CineVision can do this. If you are using x264, mkvmerge can help you split and join encoded videos.
Thanks. I'll look into mkverge again (last time I did, a year ago or so, I didn't get the impression it was at all capable of such fine-grained splicing; but I like to be surprised).
__________________
Gorgeous, delicious, deculture!
asarian is offline   Reply With Quote
Old 15th October 2010, 07:15   #6  |  Link
Blue_MiSfit
Derek Prestegard IRL
 
Blue_MiSfit's Avatar
 
Join Date: Nov 2003
Location: Los Angeles
Posts: 5,864
I think x264 would be more than capable of doing this - it's just not really the encoder's job. It's more the job of the calling application / muxer in my opinion.

A gui built around libx264 could do it, I'd imagine
__________________
These are all my personal statements, not those of my employer :)
Blue_MiSfit is offline   Reply With Quote
Old 16th October 2010, 11:27   #7  |  Link
asarian
Registered User
 
Join Date: May 2005
Posts: 1,426
Operation succeeded with mkvmerge! :) Had a bit of trouble remuxing afterwards, as tsMuxeR doesn't seem to recognize the mkv generated by mkvmerge (?); but eac3to came to the rescue (remuxing to another mkv). I guess it's that header compression thingy or some such.

To avoid the least possible delays, finally I just split the files in half, and spliced the latter half of the old movie to the former half of the new encode (without the frame with artifacts).

The result? Flawless, and seamless new movie; and not any delay that I can witness (I can usually spot anything thing from a 50-100ms sync-error).
__________________
Gorgeous, delicious, deculture!
asarian is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 12:22.


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