Fluctuating sound pitch on 0.7.2 (and several earlier ones)

For questions and discussion that is NOT (I repeat NOT) specific to a certain Operating System.
Torniojaws

Fluctuating sound pitch on 0.7.2 (and several earlier ones)

Postby Torniojaws » 05 Jun 2004 18:56

I'm having sound problems with VLC, especially on DVD playback (any region) and certain media types (DivX 5.1.1, mainly, but not limited to). The sound pitch goes up and down all the time, and on some DivX 5.1.1 files, the sound clips about every 1 second. The clipping is a new error, but the sound pitch fluctuation has been around since 0.7.0.

I've tried playing the problematic files on other players (WMP 6.4, WMP 7.1, BSPlayer, ZoomPlayer, PowerDVD) and none of the files/DVDs had any sound problems, so it is just VLC.

Windows 2000 SP4
DirectX 9.0b
Newest Creative Audigy 2 drivers, from March 28th
Intel Pentium 4 2800 MHz (800 MHz)

The DJ
Cone Master
Cone Master
Posts: 5987
Joined: 22 Nov 2003 21:52
VLC version: git
Operating System: Mac OS X
Location: Enschede, Holland
Contact:

Postby The DJ » 06 Jun 2004 03:49

This is a design flaw in VLC (not really a flaw, but rather a undesired effect of VLC's superior streaming capabilities)
Don't use PMs for support questions.

Guest

Postby Guest » 06 Jun 2004 17:37

I see. Are there any fixes in development?

dmnyanks

Postby dmnyanks » 06 Jun 2004 17:44

I got the same problem. Starting in vlc 7.2 If this isn't at bug I don't know what it. It makes videos unwatchable.
The only fix I found was to go back to 7.1.
the daily build didn't work either

dmnyanks

Postby dmnyanks » 06 Jun 2004 18:37

I have been doing some reseach.
For me it doesn't happen for all video files. It doesn't matter what the audio codec in the avi file.
On the files which don't work. Gspot says the I/L is 1 vid frame (33 ms), p=480 Split: No
Which is the only thing different to other videos I've tried.
Winamp will play them fine.
Dunno whether it is the same with Torniojaws but this is what it is with me.
Also 7.1 decided to stop working as well.

Torniojaws

Postby Torniojaws » 06 Jun 2004 19:28

For me, the I/L in Gspot says "Not supported." for most videos, both working and non-working ones :?

Dandruff
Cone that earned his stripes
Cone that earned his stripes
Posts: 233
Joined: 10 Jul 2004 17:54

Postby Dandruff » 10 Jul 2004 18:54

also pitch-problems here. i've posted my statement here: viewtopic.php?t=3421&sid=ebf06070205ff5 ... bc6ce6b103



_____________________
windows xp sp1
vlc 0.7.2

Dandruff
Cone that earned his stripes
Cone that earned his stripes
Posts: 233
Joined: 10 Jul 2004 17:54

Postby Dandruff » 04 Aug 2004 23:54

for me it's 'fixed' in the latest nightly build (option to disable float32 under 'modules' -> 'audio
output' -> 'waveout', so that i can use win32-waveout-output now)

Raid

Postby Raid » 06 Aug 2004 02:20

I'm also experiencing this on OS X 10.3.1 playing MPEG files. It's devastating because I'm playing music video and the pitch changes and the audio doesn't sync with the video. No problems playing it with any other player. Nothing that I've tried works.

Any ideas how to get around this or when the issue may be addressed?

The DJ
Cone Master
Cone Master
Posts: 5987
Joined: 22 Nov 2003 21:52
VLC version: git
Operating System: Mac OS X
Location: Enschede, Holland
Contact:

Postby The DJ » 07 Aug 2004 13:48

Raid your files are broken. They may play correctly in another player, but VLC uses a different technicque for playing, and is therefore more sensitive to certain errors in files. And truth be told that there are A LOT of broken files around.
Don't use PMs for support questions.

Raid

Postby Raid » 08 Aug 2004 09:20

These are professionally produced copyrighted MPEGs that work perfectly on all DVD Players and Media Players... except for VideoLAN that is. So the issue is poor error-recovery within VideoLAN.

On the Mac there are not many choices when it comes to Media Player software, unfortunately. Is this a difficult issue to fix? If so, are there Media Players you can recommend that contains full-screen, stereo reverse, and playlist functionalities? Unfortunately the change of pitch for a Karaoke video is devastating, so VideoLAN is pretty useless unless this issue is addressed.

The DJ
Cone Master
Cone Master
Posts: 5987
Joined: 22 Nov 2003 21:52
VLC version: git
Operating System: Mac OS X
Location: Enschede, Holland
Contact:

Postby The DJ » 08 Aug 2004 15:47

These are professionally produced copyrighted MPEGs that work perfectly on all DVD Players and Media Players... except for VideoLAN that is. So the issue is poor error-recovery within VideoLAN.
That still doesn't make them correct. As I said. VLC uses a different system of syncing a/v. It uses the timestamps within the files, instead of the decoded audio, which most applications use. This makes it a very good application for streaming. The method most programs use is actually incorrect and only existing, because the earliest mpeg producing systems couldn't produce correctly synced/muxed files (clock drift). Applications therefore started compensating by using the decoded audio as the sync method. Though this works perfectly for files, it is very bad for streaming solutions and only made more people not care about how correct the files were that they were producing.
On the Mac there are not many choices when it comes to Media Player software, unfortunately. Is this a difficult issue to fix? If so, are there Media Players you can recommend that contains full-screen, stereo reverse, and playlist functionalities? Unfortunately the change of pitch for a Karaoke video is devastating, so VideoLAN is pretty useless unless this issue is addressed.
I seriously don't consider it an issue with VideoLAN. It is one of the design principles that it is build on even. I have heard some speak of writing an alternate method to sync on audio, which could be used as an option, but no estimate on when it will be implemented, if ever.
Don't use PMs for support questions.

LegoManiac

Postby LegoManiac » 09 Aug 2004 06:20

I'm experiencing the same problem. Local play works fine, streamed play seems to waver pitch. This is while streaming MP3's using UDP multicast. I've tried tuning various options, to no avail.

Server:
Suse 9, vlc 0.7.2, command-line only
stream:
codec: mpga
desc: MPEG Audio Layer 3, version 1
type: audio
channels: 2
sample rate: 44100
bitrate: 128000
no transcode

Client:
Fedora 2, vlc-gnome 0.7.2
also tried vlc 0.7.2 command-line only

Raid

Postby Raid » 10 Aug 2004 08:06

Well, technically they may be incorrect, but it seems that there's a flaw in the original method of syncing via timestamps that frequently causes audio sync problems. As a result, other applications and hardware chose to sync via audio. The result is a perfect reindition, as far as the user can tell, of the MPEG, whereas VideoLan is a poor reindition of the video with pitch problems. Even though sync'ing by timestamp may be a good application for streaming, it is horrendous as a media player, especially for music videos where pitch is essential. People are typically not as affected by frame drops as they are by audio pitch fluctuations. Other apps that sync on audio seem to handle everything perfectly, so perhaps it's the superior method, allowing fault tolerance.

Obviously we're not in a perfect world with perfect MPEGs, so we need to do the best to compensate for the mistakes for backwards compatibility. Ignoring that it's an issue is silly. I have yet to encounter a VCD that doesn't loose its audio sync or contain pitch problems within VideoLAN, and it's definitely more annoying than dropping frames...

The DJ
Cone Master
Cone Master
Posts: 5987
Joined: 22 Nov 2003 21:52
VLC version: git
Operating System: Mac OS X
Location: Enschede, Holland
Contact:

Postby The DJ » 10 Aug 2004 11:29

VideoLAN still is primarily a streaming client and not a media player.
Don't use PMs for support questions.

Guest

Postby Guest » 13 Aug 2004 08:43

Funny, since this forum is named "VLC media player", not "VLC Streaming player". :) I understand what you're saying though. I love the features in VLC and it would be a great media player, if only it didn't have this intrinsic design flaw... *sigh*

