How to use gsreamer decode .TS media file

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to use gsreamer decode .TS media file

3,251 Views
weikeng-jimmy
Contributor III

Hi Sir,

I use imx6q, linux version is 3.14.28.

I want to decode ".ts" media file. (video->h264,audio->aac)

MOVIE download path : https://drive.google.com/file/d/0ByyuKxABzHV7SUZid2dLZlVNTU0/view?usp=sharing

When I use command as below can decode h264 video.

gst-launch-1.0 filesrc location=/PTS_HD_AAC_5MIN.ts typefind=false ! "video/mpegts, systemstream=(boolean)true, mpegversion=(int)2" ! aiurdemux ! queue ! vpudec ! imxv4l2sink

I will add audio mux to play can play failed.

command & error message:
gst-launch-1.0 filesrc location=/PTS_HD_AAC_5MIN.ts typefind=false ! "video/mpegts" ! aiurdemux name=demux demux. ! queue max-size-buffers=0 max-size-time=0 ! vpudec ! queue ! overlaysink demux. ! queue ! beepdec ! autoaudiosink
......
[INFO] Product Info: i.MX6Q/D/S
====== VPUDEC: 4.0.3 build on Mar 14 2016 11:41:27. ======
wrapper: 1.0.58 (VPUWRAPPER_ARM_LINUX Build on Mar 14 2016 11:35:40)
vpulib: 5.4.28
firmware: 3.1.1.46063
Pipeline is PREROLLING ...
Demux core /usr/lib/imx-mm/parser/lib_rm_parser_arm11_elinux.so error or missed!
(Err: /usr/lib/imx-mm/parser/lib_rm_parser_arm11_elinux.so: cannot open shared object file: No such file or directory)
Caught SIGSEGV
#0 0x76cb5ee0 in poll () from /lib/libc.so.6
#1 0x76fce4c0 in ?? ()

I try to "playbin" command , but play hang-up.

command & error message:

gst-launch-1.0 playbin uri=file:///PTS_HD_AAC_5MIN.ts video-sink="imxv4l2sink device=/dev/video17" audio-sink="alsasink device=plughw:0"

......

video/x-h264, parsed=(boolean)true, alignment=(string)au, stream-format=(string)byte-stream, width=(int)1920, height=(int)1088, framerate=(fraction)30/1
------------------------
[INFO] Product Info: i.MX6Q/D/S
====== VPUDEC: 4.0.3 build on Mar 14 2016 11:41:27. ======
wrapper: 1.0.58 (VPUWRAPPER_ARM_LINUX Build on Mar 14 2016 11:35:40)
vpulib: 5.4.28
firmware: 3.1.1.46063

====== BEEP: 4.0.3 build on Mar 14 2016 11:41:00. ======
Core: AAC decoder Wrapper build on Apr 22 2014 09:43:50
file: /usr/lib/imx-mm/audio-codec/wrap/lib_aacd_wrap_arm12_elinux.so.3
CODEC: BLN_MAD-MMCODECS_AACD_ARM_03.09.00_CORTEX-A8 build on Jun 19 2014 18:30:32.
[INFO] bitstreamMode 1, chromaInterleave 1, mapType 0, tiled2LinearEnable 0
[INFO] bitstreamMode 1, chromaInterleave 1, mapType 0, tiled2LinearEnable 0

How to correct to decode .ts media file ? Thanks!

Labels (4)
Tags (2)
0 Kudos
11 Replies

2,164 Views
igorpadykov
NXP Employee
NXP Employee

Hi JIMMY

had you intsalled aacplus decoder package as described in

Table 7. Multimedia controlled access packages attached Release Notes

and sect.1.3 Multimedia licensing, also one can look at

Index of /buildsources/l/libfslaacpcodec/libfslaacpcodec-4.0.2 

Usage is described in sect.7.3.11 Linux Guide

Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

2,164 Views
weikeng-jimmy
Contributor III

Hi Igor,

Thanks for your support!I update Freescale AAC Plus package to my project . And I run to play .ts movie and always hang-up. The message can get aacplus plug-in as below. Thanks!


gst-launch-1.0 playbin uri=file:///PTS_HD_AAC_5MIN.ts video-sink="imxv4l2sink device=/dev/video17" audio-sink="alsasink device=plughw:0"

set color key:00010203
====== IMXV4L2SINK: 4.0.3 build on Nov 25 2016 14:47:37. ======
Setting pipeline to PAUSED ...
display(/dev/fb0) resolution is (1024x768).
Pipeline is PREROLLING ...

