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 > Avisynth Usage

Reply
 
Thread Tools Search this Thread Display Modes
Old 17th August 2012, 14:31   #1  |  Link
rodgar
Registered User
 
Join Date: Nov 2009
Posts: 24
Synchonisation Problems Sony HX9V

Since 18 month I encode all of my families old Homevideos to make them AVCHD-compatible. In the end, I have one MKV per event (Vacation, Birthday etc.) with Subs and Chapters - And if I want, I can put it in tsMuxer to make a burnable AVCHD Stucture.

Since that, I get in touch with the following AVCHD-Camcorders: Canon HF S100, Panasonic V500EG, Panasonic TZ31 and Sony HX9V.
I have no problem with all of them except the HX9V. Many Videos are sightly out of Sync but not all of them - Not a big deal I thought. But the problem is, if joined together with tsmuxer or tsdemux the beginning is ok, but in the end I have almost a second or more mismatch - audio behind video.

So I have 2 Questions:
1. Is there a way to analyse the audio and video through avisynth - maybe to get something like "videoclip1 ends here <frame>" "audioclip1 ends here <frame>" and so on... or a working solution for this mess? Or a script or tool which shows the differences between a working clip and a not-working one.

2. More general: Why is this only a HX9V problem? In fact I could understand if NO joined MTS from any camcorder would be in sync because of the different length of audio and video and because almost every MTS has a positive or negative audiodelay, but why does it work fine everytime except with the HX9V?

Here are two original Videos taken with the HX9V. First (00075) is in sync, second (00076) is not - But both of them have a 32ms audiodelay (DGIndexNV).
http://speedy.sh/AJWhW/2011.11.26.zip

P.S.
Sorry for writing in german before, lost my head

Last edited by rodgar; 17th August 2012 at 14:34.
rodgar is offline   Reply With Quote
Old 17th August 2012, 15:39   #2  |  Link
Ghitulescu
Registered User
 
Ghitulescu's Avatar
 
