<div dir="ltr"><div><div><div><div><div><div><div>Hi,<br><br></div>Based on muxing sample that comes with FFmpeg docs, I have modified it, from input format as S16 to FLTP (planar stereo), and outputting to webm format (stereo).<br>
<br></div>Since input is now FLTP, I am filling two arrays, then encoding again to FLTP. There are no obvious errors given on screen, but the resulting webm video does not play any audio (just the video content). This is just proof of concept in understanding things; here is an added (crude) function to fill up input FLTP stereo buffer:<br>
<br>static void get_audio_frame_for_planar_stereo(int16_t **samples, int frame_size, int nb_channels)<br>{<br>    int j, i, v[2];<br>    int16_t *q1 = (int16_t *) samples[0];<br>    int16_t *q2 = (int16_t *) samples[1];<br>
<br>    for (j = 0; j < frame_size; j++) <br>    {<br>        v[0] = (int)(sin(t) * 10000);<br>        v[1] = (int)(tan(t) * 10000);<br>        *q1++ = v[0];<br>        *q2++ = v[1];<br>        t     += tincr;<br>        tincr += tincr2;<br>
    }<br>}<br><br></div>Which I am calling from inside write_audio_frame() function.<br><br></div></div>Note also, wherever code reffered AV_SAMPLE_FMT_S16 as input, I have changed to AV_SAMPLE_FMT_FLTP.<br><br>Whole workable source is here:<br>
<br><a href="https://gist.github.com/anonymous/05d1d7662e9feafc45a6">https://gist.github.com/anonymous/05d1d7662e9feafc45a6</a><br><br></div><div>When run with ffprobe.exe, with these instructions:<br><br>ffprobe -show_packets output.webm >output.txt<br>
<br></div><div>I see nothing out of ordinary, all pts/dts values appear to be in place:<br><br><a href="https://gist.github.com/anonymous/3ed0d6308700ab991704">https://gist.github.com/anonymous/3ed0d6308700ab991704</a><br>
</div><div><br></div>Could someone highlight cause of this mus-interpretation?<br><br></div>Thanks for your time...<br></div>