====== AIUR: 4.0.3 build on Nov 25 2016 14:47:32. ======
Core: BLN_MAD-MMLAYER_MPG2PARSER_04.04.26 build on Jan 20 2015 01:05:12
file: /usr/lib/imx-mm/parser/lib_mpg2_parser_arm11_elinux.so.3.1
exceed memory ParseMPEGAudioInfo_Buffer!
Mpeg2CreateParser:parser created successfully
------------------------
Track 00 [audio_0] Enabled
Duration: 0:05:15.136000000
Language: und
Mime:
audio/mpeg, mpegversion=(int)1, framed=(boolean)true, channels=(int)2, rate=(int)48000, bitrate=(int)0
------------------------
------------------------
Track 01 [audio_1] Enabled
Duration: 0:05:15.136000000
Language: und
Mime:
audio/mpeg, mpegversion=(int)1, framed=(boolean)true, channels=(int)2, rate=(int)48000, bitrate=(int)0
------------------------
------------------------
Track 02 [audio_2] Enabled
Duration: 0:05:15.136000000
Language: und
Mime:
audio/mpeg, mpegversion=(int)1, framed=(boolean)true, channels=(int)2, rate=(int)8000, bitrate=(int)144
------------------------
------------------------
Track 03 [audio_3] Enabled
Duration: 0:05:15.136000000
Language: und
Mime:
audio/mpeg, mpegversion=(int)4, channels=(int)4, rate=(int)11025, bitrate=(int)38264, framed=(boolean)true
------------------------
------------------------
Track 04 [video_0] Enabled
Duration: 0:05:16.295545000
Language: und
Mime:
video/x-h264, parsed=(boolean)true, alignment=(string)au, stream-format=(string)byte-stream, width=(int)1920, height=(int)1088, framerate=(fraction)30/1
------------------------
[INFO] Product Info: i.MX6Q/D/S
====== VPUDEC: 4.0.3 build on Nov 25 2016 14:47:41. ======
wrapper: 1.0.58 (VPUWRAPPER_ARM_LINUX Build on Nov 25 2016 14:47:09)
vpulib: 5.4.28
firmware: 3.1.1.46063
------------------------
Track 05 [video_1] Enabled
Duration: 0:05:16.014089000
Language: und
Mime:
video/x-h264, parsed=(boolean)true, alignment=(string)au, stream-format=(string)byte-stream, width=(int)1920, height=(int)1088, framerate=(fraction)30/1
------------------------
[INFO] Product Info: i.MX6Q/D/S
====== VPUDEC: 4.0.3 build on Nov 25 2016 14:47:41. ======
wrapper: 1.0.58 (VPUWRAPPER_ARM_LINUX Build on Nov 25 2016 14:47:09)
vpulib: 5.4.28
firmware: 3.1.1.46063

====== BEEP: 4.0.3 build on Nov 25 2016 14:47:35. ======
Core: AAC-Plus decoder Wrapper build on Jan 22 2014 15:42:58
file: /usr/lib/imx-mm/audio-codec/wrap/lib_aacplusd_wrap_arm12_elinux.so.3     <--- already use aacplusd plug-in
CODEC: BLN_MAD-MMCODECS_AACD_ARM_03.09.00_CORTEX-A8 build on Jun 19 2014 18:30:32.
BLN_MAD-MMCODECS_AACPD_ARM_03.08.00_ARM11 build on Nov 12 2013 11:13:32.
[INFO] bitstreamMode 1, chromaInterleave 1, mapType 0, tiled2LinearEnable 0
[INFO] bitstreamMode 1, chromaInterleave 1, mapType 0, tiled2LinearEnable 0

0 Kudos

2,164 Views
weikeng-jimmy
Contributor III

Hi Igor,

I try to test 3.14.52 BSP version and get different message .


root@imx6qsabresd:/# gst-launch-1.0 playbin uri=file:///PTS_HD_AAC_5MIN.ts video-sink="imxv4l2sink device=/dev/video17" audio-sink="alsasink device=plughw:0"
====== IMXV4L2SINK: 4.0.8 build on Nov 25 2016 17:12:59. ======
Setting pipeline to PAUSED ...
display(/dev/fb0) resolution is (1024x768).
Pipeline is PREROLLING ...

====== AIUR: 4.0.8 build on Nov 25 2016 17:12:55. ======
Core: BLN_MAD-MMLAYER_MPG2PARSER_04.04.40 build on Nov 11 2015 08:09:41
file: /usr/lib/imx-mm/parser/lib_mpg2_parser_arm11_elinux.so.3.1
Need More Audio Buffer!
Need More Audio Buffer!
Need More Audio Buffer!
Need More Audio Buffer!
Need More Audio Buffer!
Need More Audio Buffer!
Need More Audio Buffer!
Need More Audio Buffer!
Need More Audio Buffer!
Need More Audio Buffer!
Need More Audio Buffer!
Need More Audio Buffer!
Need More Audio Buffer!
Need More Audio Buffer!
Need More Audio Buffer!
Need More Audio Buffer!
Need More Audio Buffer!
Caught SIGSEGV
#0 0x76ca82c0 in poll () at ../sysdeps/unix/syscall-template.S:81
#1 0x76d817d4 in ?? () from /usr/lib/libglib-2.0.so.0
Spinning. Please run 'gdb gst-launch-1.0 1498' to continue debugging, Ctrl-C to quit, or Ctrl-\ to dump core.