Jan

weaving sound pitch

Postby Jan » 15 Aug 2004 02:08

Hello,

I am testing VLC for streaming real-time TV (captured with an saa7134) from my central server to my portable.

So far I am delighted about the features VLC provides.
But the weaving pitch disturbs me alot. If my pc for one reason or another gets behind decoding the stream, it starts playing back with a higher pitch, then gradualy lowering the pitch back to normal.

There are several reasons my pc can get behind decoding the stream:
high cpu load, hd activity, lost packets on my wifi network, ...
If vlc realy wants to be "the" streaming player, the impact of lost packets, ... should not be that audible.

But hey, this is just my humble opinion.

Regards,
Jan

Guest

Postby Guest » 15 Aug 2004 21:23

I got same problems with wav files generated with Steinberg Cubase on Windows XP pro

vladr

Postby vladr » 26 Sep 2004 16:14

I also get the pitch problem on some AVIs. Could this be due to the AVIs being authored using VBR as opposed to CBR audio tracks? Different interleaving parameters?

Cheers,
V.

BrianG.
New Cone
New Cone
Posts: 3
Joined: 29 Sep 2004 23:50
Location: Montreal, Canada

Postby BrianG. » 30 Sep 2004 00:13

I'm able to create the pitch problem with any locally played file which contains audio. Just by using the seek bar, within 2 seconds after every seek, the pitch either stays the same, goes up, or, goes down. This seems to work with the following:
.mp3, .fla, .wav, .ogg, .avi, .ogm, .mkv, .mpg, .mp2.

