popcornmix / omxplayer

omxplayer
GNU General Public License v2.0
1.02k stars 334 forks source link

omxplayer does not play mp4 video #703

Open hamdiyavuz opened 5 years ago

hamdiyavuz commented 5 years ago

Hello,

omxplayer on raspberry pi 3 b+ does not play video file which is playing on vlc player on windows. omxplayer command line and output string as follows:

omxplayer bluesb.mp4 Chapter : 0 Chapter 00 0.00 Chapter : 1 Chapter 01 613.00 Chapter : 2 Chapter 02 1007.00 Chapter : 3 Chapter 03 1439.00 Chapter : 4 Chapter 04 1925.00 Chapter : 5 Chapter 05 2365.00 Chapter : 6 Chapter 06 2955.00 Chapter : 7 Chapter 07 3286.00 Chapter : 8 Chapter 08 3609.00 Chapter : 9 Chapter 09 4032.00 Chapter : 10 Chapter 10 4532.00 Chapter : 11 Chapter 11 5051.00 Chapter : 12 Chapter 12 5429.00 Chapter : 13 Chapter 13 6064.00 Chapter : 14 Chapter 14 6913.00 Chapter : 15 Chapter 15 7392.00 Chapter : 16 Chapter 16 7906.00 Chapter : 17 Chapter 17 8333.00 Video codec omx-h264 width 1280 height 688 profile -99 fps 23.976025 Audio codec aac channels 2 samplerate 48000 bitspersample 16 Subtitle count: 0, state: off, index: 1, delay: 0

the mediainfo file of the video file : blues.txt

ps: omxplayer version is omxplayer - Commandline multimedia player for the Raspberry Pi Build date: Wed, 05 Jul 2017 16:40:39 +0100 Version : 5a25a57 [debian] Repository: git@github.com:XECDesign/omxplayer.git

Thanks for your help. Best hamdi

popcornmix commented 5 years ago

Mediainfo looks okay. Can you provide a sample file that shows the issue?

hamdiyavuz commented 5 years ago

Thanks for quick reply,

I have almost 2 gb video file and if open it windows movie maker to crop and save another file, the cropped file is playing without problem. so how can I create sample (cropped but has problem)

Regards hamdi

popcornmix commented 5 years ago

Is that transcoding the video? You don't want that. Perhaps try mp4box

hamdiyavuz commented 5 years ago

I will try, thank you

hamdiyavuz commented 5 years ago

I have splited the video using mp4box, omxplayer playing the output video file of mp4box without problem, the mediainfo file of the output of mp4box: bluesbsplit.txt

hamdiyavuz commented 5 years ago

I am sorry I realize that I have loaded wrong mediainfo file of faulty video, the right file as follows: bluesb.txt

richhaynes-zz commented 5 years ago

run omxplayer -I -g bluesb.mp4 and provide the terminal output and the omxplayer.log (will be in the current working directory).

My gut feeling is your getting OMX_ErrorInsufficientResources in the log file so then you need to bump up your GPU allocation in config.txt.

hamdiyavuz commented 5 years ago

Thank you for your help richhaynes, the log files are below, unfortunately I could not find the OMX_ErrorInsufficientResources error in log files. omxout.txt omxplayer.log

I will try bump up GPU allocation anyway.

hamdiyavuz commented 5 years ago

I have tried GPU with 128 and 256 MB, there is no difference, omxplayer does not play the file.

jehutting commented 5 years ago

Your OMXPlayer version with Build date: Wed, 05 Jul 2017 16:40:39 +0100 is very old.

What OS and version are you using? Can you post the output of the commands uname -a and cat /etc/os-release?

omxplayer.log doesn't show any video decode lines, something like

CDVDPlayerVideo::Decode dts:0 pts:133467 cur:133467, size:28

Without video packets receiving from FFMpeg, there is nothing to play...

hamdiyavuz commented 5 years ago

Thank you for your help jehutting, commands outputs are below: etcosrel.txt uname.txt

jehutting commented 5 years ago

Is there a reason why you don't update&upgrade your system?

Even your OS version is old. My just updated&upgraded system shows for uname -a Linux boromir 4.14.98-v7+ #1200 SMP Tue Feb 12 20:27:48 GMT 2019 armv7l GNU/Linux.

hamdiyavuz commented 5 years ago

Yes I have a reason don't update&upgrade, sometimes newer version create problems , we have developed some software on raspberry using python 3, some newest libraries create problems and cause rewrite the own code.

jehutting commented 5 years ago

OK, that is a reasonable argument :-)

Just looked in omxout.txt :

[mov,mp4,m4a,3gp,3g2,mj2 @ 0x1990080] Missing key frame while reordering index according to edit list
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x1990080] Could not find codec parameters for stream 0 (Video: h264 (avc1 / 0x31637661), none, 1280x688, 1001 kb/s): unspecified pixel format
Consider increasing the value for the 'analyzeduration' and 'probesize' options

Just try that out e.g. by adding --avdict 'analyzeduration:10000000' for 10 seconds.

hamdiyavuz commented 5 years ago

I have tried with your suggestion and stopped player by pressing "q" after 10-15 seconds, output of omxplayer as follows: omxout.txt

jehutting commented 5 years ago

You still have this unspecified pixel format error.

I googled around, but didn't got any wiser.

Apparently OMXPlayer is not aware of this FFmpeg error (as -apart from the output logging- FFmpeg doesn't signal it?). OMXPlayer just simply waits for video packets to start playing (that is the reason why you don't hear any sound either).

Can you try the video on a more up-to-date system? May be FFmpeg 4.1 can handle it. I can give it a try if you post your video.

hamdiyavuz commented 5 years ago

Thank you Jehutting for your help and time, I will try it on more up-to-date system as soon as prepare system, I can not provide video file because of copyright protection.

popcornmix commented 5 years ago

I think "unspecified pixel format" may be harmless and not the issue. The fact the problem goes away when remuxed with mp4box (which doesn't reencode) means it's more likely to be a container issue than a codec issue.

Another thing to try is remuxing with ffmpeg. e.g. ffmpeg -i video.mp4 -acodec copy -vcodec copy newvideo.mp4

But, best to test on updated system as it's possible the problem won't be present.

hamdiyavuz commented 5 years ago

Thanks popcornmix, I will try it on up-to-date system. We can close the problem if you want.