<div dir="ltr"><span style="color:rgb(0,0,0);font-family:monospace;font-size:medium">Hi, gstreamer community!</span><br style="color:rgb(0,0,0);font-family:monospace;font-size:medium"><br style="color:rgb(0,0,0);font-family:monospace;font-size:medium"><span style="color:rgb(0,0,0);font-family:monospace;font-size:medium">Sorry for my language skill in advance.</span><br style="color:rgb(0,0,0);font-family:monospace;font-size:medium"><br style="color:rgb(0,0,0);font-family:monospace;font-size:medium"><span style="color:rgb(0,0,0);font-family:monospace;font-size:medium">I have a task: capture sound on android tablet, encode it with amr-nb codec, and save it to 3pg-file.</span><br style="color:rgb(0,0,0);font-family:monospace;font-size:medium"><br style="color:rgb(0,0,0);font-family:monospace;font-size:medium"><span style="color:rgb(0,0,0);font-family:monospace;font-size:medium">I decided to capture sound and encode it with MediaCodec from Android API. Then i push it to gstreamer pipeline, that is responsible for recording 3gp-files from such stream.</span><br style="color:rgb(0,0,0);font-family:monospace;font-size:medium"><span style="color:rgb(0,0,0);font-family:monospace;font-size:medium">I'm already done capture and encoding parts. Now my task is: push amr-nb stream to gstreamer pipeline through appsrc.</span><br style="color:rgb(0,0,0);font-family:monospace;font-size:medium"><br style="color:rgb(0,0,0);font-family:monospace;font-size:medium"><span style="color:rgb(0,0,0);font-family:monospace;font-size:medium">I use this pipeline to produce 3gp-files (this is equivalent for my code):</span><br style="color:rgb(0,0,0);font-family:monospace;font-size:medium"><span style="color:rgb(0,0,0);font-family:monospace;font-size:medium">appsrc caps="audio/AMR,rate=8000,channels=1" stream-type=GST_APP_STREAM_TYPE_STREAM format=GST_FORMAT_TIME is-live=TRUE min-latency=0 do-timestamp=TRUE ! queue ! 3gppmux ! filesink location="/mnt/sdcard/temp/recording.3gp".</span><span style="color:rgb(0,0,0);font-family:monospace;font-size:medium"> </span><br style="color:rgb(0,0,0);font-family:monospace;font-size:medium"><br style="color:rgb(0,0,0);font-family:monospace;font-size:medium"><span style="color:rgb(0,0,0);font-family:monospace;font-size:medium">Now i'm struggling with such a problem: resulting 3gp-file is wrong. This appears as playback problems:</span><span style="color:rgb(0,0,0);font-family:monospace;font-size:medium"> </span><br style="color:rgb(0,0,0);font-family:monospace;font-size:medium"><span style="color:rgb(0,0,0);font-family:monospace;font-size:medium">1) Timeline is not functional(current position on timeline stays at the begining all the playback time).</span><br style="color:rgb(0,0,0);font-family:monospace;font-size:medium"><span style="color:rgb(0,0,0);font-family:monospace;font-size:medium">2) Some players can't play this files at all(VLC).</span><br style="color:rgb(0,0,0);font-family:monospace;font-size:medium"><span style="color:rgb(0,0,0);font-family:monospace;font-size:medium">3) Recorded sound includes artefacts like a jitter.</span><br style="color:rgb(0,0,0);font-family:monospace;font-size:medium"><br style="color:rgb(0,0,0);font-family:monospace;font-size:medium"><span style="color:rgb(0,0,0);font-family:monospace;font-size:medium">To get deeper into the problem, i try to play my file and independent amr-nb-3gp-file without such problems(from </span><span class="" id="OBJ_PREFIX_DWT223_com_zimbra_url" style="color:darkblue;font-family:monospace;font-size:medium"><span class="" id="OBJ_PREFIX_DWT224_com_zimbra_url" style=""><a target="_blank" href="http://download.wavetlan.com/SVV/Media/HTTP/http-3gp-audio.htm" style="color:darkblue;text-decoration:none">http://download.wavetlan.com/SVV/Media/HTTP/http-3gp-audio.htm</a></span></span><span style="color:rgb(0,0,0);font-family:monospace;font-size:medium">)</span><span style="color:rgb(0,0,0);font-family:monospace;font-size:medium"> </span><br style="color:rgb(0,0,0);font-family:monospace;font-size:medium"><span style="color:rgb(0,0,0);font-family:monospace;font-size:medium">with enhanced logging pipeline:</span><br style="color:rgb(0,0,0);font-family:monospace;font-size:medium"><br style="color:rgb(0,0,0);font-family:monospace;font-size:medium"><span style="color:rgb(0,0,0);font-family:monospace;font-size:medium">my file:</span><br style="color:rgb(0,0,0);font-family:monospace;font-size:medium"><span style="color:rgb(0,0,0);font-family:monospace;font-size:medium">gst-launch-1.0.exe -ve --gst-debug=*:3,qtdemux:5 filesrc location="c:/temp/1461580323909-1461580384071.3gp" ! queue ! qtdemux ! amrnbdec ! directsoundsink 2>20160428_002_recorded_on_tablet_amr_3gp.log</span><br style="color:rgb(0,0,0);font-family:monospace;font-size:medium"><br style="color:rgb(0,0,0);font-family:monospace;font-size:medium"><span style="color:rgb(0,0,0);font-family:monospace;font-size:medium">Playback log for my file(also i have attached it to the letter): </span><span class="" id="OBJ_PREFIX_DWT225_com_zimbra_url" style="color:darkblue;font-family:monospace;font-size:medium"><span class="" id="OBJ_PREFIX_DWT226_com_zimbra_url" style=""><a target="_blank" href="http://pastebin.com/JXxZzH5C" style="color:darkblue;text-decoration:none">http://pastebin.com/JXxZzH5C</a></span></span><br style="color:rgb(0,0,0);font-family:monospace;font-size:medium"><br style="color:rgb(0,0,0);font-family:monospace;font-size:medium"><br style="color:rgb(0,0,0);font-family:monospace;font-size:medium"><span style="color:rgb(0,0,0);font-family:monospace;font-size:medium">independent normal amr-3gp:</span><br style="color:rgb(0,0,0);font-family:monospace;font-size:medium"><span style="color:rgb(0,0,0);font-family:monospace;font-size:medium">gst-launch-1.0.exe -ve --gst-debug=*:3,qtdemux:5 filesrc location="c:/temp/test1_AMR-NB_Mono_7.95kbps_8000Hz.3GP" ! queue ! qtdemux ! amrnbdec ! directsoundsink 2>20160428_001_normal_amr_3gp_from_web.log</span><br style="color:rgb(0,0,0);font-family:monospace;font-size:medium"><br style="color:rgb(0,0,0);font-family:monospace;font-size:medium"><span style="color:rgb(0,0,0);font-family:monospace;font-size:medium">Playback log for normal amr-3gp: </span><span class="" id="OBJ_PREFIX_DWT227_com_zimbra_url" style="color:darkblue;font-family:monospace;font-size:medium"><span class="" id="OBJ_PREFIX_DWT228_com_zimbra_url" style=""><a target="_blank" href="http://pastebin.com/2bMzJJqC" style="color:darkblue;text-decoration:none">http://pastebin.com/2bMzJJqC</a></span></span><br style="color:rgb(0,0,0);font-family:monospace;font-size:medium"><br style="color:rgb(0,0,0);font-family:monospace;font-size:medium"><br style="color:rgb(0,0,0);font-family:monospace;font-size:medium"><span style="color:rgb(0,0,0);font-family:monospace;font-size:medium">Same problems appears while trying to stick together many amr buffers in different files using multifilesrc & 3gppmux:</span><br style="color:rgb(0,0,0);font-family:monospace;font-size:medium"><br style="color:rgb(0,0,0);font-family:monospace;font-size:medium"><span style="color:rgb(0,0,0);font-family:monospace;font-size:medium">gst-launch-1.0.exe -ve --gst-debug=*:3,qtdemux:5 filesrc location="c:/temp/touput_01.3gp" ! queue ! qtdemux ! amrnbdec ! directsoundsink 2>20160428_003_assembled_from_buffers_amr_3gp.log</span><br style="color:rgb(0,0,0);font-family:monospace;font-size:medium"><br style="color:rgb(0,0,0);font-family:monospace;font-size:medium"><span style="color:rgb(0,0,0);font-family:monospace;font-size:medium">Playback log for this case: </span><span class="" id="OBJ_PREFIX_DWT229_com_zimbra_url" style="color:darkblue;font-family:monospace;font-size:medium"><span class="" id="OBJ_PREFIX_DWT230_com_zimbra_url" style=""><a target="_blank" href="http://pastebin.com/8q3vSrie" style="color:darkblue;text-decoration:none">http://pastebin.com/8q3vSrie</a></span></span><br style="color:rgb(0,0,0);font-family:monospace;font-size:medium"><br style="color:rgb(0,0,0);font-family:monospace;font-size:medium"><br style="color:rgb(0,0,0);font-family:monospace;font-size:medium"><span style="color:rgb(0,0,0);font-family:monospace;font-size:medium">There is my questions:</span><br style="color:rgb(0,0,0);font-family:monospace;font-size:medium"><span style="color:rgb(0,0,0);font-family:monospace;font-size:medium"> </span><span style="color:rgb(0,0,0);font-family:monospace;font-size:medium">Is there any pitfalls with appsrc and 3gppmux usage within such a pipeline?</span><br style="color:rgb(0,0,0);font-family:monospace;font-size:medium"><span style="color:rgb(0,0,0);font-family:monospace;font-size:medium"> </span><span style="color:rgb(0,0,0);font-family:monospace;font-size:medium">Is there any tricks with 3gppmux and a pipeline timing?</span><br style="color:rgb(0,0,0);font-family:monospace;font-size:medium"><br style="color:rgb(0,0,0);font-family:monospace;font-size:medium"><span style="color:rgb(0,0,0);font-family:monospace;font-size:medium">Any useful advices will be greatly appreciated.</span><br style="color:rgb(0,0,0);font-family:monospace;font-size:medium"><br style="color:rgb(0,0,0);font-family:monospace;font-size:medium"><br style="color:rgb(0,0,0);font-family:monospace;font-size:medium"><span style="color:rgb(0,0,0);font-family:monospace;font-size:medium">--------------------------</span><br style="color:rgb(0,0,0);font-family:monospace;font-size:medium"><span style="color:rgb(0,0,0);font-family:monospace;font-size:medium">With best regards, Dmitriy Sereda.</span><br></div>