0 Kudos

2,164 Views
igorpadykov
NXP Employee
NXP Employee

Hi JIMMY

for usage with 3.14.52 please obtain aacplus decoder package for that release
using procedure described in sect.1.3 Proprietary Licensing Packages
attached Release Notes

Best regards
igor

0 Kudos

2,164 Views
weikeng-jimmy
Contributor III

Hi Igor,

           I already merge AAC-plus package (fslcodec-aacp-3.14.52-1.1.0-ga.tar) and it's still not work (result like 3.14.28 with AAC-plus package).  Whether IMX6 decoder can't decode the TS with audio file ? Thanks!

0 Kudos

2,164 Views
igorpadykov
NXP Employee
NXP Employee

Hi JIMMY

is it working with other ts files ?

AAC-plus package is limited access and so supported specially,

using local marketing channel.

Best regards
igor

0 Kudos

2,164 Views
weikeng-jimmy
Contributor III

Hi Igor,

Yes, 

I can play another contain aac audio TS files and can see message it use "AACPD" mmcodes.


root@imx6qsabresd:/# gst-launch-1.0 playbin uri=file:///VideoTeststream1NorDig2ver2.ts video-sink="imxv4l2sink device=/dev/video17" audio-sink="alsasink device=plughw:0"
====== IMXV4L2SINK: 4.0.8 build on Nov 25 2016 17:12:59. ======
Setting pipeline to PAUSED ...
display(/dev/fb0) resolution is (1024x768).
Pipeline is PREROLLING ...

====== AIUR: 4.0.8 build on Nov 25 2016 17:12:55. ======
Core: BLN_MAD-MMLAYER_MPG2PARSER_04.04.40 build on Nov 11 2015 08:09:41
file: /usr/lib/imx-mm/parser/lib_mpg2_parser_arm11_elinux.so.3.1
Mpeg2CreateParser:parser created successfully
------------------------
Track 01 [audio_0] Enabled
Duration: 0:02:54.628723000
Language: und
Mime:
audio/mpeg, mpegversion=(int)4, channels=(int)2, rate=(int)24000, bitrate=(int)61687
------------------------
------------------------
Track 05 [video_0] Enabled
Duration: 0:02:55.359389000
Language: eng
Mime:
video/x-h264, parsed=(boolean)true, alignment=(string)au, stream-format=(string)byte-stream, width=(int)720, height=(int)576, framerate=(fraction)25/1
------------------------
[INFO] Product Info: i.MX6Q/D/S
[INFO] Product Info: i.MX6Q/D/S
====== VPUDEC: 4.0.8 build on Nov 25 2016 17:13:06. ======
wrapper: 1.0.62 (VPUWRAPPER_ARM_LINUX Build on Nov 25 2016 17:12:27)
vpulib: 5.4.32
firmware: 3.1.1.46070
[INFO] bitstreamMode 1, chromaInterleave 1, mapType 0, tiled2LinearEnable 0

====== BEEP: 4.0.8 build on Nov 25 2016 17:12:58. ======
Core: AAC-Plus decoder Wrapper build on Jan 22 2014 15:42:58
file: /usr/lib/imx-mm/audio-codec/wrap/lib_aacplusd_wrap_arm12_elinux.so.3
CODEC: BLN_MAD-MMCODECS_AACD_ARM_03.09.00_CORTEX-A8 build on Jun 19 2014 18:30:32.
BLN_MAD-MMCODECS_AACPD_ARM_03.08.00_ARM11 build on Nov 12 2013 11:13:32.

Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstAudioSinkClock
v4l2sink need allocate 3 buffers.

0 Kudos

2,164 Views
igorpadykov
NXP Employee
NXP Employee

there are many types of aacplus according to

High-Efficiency Advanced Audio Coding - Wikipedia 

so you can use any tools for analysing video file format and check

actual formats of good and failure files.

Best regards
igor

0 Kudos

2,164 Views
weikeng-jimmy
Contributor III

Hi Igor,

decode FAIL ->

螢幕截圖 2016-11-30 09.24.12.png

decode OK ->

螢幕截圖 2016-11-30 09.26.05.png

0 Kudos

2,164 Views
igorpadykov
NXP Employee
NXP Employee

Hi JIMMY

"FAIL" has SBR content which handled by HE-AAC which is not supported

by any Parser/Demuxers described in Table-27 Release Notes, supported only AAC as in "OK".

High-Efficiency Advanced Audio Coding - Wikipedia 

Best regards
igor

0 Kudos

2,164 Views
weikeng-jimmy
Contributor III

Hi Igor,

            Thanks for your commands , I will forward it to my customer.              

0 Kudos