Join Date: Mar 2009
Location: Germany
Posts: 5,587
There is a CD that comes with this camera (it's not a camcorder, neither the Panasonic). You should always use the provided software, this is the only software that knows exactly how are the files obtained.
__________________
Born in the USB (not USA)
Ghitulescu is offline   Reply With Quote
Old 17th August 2012, 20:08   #3  |  Link
rodgar
Registered User
 
Join Date: Nov 2009
Posts: 24
The only thing I can do with this Software is to view my videos and transcode them to WMV - So how exactly does this solve my problem?
On the other side, the provided Software isn't even able to read pure MTS-Data without the AVCHD-Structure on the SD-Card. So what if you don't have this structure anymore?

Last edited by rodgar; 17th August 2012 at 20:11.
rodgar is offline   Reply With Quote
Old 18th August 2012, 14:53   #4  |  Link
rodgar
Registered User
 
Join Date: Nov 2009
Posts: 24
No one? No idea?
rodgar is offline   Reply With Quote
Old 18th August 2012, 16:38   #5  |  Link
poisondeathray
Registered User
 
Join Date: Sep 2007
Posts: 3,554
Quote:
Originally Posted by rodgar View Post
So what if you don't have this structure anymore?
This doesn't help you - but the folder structure and metadata within is what other programs like video editors use to seamlessly join the clips . Programs like tsmuxer don't look at it, so you might get gaps and sync issues. If you import without it into NLE's, you get gaps and sync issues as well in those programs

neuron2 wrote a program called "joints" it might help you (I haven't used it , don't know how well it works)
poisondeathray is offline   Reply With Quote
Old 18th August 2012, 22:50   #6  |  Link
rodgar
Registered User
 
Join Date: Nov 2009
Posts: 24
I'll check it right now... Hope it'll work.
BTW - Here's the Link for Joints: http://forum.doom9.org/showthread.php?t=149441

But for the future: What tool would you recommend to join MTS-Files - even within an AVCHD-Structure? tsmuxer and tsdemux is the only way I know.

Last edited by rodgar; 19th August 2012 at 01:20.
rodgar is offline   Reply With Quote
Old 18th August 2012, 23:03   #7  |  Link
poisondeathray
Registered User
 
Join Date: Sep 2007
Posts: 3,554
Quote:
Originally Posted by rodgar View Post

But for the future: What tool would you recommend to join MTS-Files - even within an AVCHD-Structure? tsmuxer and tsdemux is the only way I know.
I don't know of any that can 100% join successfully and accurately without the folder structure.

I don' t know of any freeware that can do this either, except as Ghitulescu recommended earlier, usually the camera will have software bundled to append the files (but it usually only works if you have the complete folder structure and metadata) . Check the Sony site if there are other options, it might be something you have to download (not included on a DVD)
poisondeathray is offline   Reply With Quote
Old 19th August 2012, 03:42   #8  |  Link
rodgar
Registered User
 
Join Date: Nov 2009
Posts: 24
After a lot of testing and reading the whole Joints-Thread, I am a little disapointed. Joints doesn't help, eac3to neither.

This is a Cutlist of Joints after processing some of my files:
00071.mts,1209,1512,0,1511
00072.mts,442,553,1512,553
00073.mts,1352,1690,2065,1690
00074.mts,793,992,3755,991
00074.mts,793,992,4747,991
00075.mts,390,488,5739,488
00076.mts,1196,1495,6227,1495
00077.mts,312,390,7722,390

So it does its work, but the mismatch in sync is as big as always. I don't get it. The problem doesn't seem to appear because of the "little" time delays at the end or the beginning of a file, but somewhere else.

Played all by itself most videos aren't in sync, but only with a small mismatch. But if I only join 2 of them together, at the first cut there's almost a second of mismatch. How is that possible??

Video and audio of the joined material have only a 32ms difference. Pretty normal to me. How could that make a second or more during playback? With a player where every other File is perfectly in Sync!? I'm completely lost.
rodgar is offline   Reply With Quote
Old 20th August 2012, 10:27   #9  |  Link
Ghitulescu
Registered User
 
Ghitulescu's Avatar
 
Join Date: Mar 2009
Location: Germany
Posts: 5,587
Quote:
Originally Posted by rodgar View Post
No one? No idea?
You won't like this idea ...

Sony and Panasonic (the manufacturers of the last two of your "camcorders") do manufacture also true camcorders. This is their way of telling you that you use a device in an improper way (and that you should buy/use a camcorder instead). Providing cameras that do the job of a camcorder, why would one buy the camcorder instead?

Since only Sony knows how the files are, I believe you should ask them, in the end it's a legitimate question, at least during the warranty period.



I assume you have a file or two at hand (and you own the copyright). You may want to upload it/them somewhere, for other members to have a look at them.
__________________
Born in the USB (not USA)
Ghitulescu is offline   Reply With Quote
Old 20th August 2012, 11:29   #10  |  Link
cretindesalpes
͡҉҉ ̵̡̢̛̗̘̙̜̝̞̟̠͇̊̋̌̍̎̏̿̿
 
cretindesalpes's Avatar
 
Join Date: Feb 2009
Location: No support in PM
Posts: 610
Demuxing audio and video, joining them separately then muxing the result works fine; at least using matroska tools for joining and muxing. I don't know if your TS tools only can do this correctly. I couldn't make tsmuxer work, it just stops randomly during the processing.
__________________
dither 1.27.2 for AviSynth | avstp 1.0.3 for AviSynth development | fmtconv r19 for Vapoursynth | trimx264opt segmented encoding

Last edited by cretindesalpes; 20th August 2012 at 11:32.
cretindesalpes is offline   Reply With Quote
Old 20th August 2012, 13:25   #11  |  Link
Ghitulescu
Registered User
 
Ghitulescu's Avatar
 
Join Date: Mar 2009
Location: Germany
Posts: 5,587
How could you download it? I am directed to buy an account instead ....
__________________
Born in the USB (not USA)
Ghitulescu is offline   Reply With Quote
Old 20th August 2012, 14:14   #12  |  Link
Guest
Guest
 
Join Date: Jan 2002
Posts: 21,923
Quote:
Originally Posted by rodgar View Post
So it does its work, but the mismatch in sync is as big as always. I don't get it. The problem doesn't seem to appear because of the "little" time delays at the end or the beginning of a file, but somewhere else.
Post a link to two of your source MTS files that, when joined, produce this async. I will try to figure out why it is happening.
Guest is offline   Reply With Quote
Old 20th August 2012, 16:39   #13  |  Link
rodgar
Registered User
 
Join Date: Nov 2009
Posts: 24
Sorry for the late response... on top of all, my Computer crashed last night... And again sorry for that speedy.sh upload. Hope the next one is better.

@neuron2
Thank you very much... Your help is most welcome.

Unfortunately my Upload is really slow. So I hope, I can provide the files within the next 5 hours. I will upload both: My joined file (tsmuxer) and the single original MTS's.

Last edited by rodgar; 20th August 2012 at 23:05.
rodgar is offline   Reply With Quote
Old 20th August 2012, 16:59   #14  |  Link
Guest
Guest
 
Join Date: Jan 2002
Posts: 21,923
OK, cool.

Did you try joining with simple copy /b or demuxing from DGIndexNV? Is it only tsmuxer joining that produces the problem?

Finally, can you describe your complete process, from the source files all the way through to the method you used to observe a desync?

Last edited by Guest; 20th August 2012 at 17:04.
Guest is offline   Reply With Quote
Old 20th August 2012, 17:36   #15  |  Link
Ghitulescu
Registered User
 
Ghitulescu's Avatar
 
Join Date: Mar 2009
Location: Germany
Posts: 5,587
Quote:
Originally Posted by rodgar View Post
My joined file (tsmuxer) and the single original MTS'.
How can you join a single file?
__________________
Born in the USB (not USA)
Ghitulescu is offline   Reply With Quote
Old 20th August 2012, 18:27   #16  |  Link
Guest
Guest
 
Join Date: Jan 2002
Posts: 21,923
The apostrophe at the end indicates plural:

single original MTS's.

or:

single original MTSs

I usually use the apostrophe only when both are lower case, so I would
say MTSs.

It's highly controversial and grammarians love to fight about it.

Last edited by Guest; 20th August 2012 at 18:35.
Guest is offline   Reply With Quote
Old 20th August 2012, 23:03   #17  |  Link
rodgar
Registered User
 
Join Date: Nov 2009
Posts: 24
finally... upload is done:
http://www.mediafire.com/?kq88sub5ffse885
http://www.mediafire.com/?ozs8et43ea84eqp
http://www.mediafire.com/?1k03guma4cnxog6
http://www.mediafire.com/?b1y6g869gp0l8ey
http://www.mediafire.com/?cv3xol9t3xwc15g

5 Files packed with 7Zip due to 200MB Limitation of mediafire

My System:
MS Windows 7 Ultimate 64-bit SP1
AMD Phenom II X4 965
BGeForce GTX 260
8.0GB Dual-Kanal DDR3

I shortened my workflow down to the only 2 actions of copying the files to harddrive via WindowsExplorer and simply joining the original MTS Files with tsmuxer. That is enough to observe desync... at least on my system. If this MTS is transcoded (as described below) and put into a MKV-Container both, my system AND my Samsung D6500 TV via DLNA, shows desync as well. But only with Sony HX9V. Every other Camcorder and Camera (this one's for you Ghitulescu works fine.

And here's my complete usual workflow - if you need it. I made a small GUI with autohotkey to automate most of the following steps (to explain how step2 is done):

1. copy all MTS-Files into one folder to my harddrive via WindowsExplorer
2. check if Modification time of the Files is correct and set it to the right time zone (my parents always forget to set this up when they travel so I have to fix it)
3. sort files into subfolders (all of one day into one folder)
4. join all MTS-Files from each folder into one file per folder
metafile for tsmuxer:
Code:
MUXOPT --no-pcr-on-video-pid --new-audio-pes --vbr  --vbv-len=500
V_MPEG4/ISO/AVC, "file1.mts"+"file2.mts"+... , fps=25, insertSEI, contSPS, track=4113
A_AC3, "file1.mts"+"file2.mts"+... ,  track=4352
(I then have one MTS per day - and desync shows up with HX9V)
5a. because I don't know how to read frames or length in sec from an MTS-File in autohotkey (Don't know anything about the Header-Structure), I use tsdemux to join those "onevideoperday"-videos to one big video. I only do this because tsdemux gives me a chapter.xml in which every single video is listed as a chapter. I convert this file into SRT-Subtitles - So I have a chapter per day and a subtitle which can display what date it was and whats happening.
5b. Because tsdemux isn't that reliable, I join those "onevideoperday"-videos in parrallel with tsmuxer to have one big MTS-File to finally work with.
6. This MTS-File enters DGIndexNV to get a DGI, an AVS-File and the ac3 with time-delay
6b. New one: ac3 enters Joints
7. With the AVS-File I transcode the video with the following line for AVCHD/BD (if its small enough AVCHD - if not same one for Bluray but with buffer 30k and maxrate to 40k ):
Code:
program --level 4.1 --bluray-compat --pass 2 --bitrate <bitrate> --stats ".stats" --keyint 25
--open-gop --slices 4 --vbv-bufsize 14000 --vbv-maxrate 14000
--tff --colorprim bt709 --transfer bt709 --colormatrix bt709 --sar 1:1 --output "output" "input"
8. I take the final transcode and mux it with the Joints-ac3 from before, the chapters and the srt alltogether with MKVMergeGUI.
9. Final MKV is ready for my archive and can now be transferred into AVCHD or BD with the use of tsmuxer whenever needed.

Works perfectly for all of my projects since almost 18month but not with the Sony HX9V.

@neuron2
I only tried to join with tsdemux and tsmuxer - desync with both of them. Thought tsmuxer simply use the copy /b command - have to check this method. Stupid Question: Is DGIndexNV able to join MTS? I would love to use it instead.
Edit: Same result with copy /b

@Ghitulescu
I only forgot the s ... sorry again ... I'll correct this right away.

Last edited by rodgar; 20th August 2012 at 23:28.
rodgar is offline   Reply With Quote
Old 21st August 2012, 01:49   #18  |  Link
Guest
Guest
 
Join Date: Jan 2002
Posts: 21,923
I am not going to try to debug your complicated Rube Goldberg process. Here is what I did.

I downloaded your 5 MTS files. I opened all of them together in DGIndexNV. I did Save Project as 00073.dgi. I then opened this script in VirtualDub:

loadplugin("dgdecodenv.dll")
vid = dgsource("00073.dgi")
aud = nicac3source("00073 PID 1100 2_0ch 48KHz 256Kbps DELAY 0ms.ac3")
audiodub(vid,aud)

It plays perfectly and completely in sync throughout. DGIndexNV implemented the joints-like processing when demuxing the audio.

Therefore, you can trancode the video using this script as input to x264 and then mux it with this audio and you should not experience any issues.

And yes, you can join MTS's with DGIndexNV. Open them all and then Output Trimmed TS (without trimming). But since you are transcoding, there's no point to even bother trying to join the MTS's (just open them together in DGIndexNV).

BTW: She's a great pianist. Bravo! Encore!

Last edited by Guest; 21st August 2012 at 02:12.
Guest is offline   Reply With Quote
Old 21st August 2012, 12:21   #19  |  Link
rodgar
Registered User
 
Join Date: Nov 2009
Posts: 24
My "complicated Rube Goldberg process" is not what causes the desync, it's only the joining of 5 Files with tsmuxer. Therefore I uploaded the joined Video as well.
You said it plays in sync during your process... but plays my "joined_with_tsmuxer_original.m2ts" fine also?
Because your way is giving me the exact same result as before: desync

So the reason is definitely on players side, but why only with those HX9V-Files?
---
Edit: MPC-HC + CoreAVC + AC3(intern) -> desync
Samsung D6500 via DLNA -> desync
VLC -> sometimes sync sometimes desync
Splashplayer -> sync
No need to mention: only with HX9V-Files
---

Quote:
DGIndexNV implemented the joints-like processing when demuxing the audio.
So no need for joints, good to hear that

BTW: The rest of my process is not as rubbsih to me as it is to you, because I'm no professional programmer and found no other way to get my chapter-list. If you show me a simpler solution to get a chapter per day I would really appreciate that.

Last edited by rodgar; 21st August 2012 at 12:50.
rodgar is offline   Reply With Quote
Old 21st August 2012, 13:56   #20  |  Link
Guest
Guest
 
Join Date: Jan 2002
Posts: 21,923
Quote:
Originally Posted by rodgar View Post
You said it plays in sync during your process... but plays my "joined_with_tsmuxer_original.m2ts" fine also?
I made a project in DGIndexNV with your joined file and then played the script in VirtualDub. It was in sync throughout.

Quote:
Because your way is giving me the exact same result as before: desync
Let's be sure we are talking about the same thing here. My process was to simply play the script in VirtualDub. Have you done that? If you have gone beyond that process, you have to tell me exactly what you did. And again, to be clear, you mentioned a one-second desync. Is that what you still observe with these samples?

Last edited by Guest; 21st August 2012 at 13:59.
Guest 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 09:52.


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