Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Synchronize audio and video that are separate files

Status
Not open for further replies.

EdwardMartinIII

Technical User
Sep 17, 2002
1,655
US
Good morning!

This is a puzzler to me.

I have a WMV file, a technical procedure. Just video. I have two audio files, one a German voiceover and one an English voiceover. I will eventually have other voiceovers, too.

What I'd LIKE to do is make a web page that shows the video and, say, the English audio in sync. In other words, they start at the same time (they are the same duration and they can be mis-synced by a second or two and no one will die). However, someone might click on the "listen to me in German!" button and I want to either switch immediately to the German audio track or (preferably) reload the page, but this time play the video and play the German sudio track.

In a DVD layout, this is easy, but because we are providing content around the world, a DVD becomes impractical because I have to worry about NTSC or PAL and so forth.

So I'm hoping to solve it by making a CD-ROM of web pages.

But this synchronization thing is just knocking my head around. Any suggestions on how to pull this off?

Would I be able to use, say, an onClick action for the change-language button that would tell the audio and video to both restart?

Cheers,

[monkey] Edward [monkey]

"Cut a hole in the door. Hang a flap. Criminy, why didn't I think of this earlier?!" -- inventor of the cat door
 
To be honest, I don't think you'll manage this with HTML alone, or even HTML and a scripting language.

I'd say your best bet will be Flash, as its scripting language would probably be a bit more accurate when it comes to synching audio and video clips.

Hope this helps,
Dan


[tt]Dan's Page [blue]@[/blue] Code Couch
[/tt]
 
Thanks for responding.

Spot-on accuracy isn't required, even scripting would be fine if I could say "start the video" and then "start x audio track". It would probably be fine.

Me, personally, I'm not fond of Flash. (yeah, it's a personal thing -- Flash left me dying in a trench during the war and I've never forgiven it)

That aside, my employer is especially not fond of Flash. A previous project used Flash and many customers complained because they didn't have it installed on their laboratory computers (usually, the computers dedicated to run our equipment are the crappiest computers in the plant, and rarely connected to the network, etc.).

So, I have been told to avoid Flash if at all possible.

I think the preference would be CD-ROMs in different languages over using Flash.

Do you know if an onClick event can initiate video playing and audio playing?

Cheers,

[monkey] Edward [monkey]

"Cut a hole in the door. Hang a flap. Criminy, why didn't I think of this earlier?!" -- inventor of the cat door
 
Could you not add form with a hidden field so when a person clicks their preference that the form reloads and reads the hidden field?
 
Sure, I can do that, but I'm not quite sure how that will help with the problem.

There is a mechanism that will play a video file and an audio file more-or-less simultaneously? Or cause them to restart?

Cheers,


[monkey] Edward [monkey]

"Cut a hole in the door. Hang a flap. Criminy, why didn't I think of this earlier?!" -- inventor of the cat door
 
Hmmmmmm... would you consider creating a video with multiple audio tracks? I'm sure you can do this using Quicktime, and I bet it's available in other file formats (DVDs use this technique). You can then choose the audio track to use with the video... and I believe this can be done programatically when instantiating the video player.

Just a thought.

Cheers,
Jeff

[tt]Jeff's Page [/tt][tt]@[/tt][tt] Code Couch
[/tt]

What is Javascript? faq216-6094
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top