Announcement: Our new CyberLink Feedback Forum has arrived! Please transfer to our new forum to provide your feedback or to start a new discussion. The content on this CyberLink Community forum is now read only, but will continue to be available as a user resource. Thanks!
CyberLink Community Forum
where the experts meet
| Advanced Search >
Magic YUV conversion process
[Post New]
Following reccomendations on the forum I purchased the Magic+PD 64 program. Set up and conversion process went smoothly. Only problem is that the audio and video are out of sync on the new .avi files. I wrote to the program creator and he told me to check out my problem here on this forum as he does not know PD although he thought it was a virtual dub AVI mixing issue. Anyone have the same issue and/or a suggestion to fix this. Thanks!
optodata
Senior Contributor Location: California, USA Joined: Sep 16, 2011 16:04 Messages: 8630 Offline
[Post New]
Hi 4Kanyone?

I'm the person who came up with the Magic+PD app (which is free - there's no way to "buy" it ) and you must have communicated with Balázs Oroszi, who wrote the MagicYUV codec. He goes by Ignus on the PD14 forum, and you can buy the full version of his codec. I assume that's what you did.

The default settings of Magic+PD tell the converter app (VirtualDub) to use a direct stream copy for the audio, so it should remain in the original, unchanged format. If you're seeing audio sync issues, would it be possible for you to upload a copy of your original clip (not the converted version) to a shared folder on OneDrive or DropBox so I can test it? I can provide you with a link if you don't have access to one.

Also, if you are comfortable making some adjustments to VDub's settings, you can experiment by changing the Audio mode from Direct stream copy to Full processing mode:



and then selecting Audio again and opening the Compression.. tool:



and try one of the settings like this before converting the clip again:



That should ensure that the converted audio stays in sync with the converted video.

I actually think it would be better to post on the main Magic+PD *thread* on the PD14 forum as all the main people involved will be notified of every new posts there. I don't always check the PD13 and older forums and I just happened to see your post here.

Anyway, please let me know what you find!

YouTube/optodata


DS365 | Win11 Pro | Ryzen 9 3950X | RTX 4070 Ti | 32GB RAM | 10TB SSDs | 5K+4K HDR monitors

Canon Vixia GX10 (4K 60p) | HF G30 (HD 60p) | Yi Action+ 4K | 360Fly 4K 360°
[Post New]
Hi,
Thanks so much for your response and very explicit directions. I did try resetting the audio as per your instructions but had a problem setting the compression. After clicking on compression I did not get the AC-3 ACM codec you choose. My only choices were:

no compression (PCM)
CCITT A-Law
CCITT u-Law
GMS 6.10
IMA ADPCM
Microsoft ADPCM
MPEG Layer-3
I did "play" with some of these but MPEG Layer-3 gave me no settings and the other choices did not have settings similar to your above window. Yes I did communicate with
Balazs. If you would send me a link to DropBox or OneDrive along with excellent instructions as you provided for my attempt to change the audio mode, I would be very appreciative.
Thanks,
Ernie
optodata
Senior Contributor Location: California, USA Joined: Sep 16, 2011 16:04 Messages: 8630 Offline
[Post New]
Ok. It's normal to have a different list of audio codecs on different machines, and I don't think you need to worry about the details so much. I think just trying any of the other options and converting the clips again might solve the sync problem. If you haven't gotten that far, please try it with the Microsoft ADPCM or MPEG Layer-3 and see how that works.

If you want me to try, you can upload your original clip to this OneDrive *folder* and I can test it on up to 3 computers to see if I can get the sync problem to show up and also find the right audio setting to fix it.

YouTube/optodata


DS365 | Win11 Pro | Ryzen 9 3950X | RTX 4070 Ti | 32GB RAM | 10TB SSDs | 5K+4K HDR monitors

Canon Vixia GX10 (4K 60p) | HF G30 (HD 60p) | Yi Action+ 4K | 360Fly 4K 360°
[Post New]
As per your directions I tried many of the compression options on my machine and then tried to convert the clips. Most of them gave me an error message. On the ones which did convert e.g. MPEG Layer-3 it was out of sync.
I think (hope) I uploaded an original clip I labeled "Magic-Ernie" to you via OneDrive. Thanks, again, for your help.

Ernie
optodata
Senior Contributor Location: California, USA Joined: Sep 16, 2011 16:04 Messages: 8630 Offline
[Post New]
Thank you very much for uploading your original clip! I was able to reproduce the audio offset and I think I've found an easy way to fix it by changing 1 setting in VDub. I will talk with Balázs and see if there is another approach, but for now here are the steps:

In VDub, go back to the Direct Stream Copy option under the Audio menu (not Full Processing Mode anymore)

From the the Audio menu, select Interleaving...



Enter -733 in the Audio skew correction box, then click OK



When you choose Save as AVI... to convert the clip again, it will have the audio in the correct location

My testing indicates that -733ms is the right offset for 29.97/30p MTS clips like the one you uploaded and also for 60p MTS clips from my Canon camera.

Can you please test that on your clip and let me know if that works on your end?

Unfortunately, the value isn't saved when you close the app, but if the setting change is successful, I'll see if I can update the script that runs every time you double-click the Magic+PD icon to have it change the setting automatically.

This message was edited 2 times. Last update was at Dec 09. 2015 02:12



YouTube/optodata


DS365 | Win11 Pro | Ryzen 9 3950X | RTX 4070 Ti | 32GB RAM | 10TB SSDs | 5K+4K HDR monitors

Canon Vixia GX10 (4K 60p) | HF G30 (HD 60p) | Yi Action+ 4K | 360Fly 4K 360°
The Shadowman
Senior Contributor Location: UK Joined: Dec 15, 2014 13:06 Messages: 1831 Offline
[Post New]
Hi Ron & Ernie

I downloaded the Magic-Ernie file and put it through Magic+PD at -733, but quite honestly I could see no real improvement to speak of. I tried many more settings and found that -350 was as good as I could get. At -350 I thought it was very reasonable.

I have to say though, the clip is not the easiest to syncfrown

Hope this helps

Robert Panny TM10, GH2, GH4,
optodata
Senior Contributor Location: California, USA Joined: Sep 16, 2011 16:04 Messages: 8630 Offline
[Post New]
Thanks Robert! It's certainly interesting that you found that a different value was needed, because that implies that the audio offset/skew is affected by the local environment.

That also means that if I modified the script to set that value, it would be incorrect on at least some machines which would create problems for people who don't have any now.

It's funny that you saw "no real improvement" when trying the -733 value, because you actually should have gone from the audio being roughly 1/3 ahead of the video to being roughly 1/3 second behind, and your -350 setting put it in just the right spot.

It's very easy to tell when the A/V are out of sync, but for some reason, at least for me, it's very hard to tell which one is ahead without stopping the video and looking at the sound track waveform vs when a person's mouth moves! It seems like it's simlar for you because you didn't notice any difference when the audio waas ahead of or behind the video. There's some very interesting sensory data here!

This message was edited 1 time. Last update was at Dec 09. 2015 11:48



YouTube/optodata


DS365 | Win11 Pro | Ryzen 9 3950X | RTX 4070 Ti | 32GB RAM | 10TB SSDs | 5K+4K HDR monitors

Canon Vixia GX10 (4K 60p) | HF G30 (HD 60p) | Yi Action+ 4K | 360Fly 4K 360°
The Shadowman
Senior Contributor Location: UK Joined: Dec 15, 2014 13:06 Messages: 1831 Offline
[Post New]
Hi Ron and Ernie

I have uploaded a rendered, abridged version of the -350 clip to the OneDrive folder (file name ernie.m2ts) - see what you think of the sync

Robert Panny TM10, GH2, GH4,
[Post New]
Hi Ron,
Success! I changed the setting to -733 and the clip played fine. Now I'll transcode all clips from the project and do my normal editing. I very much appreciate your help in this matter.
It was interesting having your input, Robert. At age 67 it amazes me that people from all over the globe can unite under a common interest and communicate directly with each other to solve problems and help each other. Video editing has been a hobby of mine since 1983. I've been using PD for many years now but this is the first time I've used the forum and it "blows me away". Will Ignus see this?
Ernie
optodata
Senior Contributor Location: California, USA Joined: Sep 16, 2011 16:04 Messages: 8630 Offline
[Post New]
Quote: Hi Ron,
Success! I changed the setting to -733 and the clip played fine. Now I'll transcode all clips from the project and do my normal editing. I very much appreciate your help in this matter.
It was interesting having your input, Robert. At age 67 it amazes me that people from all over the globe can unite under a common interest and communicate directly with each other to solve problems and help each other. Video editing has been a hobby of mine since 1983. I've been using PD for many years now but this is the first time I've used the forum and it "blows me away". Will Ignus see this?
Ernie


Yes, I firmly agree that this is a wonderful way for people from all over the world can share experience and ideas and work together to solve some pretty challenging issues. It's a great place to visit and contribute to

