playbin fails to play some of mp4 files that work with playbin3
I have a couple of h264 encoded files, here's output for them from ffprobe
:
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'a.mp4':
Metadata:
major_brand : mp42
minor_version : 1
compatible_brands: mp42avc1
creation_time : 2007-12-01T16:54:17.000000Z
Duration: 00:00:18.12, start: 0.000000, bitrate: 1605 kb/s
Stream #0:0(eng): Video: h264 (Main) (avc1 / 0x31637661), yuv420p(tv, smpte170m/smpte170m/bt709), 640x480, 1464 kb/s, 25 fps, 25 tbr, 2500 tbn, 5k tbc (default)
Metadata:
creation_time : 2007-12-01T16:55:07.000000Z
handler_name : Apple Video Media Handler
Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 132 kb/s (default)
Metadata:
creation_time : 2007-12-01T16:55:07.000000Z
handler_name : Apple Sound Media Handler
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf57.83.100
Duration: 00:00:15.51, start: 0.000000, bitrate: 3689 kb/s
Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1920x1080, 3522 kb/s, 30 fps, 30 tbr, 15360 tbn, 60 tbc (default)
Metadata:
handler_name : VideoHandler
Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 160 kb/s (default)
Metadata:
handler_name : SoundHandler
a.mp4
plays fine and gst-discoverer
gives:
Properties:
Duration: 0:00:18.120000000
Seekable: yes
Live: no
container: Quicktime
audio: MPEG-4 AAC
Stream ID: 995c074104c72e70af407ebb526a6b3bc91408d0a0a480f17e7115001d220f30/002
Language: en
Channels: 2 (front-left, front-right)
Sample rate: 44100
Depth: 32
Bitrate: 192000
Max bitrate: 192000
video: H.264 (Main Profile)
Stream ID: 995c074104c72e70af407ebb526a6b3bc91408d0a0a480f17e7115001d220f30/001
Width: 640
Height: 480
Depth: 24
Frame rate: 25/1
Pixel aspect ratio: 1/1
Interlaced: false
Bitrate: 1408242
Max bitrate: 0
For b.mp4
gst-play
will hang indefinitely and gst-discoverer
gives Analyzing URI timed out
. gst-launch-1.0 playbin uri=file:///tmp/b.mp4
will hang as well.
Hand-crafted pipeline gst-launch-1.0 filesrc location=b.mp4 ! qtdemux name=m ! queue ! h264parse ! avdec_h264 ! videoconvert ! autovideosink m. ! queue ! aacparse ! avdec_aac ! audioconvert ! autoaudiosink
or playbin3
instead of playbin
work perfectly fine though.
I have attached output for gst-launch-1.0 --gst-debug-level=3 --gst-debug-no-color playbin uri=file:///tmp/b.mp4
below.