<div dir="ltr">is that VBR ? sampling rate changed during play ?<div>BTW, how we could get current play time ?</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Sep 14, 2017 at 7:22 PM, Anton Shekhovtsov <span dir="ltr"><<a href="mailto:shekh.anton@gmail.com" target="_blank">shekh.anton@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="h5">2017-09-14 14:06 GMT+03:00 Info || Non-Lethal Applications <span dir="ltr"><<a href="mailto:info@non-lethal-applications.com" target="_blank">info@non-lethal-applications.<wbr>com</a>></span>:<br></div></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div class="h5"><div style="word-wrap:break-word">Hi guys,<br><div><br></div><div>I just received a movie file with AAC audio which doesn't play correctly in my player using the ffmpeg libraries.</div><div>It sounded “robotic” and the audio ran out of sync rather quickly.</div><div><br></div><div>Ffprobe output:</div><div><br></div><div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo;background-color:rgb(255,255,255)"><span style="font-variant-ligatures:no-common-ligatures">ffprobe version 3.3.1 Copyright (c) 2007-2017 the FFmpeg developers</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo;background-color:rgb(255,255,255)"><span style="font-variant-ligatures:no-common-ligatures"> built with llvm-gcc 4.2.1 (LLVM build 2336.11.00)</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo;background-color:rgb(255,255,255)"><span style="font-variant-ligatures:no-common-ligatures"> configuration: --prefix=/Volumes/Ramdisk/sw --enable-gpl --enable-pthreads --enable-version3 --enable-libspeex --enable-libvpx --disable-decoder=libvpx --enable-libmp3lame --enable-libtheora --enable-libvorbis --enable-libx264 --enable-avfilter --enable-libopencore_amrwb --enable-libopencore_amrnb --enable-filters --enable-libgsm --enable-libvidstab --enable-libx265 --disable-doc --arch=x86_64 --enable-runtime-cpudetect</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo;background-color:rgb(255,255,255)"><span style="font-variant-ligatures:no-common-ligatures"> libavutil 55. 58.100 / 55. 58.100</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo;background-color:rgb(255,255,255)"><span style="font-variant-ligatures:no-common-ligatures"> libavcodec 57. 89.100 / 57. 89.100</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo;background-color:rgb(255,255,255)"><span style="font-variant-ligatures:no-common-ligatures"> libavformat 57. 71.100 / 57. 71.100</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo;background-color:rgb(255,255,255)"><span style="font-variant-ligatures:no-common-ligatures"> libavdevice 57. 6.100 / 57. 6.100</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo;background-color:rgb(255,255,255)"><span style="font-variant-ligatures:no-common-ligatures"> libavfilter 6. 82.100 / 6. 82.100</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo;background-color:rgb(255,255,255)"><span style="font-variant-ligatures:no-common-ligatures"> libswscale 4. 6.100 / 4. 6.100</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo;background-color:rgb(255,255,255)"><span style="font-variant-ligatures:no-common-ligatures"> libswresample 2. 7.100 / 2. 7.100</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo;background-color:rgb(255,255,255)"><span style="font-variant-ligatures:no-common-ligatures"> libpostproc 54. 5.100 / 54. 5.100</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo;background-color:rgb(255,255,255)"><span style="font-variant-ligatures:no-common-ligatures">Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/Users/flo/Downloads/wetransf<wbr>er-6ec47f/IQT Capture 170911 Unity Round1.mov':</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo;background-color:rgb(255,255,255)"><span style="font-variant-ligatures:no-common-ligatures"> Metadata:</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo;background-color:rgb(255,255,255)"><span style="font-variant-ligatures:no-common-ligatures"> major_brand : qt </span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo;background-color:rgb(255,255,255)"><span style="font-variant-ligatures:no-common-ligatures"> minor_version : 512</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo;background-color:rgb(255,255,255)"><span style="font-variant-ligatures:no-common-ligatures"> compatible_brands: qt </span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo;background-color:rgb(255,255,255)"><span style="font-variant-ligatures:no-common-ligatures"> encoder : Lavf57.66.102</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo;background-color:rgb(255,255,255)"><span style="font-variant-ligatures:no-common-ligatures"> Duration: 00:07:58.81, start: 0.000000, bitrate: 2672 kb/s</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo;background-color:rgb(255,255,255)"><span style="font-variant-ligatures:no-common-ligatures"> Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1280x720, 2499 kb/s, 29.97 fps, 29.97 tbr, 30k tbn, 59.94 tbc (default)</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo;background-color:rgb(255,255,255)"><span style="font-variant-ligatures:no-common-ligatures"> Metadata:</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo;background-color:rgb(255,255,255)"><span style="font-variant-ligatures:no-common-ligatures"> handler_name : DataHandler</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo;background-color:rgb(255,255,255)"><span style="font-variant-ligatures:no-common-ligatures"> Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 162 kb/s (default)</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo;background-color:rgb(255,255,255)"><span style="font-variant-ligatures:no-common-ligatures"> Metadata:</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo;background-color:rgb(255,255,255)"><span style="font-variant-ligatures:no-common-ligatures"> handler_name : DataHandler</span></div></div><div><br></div><div>By examining the file I found out that the packet durations of the AAC stream were not 1024 as they are with all the other files I have but rather either 1000 or 1100.</div><div>While this by itself would not be a problem, it’s very confusing that the AAC decoder outputs AVFrames with a duration of 1024.</div><div><br></div><div>So now I’m a bit stuck as I really don’t know what to do.</div><div>If the packets were all 1000 I would try discarding the last 24 samples of each AVFrame but as the frame apparently only holds 1024 samples although the packet says it contains 1100 samples, I’m stuck.</div><div>I tried sending a NULL packet in the case of longer packets hoping to get the remains 76 samples out of the decoder but I got this error message:</div><div><br></div><div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures"><b>[aac @ 0x10539da00] Got unexpected packet size after a partial decode</b></span></div></div><div><br></div><div>The file plays fine in both QuickTime and VLC so there must be a correct way of handling these kind of files..</div><div><br></div><div>I’d be very grateful for any insight anyone of you might have!</div><div><br></div><div>Thanks and best,</div><div><br></div><div>Flo</div></div><br></div></div>______________________________<wbr>_________________<br>
Libav-user mailing list<br>
<a href="mailto:Libav-user@ffmpeg.org" target="_blank">Libav-user@ffmpeg.org</a><br>
<a href="http://ffmpeg.org/mailman/listinfo/libav-user" rel="noreferrer" target="_blank">http://ffmpeg.org/mailman/list<wbr>info/libav-user</a><br>
<br></blockquote></div><br></div><div class="gmail_extra">What do you mean "packet contains 1100 samples", how is that specified? AVPacket->duration is in time_base units, not in samples.</div></div>
<br>______________________________<wbr>_________________<br>
Libav-user mailing list<br>
<a href="mailto:Libav-user@ffmpeg.org">Libav-user@ffmpeg.org</a><br>
<a href="http://ffmpeg.org/mailman/listinfo/libav-user" rel="noreferrer" target="_blank">http://ffmpeg.org/mailman/<wbr>listinfo/libav-user</a><br>
<br></blockquote></div><br></div>