Git Product home page Git Product logo

Comments (25)

OtherCrashOverride avatar OtherCrashOverride commented on May 23, 2024

That error condition happens if you try to use c2play-x11 with the mail-fbdev package installed. The EGL information indicates that the fbdev mali libs are installed. c2play-x11 requires the mali-x11 package.

from c2play.

clinty avatar clinty commented on May 23, 2024

So, with mali-x11 installed, c2play-x11 plays video, c2play from master plays video, and c2play from alpha3 gives

Streams (count=2):
stream #0 - VIDEO/HEVC
w=3840 h=2160 fps=23.976030(771410000/32174217) SAR=(0/1)
stream #1 - AUDIO/AC3
eglGetError failed: 0x3003
terminate called after throwing an instance of 'Exception'
Aborted

I also can't get sound through HDMI though I can work around that with a remote pulse sink.

from c2play.

OtherCrashOverride avatar OtherCrashOverride commented on May 23, 2024

In the alpha3 branch, support for graphics content was added. Initially, this is used to display a progress bar. A future release will use it for subtitles. The graphics are rendered with OpenGL ES on Mali. This means that "c2play" requires mali-fbdev and "c2play-x11" requires mali-x11. Both perform the same functions and have the same features: c2play is intended for users that do not have a X11 environment installed.

Sound is sent through ALSA to HDMI. Only the alsa.conf in the default Ubuntu image has been tested. If you are not getting sound, either your alsa.conf is redirecting the "default" device or PulseAudio is. For best results, testing should be done with the official, unmodified, HardKernel Ubuntu image. Also ensure you do not have "dvi" selected in your boot.ini since DVI devices can not carry audio.

from c2play.

clinty avatar clinty commented on May 23, 2024

Thanks for the clarification.

I'm using HK Ubuntu, dvi's not in boot.ini, I haven't touched the alsa config, and the sound problem is not restricted to c2play (I swear that something was making system beep noises before but now nothing will make noise through HDMI).

from c2play.

clinty avatar clinty commented on May 23, 2024

For the record, it started making system beep noises again, and I was able to get c2play-x11 sound through HDMI by turning all the volume levels up to max and then back down to non-painful levels. I have no idea what this indicates.

Additionally, c2play-x11 will sometimes fail on a video that works at other times:

X11Window: width=3840, height=2160
EGL: major=1, minor=4
EGL: Vendor=ARM
EGL: Version=1.4 Linux-r6p1-01rel0
EGL: ClientAPIs=OpenGL_ES
EGL: Extensions=EGL_KHR_image EGL_KHR_image_base EGL_KHR_image_pixmap EGL_KHR_gl_texture_2D_image EGL_KHR_gl_texture_cubemap_image EGL_KHR_gl_renderbuffer_image EGL_KHR_reusable_sync EGL_KHR_fence_sync EGL_KHR_swap_buffers_with_damage EGL_EXT_swap_buffers_with_damage EGL_KHR_lock_surface EGL_KHR_lock_surface2 EGL_EXT_create_context_robustness EGL_ANDROID_blob_cache EGL_KHR_create_context EGL_KHR_partial_update EGL_KHR_create_context_no_error
EGL: ClientExtensions=EGL_EXT_client_extensions EGL_EXT_platform_base EGL_KHR_platform_x11

X11Window: xwin = 56623106
eglGetError failed: 0x3003
terminate called after throwing an instance of 'Exception'
Aborted

from c2play.

OtherCrashOverride avatar OtherCrashOverride commented on May 23, 2024

This indicates there is some other program active that is interfering with operation. C2play makes no beeping alerts, nor does it alter ALSA mixer settings. A program running in the background like an IM client/Skype/etc. could produce these issues.

from c2play.

vcka avatar vcka commented on May 23, 2024

Which linux distro are you using for compilation.
On debian Jessie i got
AudioCodec.cpp
../../src/Media/AudioCodec.cpp: In member function ‘void AudioCodecElement::ProcessBuffer(AVPacketBufferSPTR, AVFrameBufferSPTR)’:
../../src/Media/AudioCodec.cpp:203:60: error: ‘av_frame_get_best_effort_timestamp’ was not declared in this scope
av_frame_get_best_effort_timestamp(frame->GetAVFrame()) *
^
c2play.make:253: recipe for target 'obj/Debug/c2play/AudioCodec.o' failed

