lemarkk
Posts: 18
Joined: Sun Oct 04, 2015 3:19 pm

[SOLVED] omxplayer doesn't play H264 video

Tue Mar 29, 2016 12:18 am

EDIT: I've got it to work. I convert/saved it under vlc as mpeg 4 with mp3 audio and changed the file extension from .ps to .mp4 and it plays under omxplayer.

When I run it with no options(or with -o hdmi), it displays: "have a nice day ;)" The video works fine on vlc and mplayer. This is the output from vlc-Tools-Codec information:

H264 - MPEG-4 AVC (part 10) (avc1)
Encoded by: x264

Is this format not supported by omxplayer? I've reinstalled omxplayer and its dependancy and it hasn't helped. Running on a pi 2. The file is a screencast from Kazam (25fps). Running under sudo doesn't help either.

EDIT: after reboot, when I try to play the video(with -o hdmi), I get a mostly yellow window and nothing happens. I have to use alt-f4 to quit omxplayer. Omxplayer's output is:

Video codec omx-h264 width 800 height 480 profile 244 fps 25.000000
Subtitle count: 0, state: off, index: 1, delay: 0
V:PortSettingsChanged: 800x480@25.00 interlace:0 deinterlace:0 anaglyph:0 par:1.00 display:0 alpha:255 aspectMode:0

If I try to play the same video again immediately after, I get this without any other video output (no yellow square):
Video codec omx-h264 width 800 height 480 profile 244 fps 25.000000
Subtitle count: 0, state: off, index: 1, delay: 0

If I play the video without -o hdmi, the same thing happens with the yellow square but omxplayer does quit with q.
Last edited by lemarkk on Tue Mar 29, 2016 10:50 pm, edited 2 times in total.

Nickcn
Posts: 200
Joined: Sat Mar 05, 2016 8:18 pm
Location: USA

Re: omxplayer doesn't play H264 video

Tue Mar 29, 2016 1:30 am

deleted
Last edited by Nickcn on Mon May 16, 2016 2:37 am, edited 1 time in total.

lemarkk
Posts: 18
Joined: Sun Oct 04, 2015 3:19 pm

Re: omxplayer doesn't play H264 video

Tue Mar 29, 2016 1:39 am

H264 - MPEG-4 AVC (part 10) (avc1)
Encoded by: x264

Is this format not supported by omxplayer?
Are we talking .mp4 video here? omxplayer plays it
The point is omxplayer isn't playing the video. I was asking if omxplayer supported mp4.

Nickcn
Posts: 200
Joined: Sat Mar 05, 2016 8:18 pm
Location: USA

Re: omxplayer doesn't play H264 video

Tue Mar 29, 2016 1:44 am

deleted
Last edited by Nickcn on Mon May 16, 2016 2:36 am, edited 1 time in total.

Nickcn
Posts: 200
Joined: Sat Mar 05, 2016 8:18 pm
Location: USA

Re: omxplayer doesn't play H264 video

Tue Mar 29, 2016 1:50 am

deleted
Last edited by Nickcn on Mon May 16, 2016 2:36 am, edited 1 time in total.

lemarkk
Posts: 18
Joined: Sun Oct 04, 2015 3:19 pm

Re: omxplayer doesn't play H264 video

Tue Mar 29, 2016 1:57 am

The point is omxplayer isn't playing the video. I was asking if omxplayer supported mp4.
and your answer is "yes"
Okay. I was asking if anyone knew why omxplayer wasn't playing the video and (hopefully) how to fix it.

Nickcn
Posts: 200
Joined: Sat Mar 05, 2016 8:18 pm
Location: USA

Re: omxplayer doesn't play H264 video

Tue Mar 29, 2016 2:01 am

deleted
Last edited by Nickcn on Mon May 16, 2016 2:35 am, edited 1 time in total.

lemarkk
Posts: 18
Joined: Sun Oct 04, 2015 3:19 pm

Re: omxplayer doesn't play H264 video

Tue Mar 29, 2016 2:05 am

