Question about 3gpp and appsrc usage.

Jabra Havridi jabra.havridi at gmail.com
Wed May 11 10:35:27 UTC 2016


Hi, gstreamer community!

Sorry for my language skill in advance.

I have a task: capture sound on android tablet, encode it with amr-nb
codec, and save it to 3pg-file.

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.
I'm already done capture and encoding parts. Now my task is: push amr-nb
stream to gstreamer pipeline through appsrc.

I use this pipeline to produce 3gp-files (this is equivalent for my code):
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".

Now i'm struggling with such a problem: resulting 3gp-file is wrong. This
appears as playback problems:
1) Timeline is not functional(current position on timeline stays at the
begining all the playback time).
2) Some players can't play this files at all(VLC).
3) Recorded sound includes artefacts like a jitter.

To get deeper into the problem, i try to play my file and independent
amr-nb-3gp-file without such problems(from
http://download.wavetlan.com/SVV/Media/HTTP/http-3gp-audio.htm)
with enhanced logging pipeline:

my file:
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

Playback log for my file(also i have attached it to the letter):
http://pastebin.com/JXxZzH5C


independent normal amr-3gp:
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

Playback log for normal amr-3gp: http://pastebin.com/2bMzJJqC


Same problems appears while trying to stick together many amr buffers in
different files using multifilesrc & 3gppmux:

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

Playback log for this case: http://pastebin.com/8q3vSrie


There is my questions:
 Is there any pitfalls with appsrc and 3gppmux usage within such a pipeline?
 Is there any tricks with 3gppmux and a pipeline timing?

Any useful advices will be greatly appreciated.


--------------------------
With best regards, Dmitriy Sereda.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20160511/c764e210/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 20160428_001_normal_amr_3gp_from_web.log
Type: application/octet-stream
Size: 538146 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20160511/c764e210/attachment-0003.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 20160428_002_recorded_on_tablet_amr_3gp.log
Type: application/octet-stream
Size: 449333 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20160511/c764e210/attachment-0004.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 20160428_003_assembled_from_buffers_amr_3gp.log
Type: application/octet-stream
Size: 530970 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20160511/c764e210/attachment-0005.obj>


More information about the gstreamer-devel mailing list