from c2play.

OtherCrashOverride avatar OtherCrashOverride commented on May 23, 2024

The official Ubuntu 16.04 is used for compilation. The error is likely due to differences in libav/ffmpeg versions between distributions.

from c2play.

vcka avatar vcka commented on May 23, 2024

Managed to compile on Jessie, but heres my output log:

added device: /dev/input/event1
added device: /dev/input/mouse0
added device: /dev/input/event0
added device: /dev/input/event5
added device: /dev/input/event4
added device: /dev/input/event3
added device: /dev/input/event2
added device: /dev/input/mouse1
added device: /dev/input/mice
Device: /dev/input/event1
bustype=3, vendor=1133, product=50484, version=273
name=Logitech USB Receiver
InputDevice entering running state.
Device: /dev/input/mouse0
EVIOCGBIT failed.
Device: /dev/input/event0
bustype=3, vendor=1133, product=50484, version=273
name=Logitech USB Receiver
InputDevice entering running state.
Device: /dev/input/event5
bustype=16, vendor=7054, product=3308, version=1
name=cec_input
InputDevice entering running state.
Device: /dev/input/event4
bustype=25, vendor=1, product=1, version=256
name=rn5t618_pmu
InputDevice entering running state.
Device: /dev/input/event3
bustype=16, vendor=1, product=1, version=256
name=gpio_keypad
InputDevice entering running state.
Device: /dev/input/event2
bustype=16, vendor=1, product=1, version=256
name=aml_keypad
InputDevice entering running state.
Device: /dev/input/mouse1
EVIOCGBIT failed.
Device: /dev/input/mice
EVIOCGBIT failed.
Using input device: Logitech USB Receiver
Using input device: Logitech USB Receiver
Using input device: cec_input
Using input device: rn5t618_pmu
Using input device: gpio_keypad
Using input device: aml_keypad
X11Window: width=1280, height=720
EGL: major=1, minor=4
EGL: Vendor=ARM
EGL: Version=1.4 Linux-r4p0-00rel0
EGL: ClientAPIs=OpenGL_ES
EGL: Extensions=EGL_KHR_image EGL_KHR_image_base EGL_KHR_image_pixmap EGL_KHR_gl_texture_2D_image EGL_KHR_gl_texture_cubemap_image EGL_KHR_gl_renderbuffer_image EGL_KHR_reusable_sync EGL_KHR_fence_sync EGL_EXT_swap_buffers_with_damage EGL_KHR_lock_surface EGL_KHR_lock_surface2 EGL_EXT_create_context_robustness EGL_ANDROID_blob_cache
EGL: ClientExtensions=(null)

X11Window: xwin = 31457282
Source Metadata:
Streams (count=3):
stream #0 - VIDEO/H264
w=1920 h=1080 fps=29.970030(30000/1001) SAR=(0/1)
stream #1 - AUDIO/MP2
stream #2 - AUDIO/MP2
Element (AudioCodec) Flush exited.
Element (AudioSink) Flush exited.
AmlVideoSinkElement: calling base.
Element (VideoSink) Flush exited.
AmlVideoSinkElement: Flush exited.
Element (Source) Flush exited.
Element (VideoSink) ChangeState oldState=0 newState=1.
Element (AudioCodec) ChangeState oldState=0 newState=1.
Element (AudioSink) ChangeState oldState=0 newState=1.
Element (Source) ChangeState oldState=0 newState=1.
AmlVideoSink: ExtraData size=44
AmlVideoSink - VIDEO/H264
AMSTREAM_IOC_SET failed.

from c2play.

OtherCrashOverride avatar OtherCrashOverride commented on May 23, 2024

AMSTREAM_IOC_SET failed.

The distribution likely does not set up permissions for the video devices like the Ubuntu image does. Try running the program as root with 'sudo'.

from c2play.

vcka avatar vcka commented on May 23, 2024

I think this is not the case. This is the kernel problem. I'm using s802 with 3.10.33 kernel and amports driver has no AMSTREAM_IOC_SET. Player example from amlogic buildroot decodes video perfectly, but sound is working only once after reboot. Second time i ran player i've got [34958.150602] [dsp]DSP statck start =0x266d0000,size=0x10000
[34958.155940] [dsp]DSP gp statck start =0x2c2bfc00,size=0x200
[34958.168446] [dsp]DSP heap start =0x2c800000,size=0x100000
[34958.168700] [dsp]DSP stream buffer to [0x2ada8000-0x2adaffe0]
[34958.174280] reset dsp : dec opt=fffb, subid=0
[34958.178810] [dsp]dsp reset now
and no sound. I thought your player would work ;]