Nickcn wrote:
lemarkk wrote:
The point is omxplayer isn't playing the video. I was asking if omxplayer supported mp4.
and your answer is "yes"
Okay. I was asking if anyone knew why omxplayer wasn't playing the video and (hopefully) how to fix it.
It plays the file type natively, you don't have to do anything to it. If yours does not, then you corrupted it, broke it, or something. You may want to remove it using "apt-get remove", and then reinstall with "apt-get install".
I did that, it didn't help.

Nickcn
Posts: 200
Joined: Sat Mar 05, 2016 8:18 pm
Location: USA

Re: omxplayer doesn't play H264 video

Tue Mar 29, 2016 2:07 am

deleted
Last edited by Nickcn on Mon May 16, 2016 2:35 am, edited 1 time in total.

lemarkk
Posts: 18
Joined: Sun Oct 04, 2015 3:19 pm

Re: omxplayer doesn't play H264 video

Tue Mar 29, 2016 2:11 am

Nickcn wrote:

Code: Select all

sudo apt-get update
sudo apt-get install --only-upgrade -y omxplayer

Otherwise, you may need to restore your backup image (OS may be corrupted)

then

Code: Select all

sudo apt-get update
sudo apt-get upgrade
I tried that and it didn't work.

lemarkk
Posts: 18
Joined: Sun Oct 04, 2015 3:19 pm

Re: omxplayer doesn't play H264 video

Tue Mar 29, 2016 2:16 am

Nickcn wrote:
lemarkk wrote:
The point is omxplayer isn't playing the video. I was asking if omxplayer supported mp4.
and your answer is "yes"
Okay. I was asking if anyone knew why omxplayer wasn't playing the video and (hopefully) how to fix it.
It plays the file type natively, you don't have to do anything to it. If yours does not, then you corrupted it, broke it, or something. You may want to remove it using "apt-get remove", and then reinstall with "apt-get install".

First, I would verify your .mp4 file isnt corrupted. Try a mp4 that you know is good, before you remove/reinstall omxplayer.
I've tested the mp4 on vlc and mplayer on the pi and on vlc on another windows computer.

gkreidl
Posts: 6307
Joined: Thu Jan 26, 2012 1:07 pm
Location: Germany

Re: omxplayer doesn't play H264 video

Tue Mar 29, 2016 3:00 am

Is this a raw H264 file not packaged into any kind of container?
If that's the case, you could use mkvmerge (and its GUI) to package it as MKV. No recoding required, so it's really fast.
Minimal Kiosk Browser (kweb)
Slim, fast webkit browser with support for audio+video+playlists+youtube+pdf+download
Optional fullscreen kiosk mode and command interface for embedded applications
Includes omxplayerGUI, an X front end for omxplayer

User avatar
allfox
Posts: 452
Joined: Sat Jun 22, 2013 1:36 pm
Location: Guang Dong, China

Re: omxplayer doesn't play H264 video

Tue Mar 29, 2016 5:52 am

What is the audio format in that file?

User avatar
topguy
Posts: 6466
Joined: Tue Oct 09, 2012 11:46 am
Location: Trondheim, Norway

Re: omxplayer doesn't play H264 video

Tue Mar 29, 2016 10:29 am

I suggest giving us the full output from the tool "mediainfo" and maybe test with more mp4 files from different sources. Right now there is a lot of guessing going on here.

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 8739
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: omxplayer doesn't play H264 video

Tue Mar 29, 2016 11:11 am

Video codec omx-h264 width 800 height 480 profile 244 fps 25.000000
If I've interpreted that correctly, that is "High 4:4:4 Predictive Profile (Hi444PP, 244)" (see https://en.wikipedia.org/wiki/H.264/MPEG-4_AVC) - use avprobe or similar to confirm.
Only Base, Main, and High profiles are supported.

There's an open issueat the moment where we were investigating throwing a big fat error earlier in decoding the stream, but that work hasn't been completed as yet.
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

lemarkk
Posts: 18
Joined: Sun Oct 04, 2015 3:19 pm

Re: omxplayer doesn't play H264 video

Tue Mar 29, 2016 8:46 pm