I'm glad the setting is working, and I can send you a customized script to automatically set the correct offset value every time you launch the program.

Now to The Shadowman: thanks for sending over your produced clip. It looks to be in perfect sync when I play it here, however I've just discovered something very strange on my end.

When I tested my version last night, -733 gave me perfect sync and yet this morning, the audio was off when I rechecked it in PD. I then tried converting to MagicYUV again, this time with a -350 setting, and now everything is in sync!

At this point I'm not sure why there's a difference, and Ernie, you may want to produce your clip to make sure that the A/V sync still holds in the produced version.

I have sent a note to Balázs regarding this and another oddity I found regarding the first and last 0.5 seconds of the converted clips, and I'll post my findings and any solution or settings changes as soon as they're ready.

YouTube/optodata


DS365 | Win11 Pro | Ryzen 9 3950X | RTX 4070 Ti | 32GB RAM | 10TB SSDs | 5K+4K HDR monitors

Canon Vixia GX10 (4K 60p) | HF G30 (HD 60p) | Yi Action+ 4K | 360Fly 4K 360°
The Shadowman
Senior Contributor Location: UK Joined: Dec 15, 2014 13:06 Messages: 1831 Offline
[Post New]
As a point of interest, I made a short MP4 clip in 3840 x 2160 on my GH4 to test for lip sync problems.

I first tested the clip in the Daum PotPlayer and there were no problems. Then in PD with no problems. Then I converted the file to an AVI in MAGIC+PD with default settings - There were absolutely no lip sync problems at all. Finally with the AVI back in PD, no problems.

optodata, I notice that in Ernie's clip, he used an external mic. Is it possible this could cause a lip sync problem somehow?

Robert

This message was edited 1 time. Last update was at Dec 10. 2015 07:27

Panny TM10, GH2, GH4,
[Post New]
When I changed the audio delay to -733 and reported success, I had not loaded the clip to PD. As per Robert's report when I did place the clips onto PD after setting audio delay to -733, it played out of sync. The good news is that by setting it to -350 it plays fine on the PD timeline. So you were "spot-on" in your observations Robert. Hopefully that won't change when I transcode it to burn a Blu-Ray disc using TMPG software. I did check out your "external mic" theory, Robert and that did not make a difference. I used the program on a clip recorded with the camera's internal mic, with no offset and it played out of sync. If I encounter any more issues I post them on the forum.
Ron if you would send me the customized script to automatically set the correct offset, it will be much appreciated.

Ernie
optodata
Senior Contributor Location: California, USA Joined: Sep 16, 2011 16:04 Messages: 8630 Offline
[Post New]
Thanks for all the feedback. It does seem like Ernie's camera is the deciding factor here rather than the external mic, but I wouldn't have known that without these tests

When I looked at the MediaInfo details of Ernie's original clip, there was a line item in the Audio section that I hadn't seen in any previous clips that showed Delay relative to video: -67ms

I'm sure that's a factor here, but at this point I don't have a good explanation for why we need -350 to sync things up. I hope to have more information soon.

In the meantime, Ernie I'm happy to send you the new script, but you'd need to copy it to a fairly complex path: C:\Users\*** your user name here ***\AppData\Roaming\OPTODATA\64-bit Magic+PD (MagicYUV Conversion Utility for PowerDirector)\VirtualDub-1.10.4-AMD64. Note that if you have the 32-bit version installed, the folder after OPTODATA\ will just start with "Magic+PD..." instead of "64-bit"

Another option is to make a new build for you and you could just install that and have everything done automatically. If you want to go that way, I'd just need to know if your desktop icon says Magic+PD or Magic+PD x64

This message was edited 1 time. Last update was at Dec 10. 2015 13:15



YouTube/optodata


DS365 | Win11 Pro | Ryzen 9 3950X | RTX 4070 Ti | 32GB RAM | 10TB SSDs | 5K+4K HDR monitors

Canon Vixia GX10 (4K 60p) | HF G30 (HD 60p) | Yi Action+ 4K | 360Fly 4K 360°
[Post New]
I'll take a Magic+PDx64 build, please.

Thanks,
Ernie
optodata
Senior Contributor Location: California, USA Joined: Sep 16, 2011 16:04 Messages: 8630 Offline
[Post New]
Yes sir!

Here you go - this is an update-only package that should take care of the script file. It doesn't contain the ffdshow component or the MagicYUV codec, trial or otherwise, so you can't use it if a previous version of Magic+PD isn't already installed.

All you should need to do is double-click to install it, and the simple test is just to run the new version and check to see if the skew is set to -350 (which means everything worked) or 0, which means something didn't take.