Since it looks like VLC is making heavy use of the re-syncing of audio by resampling it :(, is this a problem we will ever expect to be fixed in VLC?

Note that such resampling is not the only solution for syncing audio & video together, & there are other solutions for buffer management through networks which don't distort audio, unless you are specifically creating a multicast. (1 fixed broadcast stream to multiple clients). In this case, there still are simple techniques for resampling audio so that you can't hear any pitch bending.
_______
Brian G.

The DJ
Cone Master
Cone Master
Posts: 5987
Joined: 22 Nov 2003 21:52
VLC version: git
Operating System: Mac OS X
Location: Enschede, Holland
Contact:

Postby The DJ » 30 Sep 2004 00:34

you are welcome to make the 'simple' fixes :P :P :P :P
Don't use PMs for support questions.

BrianG.
New Cone
New Cone
Posts: 3
Joined: 29 Sep 2004 23:50
Location: Montreal, Canada

Postby BrianG. » 30 Sep 2004 02:16

Though I may know how to design the core of a custom DSP for audio & video processing written in Verilog, the last time I did any C++ work was back in 1992 in the AmigaDos enviroment.

The quickest fix I could imagine would be to get rid of the audio resampling all together. Use the sound card sample rate as your reference clock & synchronise the video output framerate to the loaction of the current sound. Your eye's tracking of the motion of a picture with an occasional added/dropped frame to adjust timing is almost not catchable compared to your ear's sensitivity to change in pitch.

Take a look at NTSC where there are 3 fields, then 2, then 2 and sometimes 1 of the 3s are cut down to 2, or 1 of the 2s are cut down to 1 field to accomodate 24 film frames per second within a 59.95 field per second broadcast system.
_______
Brian G.

The DJ
Cone Master
Cone Master
Posts: 5987
Joined: 22 Nov 2003 21:52
VLC version: git
Operating System: Mac OS X
Location: Enschede, Holland
Contact:

Postby The DJ » 30 Sep 2004 17:18

Bingo!!!

Though getting rid of the resampling is the 'quickest' way, it is a completly incorrect way A/V sync for live video streams.

VLC was originally designed as a client for live MPEG2 streams. In this case it is best to take the timestamps in the videofiles as the reference timescale instead of the decoded audio signal. This was one of the prime design choices in building VLC. Though it works perfectly for streaming, it definetly has it's disadvantages. Mostly because everyone just ignores those, which means that there is a lot of lousy files out there with incorrect timestamping.

We are looking into changing some things, but it will take a long time before the perfect solution is implemented (2 methods, 1 for live, 1 for onDemand).
Don't use PMs for support questions.

BrianG.
New Cone
New Cone
Posts: 3
Joined: 29 Sep 2004 23:50
Location: Montreal, Canada

Postby BrianG. » 01 Oct 2004 21:29

We are looking into changing some things, but it will take a long time before the perfect solution is implemented (2 methods, 1 for live, 1 for onDemand).
Enabling / Disabling the audio resampling for live streams VS all other content shouldn't be a problem, I think. You might even be able to use the existing code to do both. When disabling the audio re-sampling code, just use it's existing logic on the picture in reverse, when the pitch would go down, speed up the video, when the pitch would go up, decelerate the video.

Now, a solution to make a near pitcheless change in the audio for live streams of all sort will be coming in my next post on the weekend.
_______
Brian G.

Gibalou
Big Cone-huna
Big Cone-huna
Posts: 608
Joined: 26 Nov 2003 10:59

Postby Gibalou » 01 Oct 2004 22:24

As always that all sounds easy in words but it is a lot more complicated than you think to adapt this to the code itself.
I have been wanting to code this for some time now but I've always been put off by the daunting task of having to rewrite part of the audio output core. Not too difficult but very time consumming and 0% fun.

As a side note, VLC-0.8.0-test2 has been modified to resample _a lot_ more gradually. While this doesn't solve the problem in itself, it should make it less audible.


Return to “General VLC media player Troubleshooting”

Who is online

Users browsing this forum: No registered users and 10 guests