LoginSignup
Steven_Yang
@Steven_Yang (Steven Yang)

Are you sure you want to delete the question?

Leaving a resolved question undeleted may help others!

FFMPEG/SDL2 off and on audio/wrong frequency of voice. #MEDIA PLAYER

Hello everybody.
I'm not native Japanese, I speak English.

And when I was developing with FFMPEG, SDL2 to make video player in my leisure time,
I found that it would make very strong noise within the song in the video.
And that's when I learnt the code from my native search engine and Bing of Microsoft.

But when I searched for the related keywords in Bing,
it recommended an article of Qiita for me.

I translated it by machine automatically.

And after I coded and learnt by the article,
I've found that the noise disappeared.

The video get to be normal and the speed is synchronized with the audio too.

But the voice is still off and on.
And I'm a fans of Mariah Carey for two decades,
so I can recognize that the voice is higher frequency than normal when I played it.
(That means the voice is different from normal Mariah.)

Here is the complete code without the dependencies.
It depends on the latest version of:

FFMpeg
SDL2
Boost

AND IN ADDITION,

I insist single thread can solve it all.
But too many examples show that we must use multi-thread.

If It has to use multi-thread, I would take it.

I'm really newbie for the television and signal processing.
(But I'm veteran with other computer engineering and skills.)
If you talk about SNR or other terms with me, I can understand.

Please help me!! Thank you!!

0

1Answer

I'm realy newby at audio program, too.
However, I think that sampling rate is maybe incorrect.

According to his code,

want.freq = dst_samplerate;

It seems sampling rate affects frequency parameter.

It's just all I understand.
I hope your media player launched.

1

Comments

  1. @Steven_Yang

    Questioner

    Thank you so much!
    It works! The frequency is correct now!

Your answer might help someone💌