Welcome Guest ( Log In | Register )


Important

The forums will be closing permanently the weekend of March 15th. Please see the notice in the announcements forum for details.

 
Faulty Audio-processing With Pitch Shift, Results in spots of distorted audio
« Next Oldest | Next Newest » Track this topic | Email this topic | Print this topic
hurda
Posted: Feb 21 2013, 09:52 AM


Newbie


Group: Members
Posts: 5
Member No.: 36105
Joined: 21-February 13



Description:
Trying to change the pitch of audiostreams results in distorted audio during sections with slowly changing background-music.
I discovered this after batch-changing the pitch of several videos of TV-episodes.
You can clearly hear the distortion in pitch2_after_mp3.avi and pitch2_after_wav_vdub.avi just before
and after the transition into the intro-sequence, between 00:04 and 00:07.

STR:
Tested on Vista SP2 x86 and Windows 7 SP1 x64 with VDub versions 1.9.11 and 1.10.3.

Settings:
Video: Direct stream copy
Audio: Full processing mode, advanced filtering, filter-setup:
CODE
input --> pitch shift (set to 1.042) --> output

Tried changing the audio buffers to maximum, made no difference.
Happens regardless of compression: MP3 (LAME 3.99.5 ACM from rarewares) or uncompressed

Doing the same with "ratty pitch shift" instead of "pitch shift" doesn't result in the distortions, but the description of that filter suggests that this results in lower quality overall, so I'd like to use the proper pitch shift filter.

Archive with testfiles: http://www.mediafire.com/download.php?r47cqzrdnyagdbu

  • pal_audio-speedup_.vdscript : Processing-settings originally used during the batch-conversion
  • pitch2_before_mp3.avi : short clip of the original file with proper sound before the conversion
  • pitch2_before_wav.avi : same clip with audio converted to WAV prior conversion for testing reasons
    (MP3-stream was decoded with ffmpeg and muxed back with VDub)
  • pitch2_after_mp3.avi : clip after the conversion with pitchshift-filter using the settings in the vdscript-file
  • pitch2_after_wav_vdub.avi : clip after the conversion with pitchshift-filter using the settings in the vdscript-file from
    pitch2_before_wav.avi to WAV to rule out any involvement of the MP3-de- or encoder
  • pitch2_after_wav_sox.avi : clip with the audio-conversion done by sox 14.4.1 (commandline:
    CODE
    sox in.wav out.wav pitch 70.67
    ) and muxed with VDub


AV-material is from a copyrighted source (TV-series DVD), but the clips are only 10 seconds long, I hope that's ok.

I tried to do the conversion with sox via the "External encoders" feature, but that only works when both audio and video are processed, which I don't want to do for 100+ files.

For reference, here's sox's code for pitch shifting: http://sox.git.sourceforge.net/git/gitweb....b;f=src/tempo.c

I hope this post contains all necessary information. smile.gif

This post has been edited by hurda on Feb 21 2013, 11:16 AM
 
    Top
phaeron
Posted: Feb 25 2013, 12:25 AM


Virtualdub Developer


Group: Administrator
Posts: 7773
Member No.: 61
Joined: 30-July 02



Alright, try this version. There was a bug in the correlation routine that could cause bad offsets to be generated because the FFT was not long enough.

http://www.virtualdub.org/beta/VirtualDub-....10.4-test5.zip
http://www.virtualdub.org/beta/VirtualDub-...test5-AMD64.zip
http://www.virtualdub.org/beta/VirtualDub-....4-test5-src.7z
 
    Top
hurda
Posted: Feb 25 2013, 10:45 AM


Newbie


Group: Members
Posts: 5
Member No.: 36105
Joined: 21-February 13



Thank you very much, with test5 I cannot hear any distortions at all.
 
    Top
hurda
Posted: Feb 25 2013, 11:50 AM


Newbie


Group: Members
Posts: 5
Member No.: 36105
Joined: 21-February 13



Well, at first I only tested with a few samples, which came up with no problems.
But now I found a sample, which has distortions during speech with 1.10.4-test5 but not with 1.10.3:
http://www.mediafire.com/download.php?ntbnveww6vjzrrx includes original with pitch unchanged, and pitch changed with 1.10.3 and 1.10.4-test5

Around second 5, when the woman starts talking towards the camera.

EDIT:
A longer clip of the conversation with multiple distortions, mostly while the woman is talking:
http://www.mediafire.com/download.php?ld45nmn3xwjxozp
 
    Top
hurda
Posted: Feb 27 2014, 07:13 PM


Newbie


Group: Members
Posts: 5
Member No.: 36105
Joined: 21-February 13



Maybe VD could be made to work with http://www.surina.net/soundtouch/index.html ?
 
    Top
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:
4 replies since Feb 21 2013, 09:52 AM Track this topic | Email this topic | Print this topic

<< Back to Testing / Bug Reports