Open pockethook opened 11 years ago
The problem only occurs with non-PCM_S16 audio. MP3/MP2 audio plays back slightly off and at a higher pitch, playing back FLAC produces noise.
I also had same problem playing mpeg1 video and mp2 audio (mpa) in an mp4 container. Is it the problem with the inability of SDL to play audio which is in planar format.
Tried setting the decode format to non-planar using the below code (inserted in stream_component_open) , and seems to be fixed:
... if (codecCtx->sample_fmt == AV_SAMPLE_FMT_S16P) { codecCtx->request_sample_fmt = AV_SAMPLE_FMT_S16; }
..
Does it solve the problem for you too ? @pockethook
@pprahul I've been struggling with this issue for several days now too, and your fix did work, thanks!
Also, without the fix, tutorials run fine on FFmpeg 1.0.1 and below.
This one is fixed on https://github.com/illuusio/ffmpeg-tutorial and pull request https://github.com/chelyaev/ffmpeg-tutorial/pull/17. tutorial03.c ain't fixed but I goes the same.
Hi, I have the same issue with a mp4 video in h264 and AAC.Do you know how to fix it? thanks
Audio issues are solved in my repo..
Yes but Do you try with a mp4 video in h264 and an AAC audio? I try it but the song seem to be very slow.Can you confirm me ?thanks
which version of ffmpeg? Can you provide sample of non working..
it's the version 2.0.1 and with the version 2.5.2 it's the same thing. Can you try with this video ? http://we.tl/i1wIOwRwh7 thanks you
Ok.. you have pretty high rate video bit crappy audio :dancers: . Problem is no working conversion from 22000 to you wanted output. So audio sound little bit chubby. I'll try to fix it but takes awhile.
Thanks you very much for your help
Hi, Do you know what is the process to obtain a good sound with the example I give you?I will try to corrige by myself . thanks
Try asking on the ffmpeg mailing list.
https://www.ffmpeg.org/contact.html
On Monday, February 16, 2015, tetepoive974 notifications@github.com wrote:
Hi, Do you know what is the process to obtain a good sound with the example I give you?I will try to corrige by myself . thanks
Reply to this email directly or view it on GitHub https://github.com/chelyaev/ffmpeg-tutorial/issues/11#issuecomment-74428940 .
I'm currently over burned with work so take alook at http://roxlu.com/2014/039/decoding-h264-and-yuv420p-playback they should lead your way. They are made for AVConv but should work on FFmpeg also and most of the time asking questions like this on FFmpeg mailing list will lead you just be ashamed not be pro.
I pinged Tuukka and with his gracious help, I got this working on QT on Windows 10 and FFMPEG build from https://ffmpeg.zeranoe.com/builds/ latest Aug 1st 2017 build. I use 32 bit, Shared and Dev.
regards
Sean
I tried doing all these fix for non planer output in tutorial 05 but there is no sound at all. However, if I don't do resampling to AV_PIX_FMT_S16 there is some noise. Can you help me Please.
Without seeing code there is not much anyone can do
Was able to play a mp4 video with audio whose codecs appear below. Based on http://dranger.com/ffmpeg/ and updates from https://github.com/illuusio/ffmpeg-tutorial, it runs Windows x64, Visual Studio 2015, SDL2, ffmpeg 4.0 and C++.
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from ‘crawl.mp4’: Metadata: major_brand : isom minor_version : 512 compatible_brands: isomiso2avc1mp41 creation_time : 1970-01-01T00:00:00.000000Z Duration: 00:00:29.00, start: 0.000000, bitrate: 689 kb/s Stream #0:0(und): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p, 1344x680, 612 kb/s, 10 fps, 10 tbr, 10 tbn, 20 tbc (default) Metadata: creation_time : 1970-01-01T00:00:00.000000Z handler_name : VideoHandler Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, mono, fltp, 75 kb/s (default) Metadata: creation_time : 1970-01-01T00:00:00.000000Z handler_name : SoundHandler screen final size: 1344x680
A lot of noise/clicking/garbage can be heard in addition to something that vaguely resembles what should be heard.
I've tried tutorial 3 and 7 but neither play audio correctly. I've tried this on both Windows 7 and Arch Linux with the latest versions of g++/VC++, FFMpeg and SDL to the same avail. FFPlay works fine on both machines.