Please login or register.

Login with username, password and session length
Advanced search  

News:

For WME related articles and tutorials visit WME Resource Center.

Author Topic: Sound problem in Theora again...  (Read 3042 times)

0 Members and 1 Guest are viewing this topic.

Derrek3D

  • Occasional poster
  • **
  • Karma: 0
  • Offline Offline
  • Posts: 82
    • View Profile
Sound problem in Theora again...
« on: February 08, 2008, 02:52:37 PM »

Hello,

I have a problem with sound in a Theora video. It's a 720x540 video clip that used to play beautifully in full screen using Game.PlayTheora(). The problems started when I added sound to this video. After adding the sound, the FPS in the engine drop to 1 at the beginning of the video and it becomes extremely choppy. Later on, the FPS goes up to some 200 and the video plays pretty well till the end. Aside from that problem, the audio is never heard at all. The same video (with the sound) plays great in VLC, I should add.

The process I used to add the sound to the video is as follows: I loaded the uncompressed video to VirtualDub, added the audio as Uncompressed PCM and then I used ffmpeg2theora on the resulting video for the final conversion to Theora.

Can anyone tell what am I doing wrong?

Thanks.
Logged

Jyujinkai

  • Global Moderator
  • Frequent poster
  • *
  • Karma: 1
  • Offline Offline
  • Posts: 352
    • View Profile
    • Jyujinkai's WME Development Blog
Re: Sound problem in Theora again...
« Reply #1 on: February 09, 2008, 12:04:02 AM »

if you need to encode the audio separately to the video.. then encode the ogg file for the sound using the same methods yu used for the video, either using ffmpeg2theora  or vlc.

Then get VIRTUALDUBMOD (not virtual dub).... in this app you are able to do a direct stream on the video. so there is no encoding... and add in the stream list the ogg file you made for the audio. This way you are using theora to make the vidoe and the audio and just using vdubmod to build the ogg container.

Still the best way to go abotu this stuff is to use ffmpeg2theora to encode the audio and video at the same time.
Logged
<Antoine de Saint-Exupéry> In any thing at all, perfection is finally attained not when there is no longer anything to add, but when there is no longer anything to take away...
<Carl Sagan> If you want to make a apple pie from scratch. You must first... invent the universe

Derrek3D

  • Occasional poster
  • **
  • Karma: 0
  • Offline Offline
  • Posts: 82
    • View Profile
Re: Sound problem in Theora again...
« Reply #2 on: February 11, 2008, 08:16:12 PM »

Still the best way to go abotu this stuff is to use ffmpeg2theora to encode the audio and video at the same time.
Well, as I said in my first post, I did use ffmpeg2theora to encode the video (with the sound) to Theora and it didn't work. What should I give ffmpeg2theora as input? Should I give it the uncompressed video with integrated uncompressed PCM sound, or should I supply the video and sound separately? If so, how can I supply them separately? In addition, what format/s should the input file/s be in? What command line switches should I use for the ffmpeg2theora?

Thanks.
Logged

Jyujinkai

  • Global Moderator
  • Frequent poster
  • *
  • Karma: 1
  • Offline Offline
  • Posts: 352
    • View Profile
    • Jyujinkai's WME Development Blog
Re: Sound problem in Theora again...
« Reply #3 on: February 12, 2008, 12:56:52 AM »

yea i did read your first post.

The sound is best compressed using a uncompressed wav that is embedded into a uncompressed video in a avi container. But you can compress the audio separately and mux it into a ogg container with a already compressed video using virtualdubMOB.

Also a good thing to remember is that you need to have the video as a multiple of 16. While ogg has a automatic scaling system and the like if you want a pixel perfect overlay you will need to use a multiple of 16.

If you are having no luck , you can post a rar file of the audio and video uncompressed and I cna have a look at it if you want.
Logged
<Antoine de Saint-Exupéry> In any thing at all, perfection is finally attained not when there is no longer anything to add, but when there is no longer anything to take away...
<Carl Sagan> If you want to make a apple pie from scratch. You must first... invent the universe
 

Page created in 0.019 seconds with 19 queries.