AnsweredAssumed Answered

Gstreamer can't play mp4 (video h264 + audio mp3)

Question asked by Pavel Frolov on Mar 15, 2018
Latest reply on Mar 16, 2018 by Pavel Frolov

I've experienced problem playing back mp4 file on iMX6 system. Software build based on VAR-SOM-MX6 - Yocto Rocko 2.4 based on FSL Community BSP rocko with 4.9.11_1.0.0-ga Linux release. Gstreamer version 1.12.2. Video/audio mp4 file created by:


gst-launch-1.0 -v -e imxv4l2videosrc num-buffers=100 device=/dev/video0 ! queue ! imxvpuenc_h264 gop-size=7 bitrate=4000 ! h264parse ! video/x-h264,stream-format=avc ! mp4mux name=mux dts-method=dd ! filesink  locatio
n=test1.mp4 alsasrc num-buffers=100 do-timestamp=true ! audio/x-raw, format=S16LE, rate=44100, channels=2 ! queue ! imxmp3audioenc bitrate=96 ! queue ! mux.audio_0

When I run command to play:

gst-launch-1.0 filesrc location=test1.mp4 ! qtdemux ! h264parse ! imxvpudec ! imxeglvivsink

I'm getting error:

Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
ERROR:../src/vpu/decoder.c:921:gst_imx_vpu_decoder_decide_allocation: assertion failed: (vpu_decoder->decoder_context != NULL)

I've tried to playback the same file, but with gstreamer v1.08:

./gst-launch-1.0 filesrc location=test1.mp4 ! qtdemux ! h264parse ! vpudec ! v4l2sink

and it played back correctly. On PC I also can play this file with audio.

Do you know how to resolve this error (vpu_decoder->decoder_context != NULL) in newer gstreamer.

I've added file with debug output in attachment.