topguy wrote:I suggest giving us the full output from the tool "mediainfo" and maybe test with more mp4 files from different sources. Right now there is a lot of guessing going on here.
Here is mediainfo's output:
General
Complete name : Kazam_screencast_00000(memtester25-MPEG4).mp4
Format : MPEG-4
Format profile : Base Media / Version 2
Codec ID : mp42
File size : 2.71 MiB
Duration : 1mn 39s
Overall bit rate : 228 Kbps
Encoded date : UTC 2016-03-26 17:30:42
Tagged date : UTC 2016-03-26 17:30:42
Writing application : x264

Video
ID : 1
Format : AVC
Format/Info : Advanced Video Codec
Format profile : High 4:4:4 Predictive@L3.0
Format settings, CABAC : No
Format settings, ReFrames : 1 frame
Codec ID : avc1
Codec ID/Info : Advanced Video Coding
Duration : 1mn 39s
Bit rate : 226 Kbps
Width : 800 pixels
Height : 480 pixels
Display aspect ratio : 1.667
Frame rate mode : Constant
Frame rate : 25.000 fps
Color space : YUV
Chroma subsampling : 4:4:4
Bit depth : 8 bits
Scan type : Progressive
Bits/(Pixel*Frame) : 0.024
Stream size : 2.69 MiB (99%)
Writing library : x264 core 142 r2431 a5831aa
Encoding settings : cabac=0 / ref=1 / deblock=0:0:0 / analyse=0:0 / me=dia / subme=0 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=0 / me_range=16 / chroma_me=1 / trellis=0 / 8x8dct=0 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=6 / threads=3 / lookahead_threads=1 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=0 / weightp=0 / keyint=250 / keyint_min=25 / scenecut=0 / intra_refresh=0 / rc=cqp / mbtree=0 / qp=15 / ip_ratio=1.40 / aq=0
Language : English
Encoded date : UTC 2016-03-26 17:30:42
Tagged date : UTC 2016-03-26 17:30:42

lemarkk
Posts: 18
Joined: Sun Oct 04, 2015 3:19 pm

Re: omxplayer doesn't play H264 video

Tue Mar 29, 2016 8:55 pm

gkreidl wrote:Is this a raw H264 file not packaged into any kind of container?
If that's the case, you could use mkvmerge (and its GUI) to package it as MKV. No recoding required, so it's really fast.
Same thing happens with the mkv file.

lemarkk
Posts: 18
Joined: Sun Oct 04, 2015 3:19 pm

Re: omxplayer doesn't play H264 video

Tue Mar 29, 2016 9:03 pm

6by9 wrote:
Video codec omx-h264 width 800 height 480 profile 244 fps 25.000000
If I've interpreted that correctly, that is "High 4:4:4 Predictive Profile (Hi444PP, 244)" (see https://en.wikipedia.org/wiki/H.264/MPEG-4_AVC) - use avprobe or similar to confirm.
Only Base, Main, and High profiles are supported.

There's an open issueat the moment where we were investigating throwing a big fat error earlier in decoding the stream, but that work hasn't been completed as yet.
Yup, avprobe confirms: Stream #0.0(eng): Video: h264 (High 4:4:4 Predictive), yuv444p, 800x480 [PAR 1:1 DAR 5:3], 226 kb/s, 25 fps, 2500 tbn, 50 tbc (default). How could I reencode it to a codec omxplayer can play?

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 8739
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: omxplayer doesn't play H264 video

Tue Mar 29, 2016 9:17 pm

lemarkk wrote:
6by9 wrote:
Video codec omx-h264 width 800 height 480 profile 244 fps 25.000000
If I've interpreted that correctly, that is "High 4:4:4 Predictive Profile (Hi444PP, 244)" (see https://en.wikipedia.org/wiki/H.264/MPEG-4_AVC) - use avprobe or similar to confirm.
Only Base, Main, and High profiles are supported.

There's an open issueat the moment where we were investigating throwing a big fat error earlier in decoding the stream, but that work hasn't been completed as yet.
Yup, avprobe confirms: Stream #0.0(eng): Video: h264 (High 4:4:4 Predictive), yuv444p, 800x480 [PAR 1:1 DAR 5:3], 226 kb/s, 25 fps, 2500 tbn, 50 tbc (default). How could I reencode it to a codec omxplayer can play?
Handbrake is one tool for transcoding.
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

Return to “General discussion”