Let me know how this goes, and we can do some quick troubleshooting if needed.
 Filename
Magic+PD(x64).msi
[Disk]
 Description
v1.0.0.1 update-only installer for Ernie
 Filesize
16096 Kbytes
 Downloaded:
199 time(s)


YouTube/optodata


DS365 | Win11 Pro | Ryzen 9 3950X | RTX 4070 Ti | 32GB RAM | 10TB SSDs | 5K+4K HDR monitors

Canon Vixia GX10 (4K 60p) | HF G30 (HD 60p) | Yi Action+ 4K | 360Fly 4K 360°
The Shadowman
Senior Contributor Location: UK Joined: Dec 15, 2014 13:06 Messages: 1831 Offline
[Post New]
Hi Ron & Ernie

What we have here is a problem with the conversion of MTS files. I had previously reported that I tested MP4 files and that all was well.

I have tested again, this time with MTS files, and can report that the same lip sync problem showed up. Once again I had to reduce the audio skew to -350 to get a reasonable match.

Ron - I hope this information will help you isolate the problem.

Robert

This message was edited 2 times. Last update was at Dec 11. 2015 07:35

Panny TM10, GH2, GH4,
optodata
Senior Contributor Location: California, USA Joined: Sep 16, 2011 16:04 Messages: 8630 Offline
[Post New]
Thanks very much for your detective work, Robert!

I've noticed another issue, but until now I didn't realize that it only seems to occur with MTS files. Here's part of the email I sent to Balázs regarding my sample "Prague Astronomical Clock" MTS clip, which is 1920x1080/60p:

When comparing the original to the MYUV clip, the first 33 frames of the original clip are missing from the MYUV version. Also, the first 3 frames of the MYUV clip are identical, and the 4th frame of the MYUV is where the active content of both clips sync up (frame 34 of the original clip). I hope this image makes sense – it’s what the clips look like in PD when the video of both clips is synced:


A similar issue exists at the end of the MYUV clip, where the final 28 frames are copies of the final frame of the original clip:



In this example, my original clip is exactly 37.5 sec long, so 37 seconds and 30 extra frames or a total of 2250 frames long at 60p. The MYUV version is 2248 frames long, but since the first 3 frames and final 28 frames are copies, only 2217 frames are identical to the original clip.

You can also see that the audio continues playing all the way to the end of the MYUV clip even though the video in the final 28 frames is “frozen.” The audio starts at the beginning of the MYUV clip with those 3 identical frames, but the video is actually offset by the missing 30 frames from the original clip, so it can never by in sync with the audio.

I'll do some more testing with MP4 and MTS clips, but I have to record my daughter's winter concert tonight and then I'll be busy in the MultiCam designer for a while working with clips from 3 cameras...

YouTube/optodata


DS365 | Win11 Pro | Ryzen 9 3950X | RTX 4070 Ti | 32GB RAM | 10TB SSDs | 5K+4K HDR monitors

Canon Vixia GX10 (4K 60p) | HF G30 (HD 60p) | Yi Action+ 4K | 360Fly 4K 360°
The Shadowman
Senior Contributor Location: UK Joined: Dec 15, 2014 13:06 Messages: 1831 Offline
[Post New]
That's interesting. It made me have a look at my trial MTS clip.

Everything was fine except the last 24 frames were identical, and as you found the audio finished where the identical frames ended, so couldn't be in sync.

This clip was 25fps - problem frames 24 - related?

Robert Panny TM10, GH2, GH4,
optodata
Senior Contributor Location: California, USA Joined: Sep 16, 2011 16:04 Messages: 8630 Offline
[Post New]
"Related?" I don't think so because I had 28 duplicate frames at the end of a 60p clip. There may be minor variations in the number of duplicate frames from clip to clip rather than a fixed amount at all times, but the actual frame rate of the clip does not seem to matter (at least not very much).

What I don't yet know is if this is affected by one or more settings in VDub or possibly with the MagicYUV codec.

Also, if you have action in a test clip from the very first frame, it's very easy to tell if the MYUV clip starts on the same frame or not. Do you see anything like the missing + duplicate frames as shown in my first image on your MTS clip(s)?

YouTube/optodata


DS365 | Win11 Pro | Ryzen 9 3950X | RTX 4070 Ti | 32GB RAM | 10TB SSDs | 5K+4K HDR monitors

Canon Vixia GX10 (4K 60p) | HF G30 (HD 60p) | Yi Action+ 4K | 360Fly 4K 360°
Powered by JForum 2.1.8 © JForum Team