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 Encoder GUIs

Reply
 
Thread Tools Search this Thread Display Modes
Old 25th August 2020, 09:02   #1  |  Link
YaBoyShredderson
Registered User
 
Join Date: Jul 2020
Posts: 76
Splitting files to be encoded and then put back together

I want to know of a way to split video files up, so that i can encode them and then put them back together at the end.

I have done 2 quick tests, the first i split a 30 second clip out of a few movies, and then split them into 3 10 second clips and encoded them, put them back together after. But there was audio bugs, as i split, encoded, and stitched the audio as well as the video.

So i did a second, more worst case scenario test, and learning from the previous test, i only encoded the video, and then muxed the audio back in after i had assembled the full video. I took a movie and split it into 10 second chunks, there was 729 of these chunks which were all encoded seperatly in handbrake, all using the same settings. But when i put them back together the audio was way out of sync. I could see any particular point at which it desynced, but it seems to be right from the start, but theres no obvious reason as to why.

Im doing a more reasonable test now, splitting based on frame count rather than seconds, and only using 6 files, still without the audio.

Any tips? If i can do this, it would be incredibly useful. I have been encoding 1080p stuff in handbrake, and just waiting out the whole encode, leaving it over night etc, but with 4k stuff taking in excess of 20 hours in staxrip, its just not feasable for me to wait that long, so if i can split them into chunks that take a few hours, or over night each, which can be put back together agian, that would be very useful.

EDIT: im using mkvtoolnix to split and append the files.
YaBoyShredderson is offline   Reply With Quote
Old 25th August 2020, 09:49   #2  |  Link
tebasuna51
Moderator
 
tebasuna51's Avatar
 
Join Date: Feb 2005
Location: Spain
Posts: 6,881
When you encode with Handbrake let the default VFR or you use Constant Framerate - Same as source?
Your source was already VFR?

When there are VFR involved is easy lose the audio sync when recode.
If source and encode are CFR (the full source have the same frames than the fragments) when you add the full audio to the full video recode must be in sync.
__________________
BeHappy, AviSynth audio transcoder.
tebasuna51 is offline   Reply With Quote
Old 25th August 2020, 09:58   #3  |  Link
YaBoyShredderson
Registered User
 
Join Date: Jul 2020
Posts: 76
Quote:
Originally Posted by tebasuna51 View Post
When you encode with Handbrake let the default VFR or you use Constant Framerate - Same as source?
Your source was already VFR?

When there are VFR involved is easy lose the audio sync when recode.
If source and encode are CFR (the full source have the same frames than the fragments) when you add the full audio to the full video recode must be in sync.
The source is 23.976 constant from a bluray. I encoded it as same as source constant framerate.
YaBoyShredderson is offline   Reply With Quote
Old 25th August 2020, 10:23   #4  |  Link
tebasuna51
Moderator
 
tebasuna51's Avatar
 
Join Date: Feb 2005
Location: Spain
Posts: 6,881
If the recoded video have the same number of frames and framerate than BD source (that is the same duration), and the audio is properly extracted, must be in sync.

Explain your method to extract video and audio from BD.
__________________
BeHappy, AviSynth audio transcoder.

Last edited by tebasuna51; 25th August 2020 at 10:26.
tebasuna51 is offline   Reply With Quote
Old 25th August 2020, 11:01   #5  |  Link
YaBoyShredderson
Registered User
 
Join Date: Jul 2020
Posts: 76
Quote:
Originally Posted by tebasuna51 View Post
If the recoded video have the same number of frames and framerate than BD source (that is the same duration), and the audio is properly extracted, must be in sync.

Explain your method to extract video and audio from BD.
To split the video, i use mkv toolnix, deselct everything but but the video stream. The first time i selected split after output duration of 10s with unlimited files, the second, i did by parts based on frame/field numbers. I took the length of the video in seconds, multiplied by 24, divide by 6 to get 6 equal parts. Lets say its 25000 frames. It would like this "1-25000,-50000,-75000,-100000," etc

After i put the video back together, i would take the original unsplit audio from the original file, and mux it into the stitched together video.
YaBoyShredderson is offline   Reply With Quote
Old 25th August 2020, 12:11   #6  |  Link
tebasuna51
Moderator
 
tebasuna51's Avatar
 
Join Date: Feb 2005
Location: Spain
Posts: 6,881
mkvtoolnix-GUI can't extract audio from BD's. How do you extract the audio?

Do you load a .mpls in mkvtoolnix-GUI?
The .mpls have many .m2ts?
Or there are only one .m2ts and load the .m2ts in mkvtoolnix-GUI?

The video only can be splitted in I-frames, if you select frames to split maybe the fragments aren't contiguous.
Check if the source video have the same number of frames than the full recoded video.
__________________
BeHappy, AviSynth audio transcoder.

Last edited by tebasuna51; 25th August 2020 at 12:20.
tebasuna51 is offline   Reply With Quote
Old 25th August 2020, 14:19   #7  |  Link
YaBoyShredderson
Registered User
 
Join Date: Jul 2020
Posts: 76
Quote:
Originally Posted by tebasuna51 View Post
mkvtoolnix-GUI can't extract audio from BD's. How do you extract the audio?

Do you load a .mpls in mkvtoolnix-GUI?
The .mpls have many .m2ts?
Or there are only one .m2ts and load the .m2ts in mkvtoolnix-GUI?

The video only can be splitted in I-frames, if you select frames to split maybe the fragments aren't contiguous.
Check if the source video have the same number of frames than the full recoded video.
I use an mkv ripped from the bd. How do i check the number of frames? As far as i could tell they were the same, both videos were the same length.
YaBoyShredderson is offline   Reply With Quote
Old 25th August 2020, 14:59   #8  |  Link
Atak_Snajpera
RipBot264 author
 
Atak_Snajpera's Avatar
 
Join Date: May 2006
Location: Poland
Posts: 7,803
Why don't you just use ripbot in distributed encoding mode?
Atak_Snajpera is offline   Reply With Quote
Old 25th August 2020, 15:42   #9  |  Link
YaBoyShredderson
Registered User
 
Join Date: Jul 2020
Posts: 76
Quote:
Originally Posted by Atak_Snajpera View Post
Why don't you just use ripbot in distributed encoding mode?
I have 1 computer.
YaBoyShredderson is offline   Reply With Quote
Old 25th August 2020, 16:10   #10  |  Link
Atak_Snajpera
RipBot264 author
 
Atak_Snajpera's Avatar
 
Join Date: May 2006
Location: Poland
Posts: 7,803
And so what? Is that hard to put 127.0.0.1 as IP?

Last edited by Atak_Snajpera; 25th August 2020 at 16:13.
Atak_Snajpera is offline   Reply With Quote
Old 25th August 2020, 21:09   #11  |  Link
tebasuna51
Moderator
 
tebasuna51's Avatar
 
Join Date: Feb 2005
Location: Spain
Posts: 6,881
Quote:
Originally Posted by YaBoyShredderson View Post
I use an mkv ripped from the bd. How do i check the number of frames?
Use MediaInfo (advanced mode) to know the 'Frame count'

Quote:
As far as i could tell they were the same, both videos were the same length.
Length? Maybe you want say 'Duration'

Still don't know how extract the audio.

If video source and video encoded have the same duration the audio must be in sync.
__________________
BeHappy, AviSynth audio transcoder.
tebasuna51 is offline   Reply With Quote
Reply

Tags
handbrake, mkvtoolnix, split, staxrip, stitchable

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 07:54.


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