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. _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel 20160428_001_normal_amr_3gp_from_web.log (719K) Download Attachment 20160428_002_recorded_on_tablet_amr_3gp.log (600K) Download Attachment 20160428_003_assembled_from_buffers_amr_3gp.log (709K) Download Attachment |
Le mercredi 11 mai 2016 à 16:35 +0600, Jabra Havridi a écrit :
> 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". The timestamps generated by appsrc (do-timestamp=TRUE) in this case will be extremely approximate. You should probably timestamp the buffer yourself, somewhere closer to the capture. Or even better, use timestamp for your source. Nicolas _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
Free forum by Nabble | Edit this page |