View Full Version : How do you remux Spiderman 2 BD?
Roscoe62
5th October 2007, 22:26
Oh boy....
I bought the spidey trilogy on BD (luckily for me it's released here quite a bit earlier than it is in the US). The first movie I've ripped to HD & remuxed using the usual tools - no problems.
However, Spidey 2 represents a new problem. The disc has both spidey 2 & 2.1 and uses seamless branching EXTENSIVELY. Whereas in the past I've been able to use xport or TsRemux to extract the audio or video files from the one or two main m2ts files, on this disc there are a LOT more than just 2 files. I will try to attach a file showing the list of files in the STREAM sub-directory. It's not a complete list, but those files out of the picture are pretty small - the picture is enough so you get the idea.
I'm hoping a solution can be found to handle this, but I'm guessing it's going to take some time. If anyone can show me some other way of doing this I'd be very grateful.
On the other hand, if there's any further information I can provide to the developers of those (or other) tools, I'm happy to help.
idbirch2
8th October 2007, 13:04
I too am trying to figure this out, I can tell you how to get the files joined into one useable m2ts file but I don't know how to figure out what order they go in without manually opening each one and figuring it out.
In order to join, just use the "copy /b 000001.m2ts + 000002.m2ts + ..... JoinedMovie.m2ts" command from a command prompt to join the files. This will produce a single m2ts file but you need to remove the stream end flags to fix the timecodes, simply run the file through TSRemux to achieve this.
musicman2311
8th October 2007, 13:28
I too am trying to figure this out, I can tell you how to get the files joined into one useable m2ts file but I don't know how to figure out what order they go in without manually opening each one and figuring it out.
In order to join, just use the "copy /b 000001.m2ts + 000002.m2ts + ..... JoinedMovie.m2ts" command from a command prompt to join the files. This will produce a single m2ts file but you need to remove the stream end flags to fix the timecodes, simply run the file through TSRemux to achieve this.
hi there,
as for which parts belong together in which order, use bdedit and look at each m2ts file. there will be one which shows the parts needed in which order (i did that for deja vu).
as for copy /b - i have better results if i apply that to the elementary streams (audio, video) then remux.
hope this helps
honai
8th October 2007, 15:06
It would be nice if the user who figured out the correct order (and which of those files actually belong to the main feature) posted his findings. Thanks.
idbirch2
8th October 2007, 15:47
Well I've used BDEdit on the source files and found two playlists for the main movie, I assume the longer one is Spiderman 2.1. The comand for joining the longer of the two is:
copy /b 00000.m2ts + 00005.m2ts + 00006.m2ts + 00008.m2ts + 00009.m2ts + 00016.m2ts + 00017.m2ts + 00055.m2ts + 00056.m2ts + 00022.m2ts + 00023.m2ts + 00024.m2ts + 00025.m2ts + 00026.m2ts + 00027.m2ts + 00030.m2ts + 00031.m2ts + 00032.m2ts + 00033.m2ts + 00057.m2ts + 00103.m2ts + 00050.m2ts F:\sm2.m2ts
Save this as a .bat or .cmd file and place it in the same folder as all of your m2ts files. Obviously replace the F:\ with whatever drive you want the output to be.
The other playlist is as so:
copy /b 00001.m2ts + 00005.m2ts + 00007.m2ts + 00008.m2ts + 00010.m2ts + 00016.m2ts + 00038.m2ts + 00055.m2ts + 00054.m2ts + 00022.m2ts + 00041.m2ts + 00024.m2ts + 00042.m2ts + 00026.m2ts + 00043.m2ts + 00030.m2ts + 00045.m2ts + 00032.m2ts + 00046.m2ts + 00057.m2ts + 00058.m2ts + 00050.m2ts F:\sm2.m2ts
Roscoe62
9th October 2007, 01:26
idbirch2,
Thanks so much for doing the legwork for this. However, once all the pieces are joined into one .m2ts file....
but you need to remove the stream end flags to fix the timecodes, simply run the file through TSRemux to achieve this.
Exactly how do I "run the file through TSRemux" to remove the stream end flags? Do you mean just remux the joined m2ts to output a new m2ts file? Are there any extra settings that need to be selected?
honai
9th October 2007, 04:57
@idbirch2
Thanks for doing the work, appreciate it.
I've noticed you're concat'ing to "F:\sm3.m2ts". So is that Spiderman 2 or Spiderman 3?
@Roscoe62
Just remux, don't change anything (unless you want to exclude some audio tracks, for example).
idbirch2
9th October 2007, 07:06
Ah, well spotted honai, just a typo there, Spiderman 3 doesn't have any seamless branching, it's all in one m2ts file. Editted post to avoid confusion.
Roscoe62
10th October 2007, 22:14
OK, well I can confirm this method is working well. I ended up with the joined .m2ts file, remuxed it to another .m2ts file with TSRemux. From there I used xport to extract the video file and the TruHD audio file.
I muxed the video into a matroska container making sure to include the timecodes.txt file to ensure a 23.976 framerate. I used EAC3to to convert the TruHD audio track into a multi-channel .wav file and muxed that and the video into a new mkv file.
Only problem now is the audio starts off in sync, but by the end of the movie the audio is more than a second ahead of the video.
I don't know if I've done anything incorrectly or if there's a way to fix this problem.
Has anyone else remuxed this to mkv? If so, is your audio OK?
idbirch2
10th October 2007, 22:39
I have exactly the same issue after a slightly different procedure. I joined into a single m2ts file and then re-encoded the video using HCEnc to MPEG2. I then extracted the audio using TSRemux and converted it to AC3 using eac3to. After muxing the MPEG2 video with the a3 audio, I have good sync at the start and completely out by the end. I did sit down and work out which join it lost sync at but I can't remember what it was now.
The problem is with tsremux, it is not joining properly. I had exactly the same problem with Alien Vs Predator and had to spend quite some time manually snipping bits out and joining back together to achieve sync.
For Spiderman 2, I have re-encoded each m2ts file seperately and extracted the audio for each m2ts seperately too. I then muxed each of the 22 .m2v and .ac3 files into seperate .ts files and then joined them. No sync issues now.
Roscoe62
10th October 2007, 23:10
Thanks for posting back.
OK, so you've got a solution - even if it does involve a bit of work.
3 questions...
1) What tool are you using to mux each of the audio/video files into a ts file?
2) Can the tool handle AVC video, or only MPEG2?
3) Can the tool handle other audio formats - I personally used multi-channel wav, but I don't know whether ts will handle that. (trying to keep the audio lossless)
I'd prefer keeping the AVC video, but I'll convert to MPEG2 if I have to.
idbirch2
10th October 2007, 23:15
Looks like I jumped the gun, my final .ts file is also having sync issues :( The (correction) 22 sperate .ts file are all synced perfectly but when I join them the sync issue is back.
I used Manzanita for muxing, it only supports MPEG2. If I can find a method that works properly, I'll post back. You won't have to re-encode to MPEG2 if you don't want, the key is to process each m2ts seperately, regardless of how you process it.
Roscoe62
11th October 2007, 00:04
Thanks idbirch2,
Let us know how you get on. :)
Thunderbolt8
11th October 2007, 00:14
try muxing the joined m2ts file with gdsmux to .mkv (deselect the audio tracks if you want to convert them with eac3to; LPCM generally doesnt work with gdsmux) instead of using tsremux. maybe this helps. mux to .mkv and then another mux with mkvmerge with the timecodes file.
if this doesnt helptry to alter the muxed fps rate of the video to 23.9755 or 23.9765 or something like that. experiment with it.
idbirch2
11th October 2007, 00:52
Well I've managed to get my MPEG2 re-encode in sync. I joined the 22 aforementioned .ts files with a program called TSSplitter. The resulting .ts would only show up as about 25 minutes in any playback app though so I ran it through a few remuxing apps and the only one I could find which fixed the timecodes and didn't skew audio was TSRemux!
Roscoe, if Thuderbolt's advice does not work, try processing each m2ts seperatley, joining the resulting files together and then running it through TSRemux.
Thunderbolt8
11th October 2007, 15:02
can tssplitter also handle .m2ts files to join the same way as normal .ts files ?
idbirch2
11th October 2007, 15:23
I honestly dont know. I'm sure I've used TSSplitter to join some .001, .002 etc files in the past and I think it will just join anything you tell it to, give it a try and let us know how it goes.
Thunderbolt8
12th October 2007, 14:04
I mean im quite sure it'll do that, but what I meant was will the result be allright regarding the delay, as there is also no delay caused by this using normal .ts files
Darth Pinous
12th October 2007, 21:24
Very interesting thread. I encountered the same problem as Roscoe. Remuxed video shows 2:15:48, as remuxed audio is 2:15:47...
idbirch2, I saw the time length of your working MPEG2 TS remux seems to be 2:15:43... Did you cut something manually in the process ?
idbirch2
12th October 2007, 22:32
Hi Darth, no, no cutting of any sort. Any difference in the duration will be due to processing the files seperately and then joining afterwards. Don't forget I have re-encoded both the video and audio and then remuxed them, a difference of a few seconds on a movie over 2 hours wasn't unexpected.
Roscoe62
12th October 2007, 22:54
Well, I have to say I've had absolutely no luck getting this to sync.
I tried several methods - I retained the multi-channel wav file from my first attempt. Just as a check method I remuxed this wav file into a mka file and set up a filter graph to play it. Runtime was 2:15:47. I then remuxed each m2ts file into a ts file with just the video and one ac3 file (I think it was czech - not sure) using TSRemux, used copy /b to join them and TSRemux to repair. I set up a filter graph and audio & foreign ac3 track seemed to by in sync - also runtime was 2:15:47 - I took this to be a good sign. Used xport to extract AVC file and used MKVMerge to remux to mkv - using 23.976 timecodes file and nominating same as framerate (which you have to do for AVC video in MKVMerge). Still got exactly the same sync problem.
I then tried the final mux again but used a timecode of 23.977 - didn't seem to make any difference.
Thinking on this I'm wondering how idbirch2 managed to get it to work and I've got a couple of thoughts. Feel free to debunk them as they're just thoughts.
First off, idbirch recoded the video to MPEG2, a format I understand is pretty fault tolerant - especially in ts files. AVC is not as forgiving - this info from the TSSplitter site. Secondly he recoded the audio to AC3 which will happily remux into ts. My attempts all use multi-channel wav which won't go into a ts file. I'm pretty sure ts supports LPCM but I'm not sure how to use EAC3to to create an LPCM file in the correct format - and even then I don't have Manzanita to mux into ts anyway. If I had to guess I'd say that idbirch's success is because of one or both of these factors.
In any case, for the moment I've run out of ideas. :confused:
maya
13th October 2007, 04:10
can tssplitter also handle .m2ts files to join the same way as normal .ts files ?
Yes, tssplitter will join m2ts files-have done it with Crimson Tide BD, The Rock BD, and Con Air BD.
DeepBeepMeep
13th October 2007, 22:11
It seems TSRemux causes sync issues. What you could do is not use it at all that is:
- merge all the file using the copy method
- use xport to extract the AVC and trueHd track even if continuity issues are reported
- extract from the true hd track, the AC3 track using EAC3TO
- remux the AVC track and the AC3 with 23.976 timestamps into a matroska file using mkvmerge
The end result seems to offer a proper audio /video sync
honai
13th October 2007, 22:28
No, it doesn't. I have used exactly that sequence, both the extracted AC3 and a converted DTS (TrueHD->WAVs->DTS) are out-of-sync (the AC3 by approx. 100-200ms, the DTS by more than a second).
Thunderbolt8
15th October 2007, 10:51
so far all trueHD tracks i've demuxed (although they were all on HDDVD) were out of sync for me, madshi said this is quite normal. but they should all only need a static delay so I guess you have to try it out yourself.
Darth Pinous
15th October 2007, 11:51
so far all trueHD tracks i've demuxed (although they were all on HDDVD) were out of sync for me, madshi said this is quite normal. but they should all only need a static delay so I guess you have to try it out yourself.
Not in that case. The eac3to-converted TrueHD track is maybe off-sync by 50 ms at the start, but it's more like 1000 ms at the end of the movie.
Maybe there's a need to add a static delay to all the 22 parts, though.
idbirch2
15th October 2007, 14:23
Hi guys, I'm sorry to hear this title is still giving you grief. The idea of setting delays on indiviual segments sounds like a good one, I know you won't need to do this for all 22 though, I remember at one point I went through one of my remuxed attempts to find out where the sync was being lost and it was only at a few of the joins where the audio went out. I'm sorry but I can't remeber at what points this was now.
Can someone who is trying to remux to .mkv try the following:
Demux the audio and video streams from each of the 22 segments.
If desired, re-encode the audio using eac3to
Mux each set of audio/video files into 22 seperate mkv files
Playback each .mkv file seperately, are they in sync?
If they are there are a few routes you can go down but if not, we need a new approach.
Limobar
16th October 2007, 21:41
This is how I got myself a synced AC-3 file:
- Create an AC-3 stream from the TrueHD stream, using EAC3TO.
- Use MKVMergeGUI to cut the audio at 00:51:15 and 01:47:45. This will give you three files.
- Use MKVMergeGUI to open the first file (use a delay of -25).
- Append the second file (use a delay of -100).
- Append the third file (use a delay of -675).
- Remux these files.
- Use MKVExtractGUI to demux the correctly synced AC-3 file.
The total correction is -800ms.
honai
16th October 2007, 22:06
@limobar
How did you arrive at those numbers?
Limobar
17th October 2007, 00:15
You can play the encode (in my case wvc1) with Media Player Classic and sync the movie at the start (first correction). Continue the movie until there's a new sync issue, write down the time and resync the audio/video. Do this until the end of the movie. In my case there were three corrections necessary (00:00:00 -> correction of -25ms in MPC)-(00:51:15 -> correction of -125ms in MPC)-(01:47:45 -> correction of -800ms in MPC). This leads to corrections of -25ms, -100ms and -675ms.
It's possible that my situation is different from yours, but the method can still be used.
honai
17th October 2007, 00:36
Thanks for the explanation. So at those timestamps there is no actual delay, but you just chose arbitrary spots to compensate for a slight global drift, is that correct?
Using the MPC method in the past I have found that the result isn't deterministic when seeking, i.e. successive runs yield a different delay for the same movie, so in this case the overal delay of 800ms might not be accurate at all.
By the way, as I've pointed out in the eac3to thread, your monitor might also introduce a delay of its own to the equation, especially if it's a panel similar to the Dell 2105/07/2405/07.
Limobar
17th October 2007, 01:20
So at those timestamps there is no actual delay, but you just chose arbitrary spots to compensate for a slight global drift, is that correct?
No, the timestamps are certainly not arbitrary. The timestamps are very close to a new sync difference.
Using the MPC method in the past I have found that the result isn't deterministic when seeking, i.e. successive runs yield a different delay for the same movie, so in this case the overal delay of 800ms might not be accurate at all.
I don't have bad experiences with MPC and determining delays. I highly doubt whether it would be MPC that causes different delays. It would make more sense to me if it had to do with the used decoder, the processor or other Windows processes. I believe that most people use MPC to determine delays.
By the way, as I've pointed out in the eac3to thread, your monitor might also introduce a delay of its own to the equation, especially if it's a panel similar to the Dell 2105/07/2405/07.
That's possible, but probably not very important. I can play encodes from others without sync differences and others can play my encodes without sync differences, even though we most certainly use different panels.
scarbrtj
25th October 2007, 05:16
I can't wait for the day when you can pop in a Blu-Ray or HD-DVD, no matter the disc or format, and the "not-yet-created software program" will rip a single movie to disc in the video format and resolution you want, and in the audio format you want...a movie file playable in any PC player or portable device.
No muss, no fuss.
A guy can dream, 'cause all this is exasperating.
Darth Pinous
25th October 2007, 09:34
You can play the encode (in my case wvc1) with Media Player Classic and sync the movie at the start (first correction). Continue the movie until there's a new sync issue, write down the time and resync the audio/video. Do this until the end of the movie. In my case there were three corrections necessary (00:00:00 -> correction of -25ms in MPC)-(00:51:15 -> correction of -125ms in MPC)-(01:47:45 -> correction of -800ms in MPC). This leads to corrections of -25ms, -100ms and -675ms.
It's possible that my situation is different from yours, but the method can still be used.
Just to add my own experience, I tried to mux idbirch2's MPEG2 reencode with the Wavpack converted TrueHD audio I had, no success.
So I applied limobar's method, and here's what I spotted :
Time ---- audio delay ---- absolute audio delay
0:00:00 ---- +100ms ---- +100ms
0:14:03 ---- +100ms ---- +200ms
0:25:06 ---- +100ms ---- +300ms
0:32:46 ---- +200ms ---- +500ms
0:34:51 ---- +100ms ---- +600ms
0:44:12 ---- +100ms ---- +700ms
0:48:57 ---- +100ms ---- +800ms
1:18:17 ---- +50ms ---- +850ms
1:34:22 ---- +100ms ---- +950ms
Clearly there's no slow drift of the audio (nearly all corrections I made where during the first 50 min).
And about Limobar's method, if you want to keep a lossless soundtrack (uncompressed WAV or compressed with FLAC or Wavpack), I would suggest to manipulate only WAV files for cut, delay and append, and not to use mkvmerge for that as it clearly alter the audio (I don't know why, maybe it's an option to change). I personally used beslipt to cut the audio, wavewizard to add delay, and foobar to append all delayed WAV files in one.
Roscoe62
30th October 2007, 07:55
Darth,
Just to be clear, you're taking the complete 1 piece wav file and cutting it at the timepoints you've specified in your post and you're using wavewizard to remove the delay (again, as you've specified) and you're using foobar to join all the wav pieces back together again?
Can I also assume you're not making ANY changes to the video file at all?
...and finally once all the work is done to the wav file, it's OK to use something like mkvmerge to mux the fixed wav file into matroska?
Again, thank you for your work on this!
Darth Pinous
30th October 2007, 14:18
Darth,
Just to be clear, you're taking the complete 1 piece wav file and cutting it at the timepoints you've specified in your post and you're using wavewizard to remove the delay (again, as you've specified) and you're using foobar to join all the wav pieces back together again?
Yes to all that you said, except for wavewizard.
I'm using wavewizard to add delay (i.e. silence) at the beginning of each part. Problem is you will hear silence during the movie... So one better but harder way would be to open each part with a WAV editor like Sound Forge or Wavosaur, and add a delay by duplicating the beginning of the file (for example, you need to add 200 ms to one part. You open the file, copy the first 200ms of the audio and paste it at the beginning. This way it is very difficult to hear where you added delay).
Can I also assume you're not making ANY changes to the video file at all?
Yes, you can. Manipulating audio is better, as we don't loose definition during the process... and audio reencoding is much faster work than video reencoding, especially in 1080p.
...and finally once all the work is done to the wav file, it's OK to use something like mkvmerge to mux the fixed wav file into matroska?
I don't know that. I always use mkvmerge but with Wavpack file (in lossless mode, of course) for audio, so I couldn't say for WAV files...
I think it's okay as long as you don't do cut and/or append with it.
Again, thank you for your work on this!
Thanks, I hope it will help... :)
Thunderbolt8
18th November 2007, 02:25
so was anyone here finally able to have a correct remux working, without any sync issues?
I would like to remux ratatouille, and it also has seamless branching en masse and desync audio after a while in the movie when I use copy /b :S
btw. encoding behaviour seems to be generally different as when just remuxing those seamless branching movies. I did a testencode with ratatouille and it was completely in sync with the audio, while it was not when I demuxed&remuxed it. reason might be that the number of frames is handled wrong by demuxers, for example mencoder gave me a higher number of frames for the video stream as there were pointed out by megui for the encode.
Roscoe62
23rd November 2007, 19:42
Sorry for the late reply.
Unfortunately I'm in the same boat as you. I haven't been able to get this to work effectively.
I really think we're in one of those situations where we either need a new tool for this, or to have an existing one modifed to properly join multiple M2TS files, for those of us who demux/remux.:(
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.