from c2play.

OtherCrashOverride avatar OtherCrashOverride commented on May 23, 2024

Currently, only S905 (Odroid C2, Kernel 3.14) is supported. There are future plans to support Odroid C1 (S805/Kernel 3.10). Amlogic changed kernel IOCTL calls between the two versions.

from c2play.

vcka avatar vcka commented on May 23, 2024

Your old version with some small changes works well on 3.10.

from c2play.

OtherCrashOverride avatar OtherCrashOverride commented on May 23, 2024

The old version used aml_libs which has some backwards compatibility code. The new version does not use aml_libs due to behavioral changes that are required.

from c2play.

vcka avatar vcka commented on May 23, 2024

So when are you planning add support for c1?

from c2play.

OtherCrashOverride avatar OtherCrashOverride commented on May 23, 2024

There is no specific timeline for it yet.

from c2play.

vcka avatar vcka commented on May 23, 2024

I've reworked amlcode.cpp and amcodec.h. Now video is working then i blank fb0. But audio is out of sync.
Some videos plays normal then speed is increased. Some videos stops but audio is playing. I think something is wrong with timers. Its on 3.10.33. Here is playback log http://pastebin.com/dRncUcM8

from c2play.

OtherCrashOverride avatar OtherCrashOverride commented on May 23, 2024

Ensure you are testing with the beta1 branch. There were changes to PTS calculation in it:
https://github.com/OtherCrashOverride/c2play/tree/beta1

If the problem persists, you will need to supply a sample of the problematic video for analysis.

from c2play.

vcka avatar vcka commented on May 23, 2024

I'm using beta1. Main problem is in pts calculation. Witch function is responsible for AmlVideoSink: Adjust PTS - pts=31372.612211 - pts? Because in my case some videos pts is realy small form 0 and are escalating. Some videos has constant ~800.

from c2play.

OtherCrashOverride avatar OtherCrashOverride commented on May 23, 2024

Witch function is responsible for AmlVideoSink: Adjust PTS - pts=31372.612211 - pts?

https://github.com/OtherCrashOverride/c2play/blob/beta1/src/Media/AmlVideoSink.h#L46-L89

The hardware is informed of the new PTS here:
https://github.com/OtherCrashOverride/c2play/blob/beta1/src/Media/AmlCodec.cpp#L378-L418

from c2play.

vcka avatar vcka commented on May 23, 2024

No, vpts is ok, but clock = buffer->TimeStamp();
unsigned long pts = (unsigned long)(buffer->TimeStamp() * PTS_FREQ);
returns incorect value.
AmlVideoSink: Adjust PTS - pts=890.427244 vpts=32610.657689 drift=31720.230444 (950656.257076 frames)

from c2play.

OtherCrashOverride avatar OtherCrashOverride commented on May 23, 2024

"pts" is the information provided to the hardware. "vpts" is the information reported back from the hardware. If the two do not agree, then you will need to trace into the kernel driver to determine the cause. I have done this for S905 (Odroid C2) to verify correct operation. I will also do this for S805 (Odroid C0/C1) in the future.

A similar symptom was corrected for S905 in this patch:
096f7b5
This happens when the source is MPEG-TS and 64bit PTS values are used. Since the kernel driver only maintains 32bit PTS values, bit masking was used.

If the video does not play correctly on S905 (Odroid C2), then please provide a sample and I will investigate.

from c2play.

vcka avatar vcka commented on May 23, 2024

Hello,
After lots of diging aroud made to work on S802 with 3.10.33 kernel. Same version must work on S805.
If you are interested i can provide source modification. And windowing is not working its working on fb0. I think its of libmali driver.

from c2play.

OtherCrashOverride avatar OtherCrashOverride commented on May 23, 2024

I do not have any S802 hardware, so I can not support it. However, there may be other S802 users interested in the modifications and appreciative if you hosted a fork.

from c2play.

OtherCrashOverride avatar OtherCrashOverride commented on May 23, 2024

Closing this since S805 support was merged for release.

from c2play.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.