Command line video player (S805)

Moderators: mdrjr, odroid

Command line video player (S805)

Unread postby crashoverride » Mon Oct 31, 2016 3:39 am

The command line video player for C2 has been updated to include support for C0/C1. It can be found here:
https://github.com/OtherCrashOverride/c2play/tree/S805

After a period of testing, it will be merged with the beta1 branch so that there is a single code base supporting Odroid C0, C1, and C2.
crashoverride
 
Posts: 3865
Joined: Tue Dec 30, 2014 8:42 pm
languages_spoken: english
ODROIDs: C1

Re: Command line video player (S805)

Unread postby gseaman » Mon Oct 31, 2016 5:16 am

Yea! I will try it as soon as I get home!

Galen
gseaman
 
Posts: 87
Joined: Fri Jan 01, 2016 2:42 pm
Location: WA, USA
languages_spoken: english
ODROIDs: c1+

Re: Command line video player (S805)

Unread postby gseaman » Mon Oct 31, 2016 12:34 pm

Not able to build it, so far. I am using debian jessie. I got libass5_0.13.1-1_armhf.deb and libass-dev_0.13.1-1_armhf.deb installed from ubuntu, but still got lots of errors.

Code: Select all
odroid@odroid-jessie:~/Downloads/c2play-S805$ make c2play-x11 -j4
==== Building c2play-x11 (debug) ====
Creating obj/Debug/c2play-x11
main.cpp
AmlVideoSink.cpp
LockedQueue.cpp
Pin.cpp
AmlCodec.cpp
Buffer.cpp
AudioCodec.cpp
Exception.cpp
AlsaAudioSink.cpp
MediaSourceElement.cpp
Image.cpp
Element.cpp
Thread.cpp
OutPin.cpp
InPin.cpp
Mutex.cpp
MediaPlayer.cpp
Codec.cpp
SubtitleCodecElement.cpp
AmlWindow.cpp
QuadBatch.cpp
../../src/Media/SubtitleCodecElement.cpp: In member function ‘void SubtitleDecoderElement::ProcessBuffer(AVPacketBufferSPTR)’:
../../src/Media/SubtitleCodecElement.cpp:152:125: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 6 has type ‘int64_t {aka long long int}’ [-Wformat=]
     avSubtitle->format, avSubtitle->start_display_time, avSubtitle->end_display_time, avSubtitle->num_rects, avSubtitle->pts);
                                                                                                                             ^
../../src/UI/QuadBatch.cpp: In member function ‘void QuadBatch::Draw()’:
../../src/UI/QuadBatch.cpp:143:112: error: ‘glVertexAttribPointer’ was not declared in this scope
   glVertexAttribPointer(program->PositionAttribute(), 3, GL_FLOAT, GL_FALSE, sizeof(PositionColorTexture), data);
                                                                                                                ^
../../src/UI/QuadBatch.cpp:154:46: error: ‘glDrawArrays’ was not declared in this scope
   glDrawArrays(GL_TRIANGLES, 0, verts->size());
                                              ^
Compositor.cpp
../../src/UI/QuadBatch.cpp: In member function ‘void QuadBatch::DrawOrdered()’:
../../src/UI/QuadBatch.cpp:173:112: error: ‘glVertexAttribPointer’ was not declared in this scope
   glVertexAttribPointer(program->PositionAttribute(), 3, GL_FLOAT, GL_FALSE, sizeof(PositionColorTexture), data);
                                                                                                                ^
../../src/UI/QuadBatch.cpp:184:50: error: ‘glDrawArrays’ was not declared in this scope
   glDrawArrays(GL_TRIANGLES, 0, quad.Verts.size());
                                                  ^
c2play-x11.make:223: recipe for target 'obj/Debug/c2play-x11/QuadBatch.o' failed
make[1]: *** [obj/Debug/c2play-x11/QuadBatch.o] Error 1
make[1]: *** Waiting for unfinished jobs....
../../src/UI/Compositor.cpp: In member function ‘void Compositor::ClearDisplay()’:
../../src/UI/Compositor.cpp:24:31: error: ‘glClearColor’ was not declared in this scope
  glClearColor(0.0f, 0, 0, 0.0f);
                               ^
../../src/UI/Compositor.cpp:27:24: error: ‘glClear’ was not declared in this scope
   GL_STENCIL_BUFFER_BIT);
                        ^
../../src/UI/Compositor.cpp: In member function ‘void Compositor::RenderThread()’:
../../src/UI/Compositor.cpp:57:38: error: ‘glPixelStorei’ was not declared in this scope
  glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
                                      ^
../../src/UI/Compositor.cpp:60:23: error: ‘glEnable’ was not declared in this scope
  glEnable(GL_CULL_FACE);
                       ^
../../src/UI/Compositor.cpp:63:20: error: ‘glCullFace’ was not declared in this scope
  glCullFace(GL_BACK);
                    ^
../../src/UI/Compositor.cpp:66:19: error: ‘glFrontFace’ was not declared in this scope
  glFrontFace(GL_CW);
                   ^
../../src/UI/Compositor.cpp:72:50: error: ‘glBlendFunc’ was not declared in this scope
  glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
                                                  ^
../../src/UI/Compositor.cpp:75:29: error: ‘glBlendEquation’ was not declared in this scope
  glBlendEquation(GL_FUNC_ADD);
                             ^
../../src/UI/Compositor.cpp:78:25: error: ‘glDisable’ was not declared in this scope
  glDisable(GL_DEPTH_TEST);
                         ^
c2play-x11.make:226: recipe for target 'obj/Debug/c2play-x11/Compositor.o' failed
make[1]: *** [obj/Debug/c2play-x11/Compositor.o] Error 1
Makefile:20: recipe for target 'c2play-x11' failed
make: *** [c2play-x11] Error 2
odroid@odroid-jessie:~/Downloads/c2play-S805$
gseaman
 
Posts: 87
Joined: Fri Jan 01, 2016 2:42 pm
Location: WA, USA
languages_spoken: english
ODROIDs: c1+

Re: Command line video player (S805)

Unread postby crashoverride » Mon Oct 31, 2016 12:49 pm

Only the official Ubuntu 16.04 image is tested. The error indicates a problem with the <GLES2/gl2.h> header. This error does not happen with the Ubuntu image.
crashoverride
 
Posts: 3865
Joined: Tue Dec 30, 2014 8:42 pm
languages_spoken: english
ODROIDs: C1

Re: Command line video player (S805)

Unread postby gseaman » Mon Oct 31, 2016 1:11 pm

If I can figure it out, I will report back. I don't want to use the ubuntu image.
Galen
gseaman
 
Posts: 87
Joined: Fri Jan 01, 2016 2:42 pm
Location: WA, USA
languages_spoken: english
ODROIDs: c1+

Re: Command line video player (S805)

Unread postby crashoverride » Mon Oct 31, 2016 1:24 pm

For reference, the C1 GLES headers can be found here:
https://github.com/mdrjr/c1_mali_libs/tree/master/x11/mali_headers/GLES2
crashoverride
 
Posts: 3865
Joined: Tue Dec 30, 2014 8:42 pm
languages_spoken: english
ODROIDs: C1

Re: Command line video player (S805)

Unread postby gseaman » Tue Nov 01, 2016 9:58 am

Those files are in /usr/include/GLES2/. Do I need a command line instruction to help the build script?

Galen
gseaman
 
Posts: 87
Joined: Fri Jan 01, 2016 2:42 pm
Location: WA, USA
languages_spoken: english
ODROIDs: c1+

Re: Command line video player (S805)

Unread postby crashoverride » Tue Nov 01, 2016 10:11 am

gseaman wrote: Do I need a command line instruction to help the build script?

No, there is no "./configure" or anything similar.

What is the output of:
Code: Select all
grep -r "glVertexAttribPointer" /usr/include/


This is the result on Ubuntu 16.04:
Code: Select all
odroid@odroid:~$ grep -r "glVertexAttribPointer" /usr/include/
grep: /usr/include/ppmgr/ppmgr.h: Permission denied
grep: /usr/include/amports/aformat.h: Permission denied
grep: /usr/include/amports/vformat.h: Permission denied
grep: /usr/include/amports/amstream.h: Permission denied
/usr/include/GLES2/gl2.h:GL_APICALL void GL_APIENTRY glVertexAttribPointer (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void *pointer);
grep: /usr/include/amcodec/codec.h: Permission denied
grep: /usr/include/amcodec/codec_msg.h: Permission denied
grep: /usr/include/amcodec/codec_type.h: Permission denied
grep: /usr/include/amcodec/codec_error.h: Permission denied
grep: /usr/include/amcodec/audio_priv.h: Permission denied


(Oops! Someone needs to corrects permissions in the official image. Headers should be readable by everyone. :oops: )

[edit]
Let me know if anyone else is seeing that or if I just have image corruption. Doing kernel dev locks up the device a lot so its possible my image is hosed.
crashoverride
 
Posts: 3865
Joined: Tue Dec 30, 2014 8:42 pm
languages_spoken: english
ODROIDs: C1

Re: Command line video player (S805)

Unread postby gseaman » Tue Nov 01, 2016 10:58 am

Not sure why I have more entries.
Code: Select all
Jodroid@odroid-jessie:~/Downloads/c2play-S805$ grep -r "glVertexAttribPointer" /usr/include/
/usr/include/GLES3/gl31.h:GL_APICALL void GL_APIENTRY glVertexAttribPointer (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void *pointer);
/usr/include/GLES3/gl3.h:GL_APICALL void GL_APIENTRY glVertexAttribPointer (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void *pointer);
/usr/include/GLES3/gl32.h:GL_APICALL void GL_APIENTRY glVertexAttribPointer (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void *pointer);
/usr/include/GLES2/gl2.h:GL_APICALL void GL_APIENTRY glVertexAttribPointer (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void *pointer);
/usr/include/GL/glext.h:GLAPI void APIENTRY glVertexAttribPointer (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void *pointer);
/usr/include/GL/glext.h:GLAPI void APIENTRY glVertexAttribPointerARB (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void *pointer);
/usr/include/GL/glext.h:GLAPI void APIENTRY glVertexAttribPointerNV (GLuint index, GLint fsize, GLenum type, GLsizei stride, const void *pointer);
/usr/include/GL/glcorearb.h:GLAPI void APIENTRY glVertexAttribPointer (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void *pointer);
/usr/include/GL/gl_mangle.h:#define glVertexAttribPointerARB      MANGLE(VertexAttribPointerARB)
/usr/include/GL/gl_mangle.h:#define glVertexAttribPointer      MANGLE(VertexAttribPointer)
/usr/include/GL/gl_mangle.h:#define glVertexAttribPointerNV      MANGLE(VertexAttribPointerNV)
odroid@odroid-jessie:~/Downloads/c2play-S805$
gseaman
 
Posts: 87
Joined: Fri Jan 01, 2016 2:42 pm
Location: WA, USA
languages_spoken: english
ODROIDs: c1+

Re: Command line video player (S805)

Unread postby odroid » Tue Nov 01, 2016 11:01 am

Ubuntu and Debian might have different header file trees.
User avatar
odroid
Site Admin
 
Posts: 28538
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID

Re: Command line video player (S805)

Unread postby crashoverride » Tue Nov 01, 2016 11:36 am

I double checked the code to be sure it was correct (not Ubuntu specific):

This is the error:
Code: Select all
../../src/UI/QuadBatch.cpp: In member function ‘void QuadBatch::Draw()’:
../../src/UI/QuadBatch.cpp:143:112: error: ‘glVertexAttribPointer’ was not declared in this scope
   glVertexAttribPointer(program->PositionAttribute(), 3, GL_FLOAT, GL_FALSE, sizeof(PositionColorTexture), data);


In that translation unit:
https://github.com/OtherCrashOverride/c ... ch.cpp#L17
includes
https://github.com/OtherCrashOverride/c ... atch.h#L24
which includes:
https://github.com/OtherCrashOverride/c ... I/GL.h#L22
which references they system installed:
Code: Select all
#include <GLES2/gl2.h>


There is no error indicating the file was not found. However, it does not define any of the GLES calls as it should. You should raise the issue with your distribution maintainer.

[edit]
Althought the GLES/gl2.h file may be present, its contents may differ from the C1 version linked earlier. Other possibilities include more than one gl2.h file present elsewhere such as in /usr/local/include.
crashoverride
 
Posts: 3865
Joined: Tue Dec 30, 2014 8:42 pm
languages_spoken: english
ODROIDs: C1

Re: Command line video player (S805)

Unread postby gseaman » Tue Nov 01, 2016 12:02 pm

I do not have gl2.h in another location, but there is significant differences in the local file from the one that you pointed to. Here is the beginning of a diff. It appears that my local file is two years newer than the one linked.

Code: Select all
odroid@odroid-jessie:~/Downloads$ diff -uNr gl2.h gl2.h.orig
--- gl2.h   2016-11-01 02:54:44.291627908 +0000
+++ gl2.h.orig   2016-11-01 02:51:43.110806705 +0000
@@ -6,7 +6,7 @@
 #endif
 
 /*
-** Copyright (c) 2013 The Khronos Group Inc.
+** Copyright (c) 2013-2015 The Khronos Group Inc.
 **
 ** Permission is hereby granted, free of charge, to any person obtaining a
 ** copy of this software and/or associated documentation files (the
@@ -33,12 +33,16 @@
 ** used to make the header, and the header can be found at
 **   http://www.opengl.org/registry/
 **
-** Khronos $Revision: 24614 $ on $Date: 2013-12-30 04:44:46 -0800 (Mon, 30 Dec 2013) $
+** Khronos $Revision: 31566 $ on $Date: 2015-06-23 08:48:48 -0700 (Tue, 23 Jun 2015) $
 */
 
 #include <GLES2/gl2platform.h>
 
-/* Generated on date 20131230 */
+#ifndef GL_APIENTRYP
+#define GL_APIENTRYP GL_APIENTRY*
+#endif
+
+/* Generated on date 20150623 */
...

There are many more differences.
gseaman
 
Posts: 87
Joined: Fri Jan 01, 2016 2:42 pm
Location: WA, USA
languages_spoken: english
ODROIDs: c1+

Re: Command line video player (S805)

Unread postby gseaman » Mon Nov 07, 2016 12:57 pm

Maybe I don't have everything installed to have a standard build system. I've only built programs in PCLinuxOS, with all of the scripts provided that simplify everything. It appears that even if the script knows where the library is, maybe make does not?

Galen
gseaman
 
Posts: 87
Joined: Fri Jan 01, 2016 2:42 pm
Location: WA, USA
languages_spoken: english
ODROIDs: c1+

Re: Command line video player (S805)

Unread postby crashoverride » Mon Nov 07, 2016 2:35 pm

What image are you using?
crashoverride
 
Posts: 3865
Joined: Tue Dec 30, 2014 8:42 pm
languages_spoken: english
ODROIDs: C1

Re: Command line video player (S805)

Unread postby gseaman » Mon Nov 07, 2016 3:31 pm

meveric's debian jessie.
Debian-Jessie-1.0-20160131-C1.img.xz
gseaman
 
Posts: 87
Joined: Fri Jan 01, 2016 2:42 pm
Location: WA, USA
languages_spoken: english
ODROIDs: c1+

Re: Command line video player (S805)

Unread postby crashoverride » Tue Nov 08, 2016 12:52 am

Since the image is well supported by the author here on the forum, I will download it and investigate the issue you reported. It may take a couple of days before I can set it up, though.
crashoverride
 
Posts: 3865
Joined: Tue Dec 30, 2014 8:42 pm
languages_spoken: english
ODROIDs: C1

Re: Command line video player (S805)

Unread postby crashoverride » Tue Nov 08, 2016 4:36 am

I have isolated the issue described. It is due to the fact that the GLES2/gl2.h headers are different from the Ubuntu version. The version shipped with the jessie distribution requires "GL_GLEXT_PROTOTYPES" to be defined before it will work.

[edit]
"it will work." means "it will compile."
Last edited by crashoverride on Tue Nov 08, 2016 5:29 am, edited 1 time in total.
crashoverride
 
Posts: 3865
Joined: Tue Dec 30, 2014 8:42 pm
languages_spoken: english
ODROIDs: C1

Re: Command line video player (S805)

Unread postby crashoverride » Tue Nov 08, 2016 5:28 am

It does not appear that the jessie distribution will work with c2play because the "/dev/amstream_vbuf" device is missing.
Code: Select all
root@odroid-jessie:~# ls /dev/am*
/dev/amaudio_ctl  /dev/amaudio_utils  /dev/amvenc_avc
/dev/amaudio_in   /dev/amhdmitx0      /dev/amvideo
/dev/amaudio_out  /dev/amsubtitle     /dev/amvideocap0

root@odroid-jessie:~# uname -a
Linux odroid-jessie 3.10.104 #1 SMP PREEMPT Wed Oct 26 09:47:44 CEST 2016 armv7l GNU/Linux
crashoverride
 
Posts: 3865
Joined: Tue Dec 30, 2014 8:42 pm
languages_spoken: english
ODROIDs: C1

Re: Command line video player (S805)

Unread postby gseaman » Tue Nov 08, 2016 10:36 am

Can I get this from the Ubuntu version, or somewhere else? I hope to not give up. Thanks for looking into this.

Galen
gseaman
 
Posts: 87
Joined: Fri Jan 01, 2016 2:42 pm
Location: WA, USA
languages_spoken: english
ODROIDs: c1+

Re: Command line video player (S805)

Unread postby crashoverride » Tue Nov 08, 2016 10:47 am

/dev/amstream_vbuf needs to be enabled in the device tree and kernel. Copying both from the Ubuntu image may work, but it could also cause your image to be un-bootable. Ensure you have a backup of any required information before attempting. You should report this issue to your distribution maintainer.
crashoverride
 
Posts: 3865
Joined: Tue Dec 30, 2014 8:42 pm
languages_spoken: english
ODROIDs: C1

Re: Command line video player (S805)

Unread postby odroid » Tue Nov 08, 2016 11:29 am

@gseaman
Did you update the kernel with "dist-upgrade"?
As far as I know, meveric always makes his kernel sync to our official Ubuntu kernel.
User avatar
odroid
Site Admin
 
Posts: 28538
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID

Re: Command line video player (S805)

Unread postby gseaman » Tue Nov 08, 2016 11:45 am

I've done a dist-upgrade a few weeks ago. I will try it again tomorrow. Right now, it is attached to my tv for the evening. :)
gseaman
 
Posts: 87
Joined: Fri Jan 01, 2016 2:42 pm
Location: WA, USA
languages_spoken: english
ODROIDs: c1+

Re: Command line video player (S805)

Unread postby gseaman » Tue Nov 08, 2016 12:28 pm

Code: Select all
root@odroid-jessie:/home/odroid/Downloads/c2play-S805# uname -r
3.10.104

Nothing to update
gseaman
 
Posts: 87
Joined: Fri Jan 01, 2016 2:42 pm
Location: WA, USA
languages_spoken: english
ODROIDs: c1+

Re: Command line video player (S805)

Unread postby odroid » Tue Nov 08, 2016 12:33 pm

In that case, request the kernel update to meveric.
User avatar
odroid
Site Admin
 
Posts: 28538
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID

Re: Command line video player (S805)

Unread postby gseaman » Tue Nov 08, 2016 10:34 pm

Thanks. I will.
gseaman
 
Posts: 87
Joined: Fri Jan 01, 2016 2:42 pm
Location: WA, USA
languages_spoken: english
ODROIDs: c1+

Re: Command line video player (S805)

Unread postby indigent » Wed Nov 09, 2016 4:04 am

EDIT:
Nevermind, in stupid fashion, i forgot to get the S805 branch.
Code: Select all
git clone https://github.com/OtherCrashOverride/c2play.git --branch S805


I can't seem to compile this. What am I doing wrong?
Code: Select all
Makefile:70: AlsaAudioSink.d: No such file or directory
Makefile:70: AmlVideoSink.d: No such file or directory
Makefile:70: AudioCodec.d: No such file or directory
Makefile:70: Codec.d: No such file or directory
Makefile:70: Element.d: No such file or directory
Makefile:70: Exception.d: No such file or directory
Makefile:70: InPin.d: No such file or directory
Makefile:70: InputDevice.d: No such file or directory
Makefile:70: LockedQueue.d: No such file or directory
Makefile:70: main.d: No such file or directory
Makefile:70: MediaSourceElement.d: No such file or directory
Makefile:70: Mutex.d: No such file or directory
Makefile:70: OutPin.d: No such file or directory
Makefile:70: PacketBuffer.d: No such file or directory
Makefile:70: Pin.d: No such file or directory
Makefile:70: Thread.d: No such file or directory
g++ -g -std=c++11  -c AlsaAudioSink.cpp  -o AlsaAudioSink.o
g++ -g -std=c++11  -c AmlVideoSink.cpp  -o AmlVideoSink.o
In file included from AmlVideoSink.cpp:17:0:
AmlVideoSink.h: In member function ‘virtual void AmlVideoSinkElement::DoWork()’:
AmlVideoSink.h:938:68: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 2 has type ‘std::vector<unsigned char>::size_type {aka unsigned int}’ [-Wformat=]
       printf("AmlVideoSink: ExtraData size=%ld\n", extraData.size());
                                                                    ^
g++ -g -std=c++11  -c AudioCodec.cpp  -o AudioCodec.o
g++ -g -std=c++11  -c Codec.cpp  -o Codec.o
g++ -g -std=c++11  -c Element.cpp  -o Element.o
g++ -g -std=c++11  -c Exception.cpp  -o Exception.o
g++ -g -std=c++11  -c InPin.cpp  -o InPin.o
g++ -g -std=c++11  -c InputDevice.cpp  -o InputDevice.o
g++ -g -std=c++11  -c LockedQueue.cpp  -o LockedQueue.o
g++ -g -std=c++11  -c main.cpp  -o main.o
In file included from main.cpp:41:0:
AmlVideoSink.h: In member function ‘virtual void AmlVideoSinkElement::DoWork()’:
AmlVideoSink.h:938:68: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 2 has type ‘std::vector<unsigned char>::size_type {aka unsigned int}’ [-Wformat=]
       printf("AmlVideoSink: ExtraData size=%ld\n", extraData.size());
                                                                    ^
g++ -g -std=c++11  -c MediaSourceElement.cpp  -o MediaSourceElement.o
g++ -g -std=c++11  -c Mutex.cpp  -o Mutex.o
g++ -g -std=c++11  -c OutPin.cpp  -o OutPin.o
g++ -g -std=c++11  -c PacketBuffer.cpp  -o PacketBuffer.o
g++ -g -std=c++11  -c Pin.cpp  -o Pin.o
g++ -g -std=c++11  -c Thread.cpp  -o Thread.o
g++ -g -std=c++11  -o c2play AlsaAudioSink.o AmlVideoSink.o AudioCodec.o Codec.o Element.o Exception.o InPin.o InputDevice.o LockedQueue.o main.o MediaSourceElement.o Mutex.o OutPin.o PacketBuffer.o Pin.o Thread.o -lrt -L/usr/lib/aml_libs -lavformat -lavcodec -lavutil -lamcodec -lamadec -lamavutils -lpthread -lasound
main.o: In function `AVFrameBuffer::CreatePayload()':
/home/odroid/c2play/PacketBuffer.h:497: undefined reference to `av_frame_alloc'
main.o: In function `AVFrameBuffer::~AVFrameBuffer()':
/home/odroid/c2play/PacketBuffer.h:522: undefined reference to `av_frame_free'
main.o: In function `AudioCodecElement::ProcessBuffer(std::shared_ptr<AVPacketBuffer>, std::shared_ptr<AVFrameBuffer>)':
/home/odroid/c2play/AudioCodec.h:214: undefined reference to `av_frame_get_best_effort_timestamp'
collect2: error: ld returned 1 exit status
make: *** [c2play] Error 1
indigent
 
Posts: 10
Joined: Thu Jan 15, 2015 1:11 am
languages_spoken: english

Re: Command line video player (S805)

Unread postby indigent » Wed Nov 09, 2016 4:50 am

New Problem:
Code: Select all
==== Building c2play (debug) ====
SubtitleCodecElement.cpp
../../src/Media/SubtitleCodecElement.cpp: In member function ‘void SubtitleDecoderElement::ProcessBuffer(AVPacketBufferSPTR)’:
../../src/Media/SubtitleCodecElement.cpp:152:125: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 6 has type ‘int64_t {aka long long int}’ [-Wformat=]
     avSubtitle->format, avSubtitle->start_display_time, avSubtitle->end_display_time, avSubtitle->num_rects, avSubtitle->pts);
                                                                                                                             ^
../../src/Media/SubtitleCodecElement.cpp:422:101: error: ‘ASS_Image’ has no member named ‘type’
       img->w, img->h, img->stride, img->bitmap, img->color, img->dst_x, img->dst_y, img->next, img->type);
                                                                                                     ^
../../src/Media/SubtitleCodecElement.cpp: In constructor ‘SubtitleDecoderElement::SubtitleDecoderElement()’:
../../src/Media/SubtitleCodecElement.cpp:530:3: error: ‘ASS_FONTPROVIDER_AUTODETECT’ was not declared in this scope
   ASS_FONTPROVIDER_AUTODETECT, NULL, 1);
   ^
make[1]: *** [obj/Debug/c2play/SubtitleCodecElement.o] Error 1
make: *** [c2play] Error 2
indigent
 
Posts: 10
Joined: Thu Jan 15, 2015 1:11 am
languages_spoken: english

Re: Command line video player (S805)

Unread postby crashoverride » Wed Nov 09, 2016 5:26 am

That issue does not occur on the official Ubuntu image. It happens on debian jessie because the libass (subtitles) is extremely outdated. You will need to install a newer version or compile it from source.
crashoverride
 
Posts: 3865
Joined: Tue Dec 30, 2014 8:42 pm
languages_spoken: english
ODROIDs: C1

Re: Command line video player (S805)

Unread postby gseaman » Fri Nov 11, 2016 12:01 pm

meveric updated the kernel to include amstream_vbuf, but I still get the same error.
Code: Select all
odroid@odroid-jessie:~$ ls /dev/am*
/dev/amaudio_ctl    /dev/amstream_hevc      /dev/amstream_userdata
/dev/amaudio_in     /dev/amstream_mpps      /dev/amstream_vbuf
/dev/amaudio_out    /dev/amstream_mpts      /dev/amsubtitle
/dev/amaudio_utils  /dev/amstream_rm        /dev/amvenc_avc
/dev/amhdmitx0      /dev/amstream_sub       /dev/amvideo
/dev/amstream_abuf  /dev/amstream_sub_read  /dev/amvideocap0

Code: Select all
odroid@odroid-jessie:~/Downloads/c2play-S805$ make clean
Cleaning c2play
Cleaning c2play-x11
odroid@odroid-jessie:~/Downloads/c2play-S805$ premake4 gmake
Building configurations...
Running action 'gmake'...
Generating Makefile...
Generating build/gmake/c2play.make...
Generating build/gmake/c2play-x11.make...
Done.
odroid@odroid-jessie:~/Downloads/c2play-S805$ make c2play-x11 -j4
==== Building c2play-x11 (debug) ====
Creating obj/Debug/c2play-x11
main.cpp
AmlVideoSink.cpp
LockedQueue.cpp
Pin.cpp
AmlCodec.cpp
Buffer.cpp
AudioCodec.cpp
Exception.cpp
AlsaAudioSink.cpp
MediaSourceElement.cpp
Image.cpp
Element.cpp
Thread.cpp
OutPin.cpp
InPin.cpp
Mutex.cpp
MediaPlayer.cpp
Codec.cpp
SubtitleCodecElement.cpp
AmlWindow.cpp
QuadBatch.cpp
../../src/Media/SubtitleCodecElement.cpp: In member function ‘void SubtitleDecoderElement::ProcessBuffer(AVPacketBufferSPTR)’:
../../src/Media/SubtitleCodecElement.cpp:152:125: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 6 has type ‘int64_t {aka long long int}’ [-Wformat=]
     avSubtitle->format, avSubtitle->start_display_time, avSubtitle->end_display_time, avSubtitle->num_rects, avSubtitle->pts);
                                                                                                                             ^
../../src/UI/QuadBatch.cpp: In member function ‘void QuadBatch::Draw()’:
../../src/UI/QuadBatch.cpp:143:112: error: ‘glVertexAttribPointer’ was not declared in this scope
   glVertexAttribPointer(program->PositionAttribute(), 3, GL_FLOAT, GL_FALSE, sizeof(PositionColorTexture), data);
                                                                                                                ^
../../src/UI/QuadBatch.cpp:154:46: error: ‘glDrawArrays’ was not declared in this scope
   glDrawArrays(GL_TRIANGLES, 0, verts->size());
                                              ^
../../src/UI/QuadBatch.cpp: In member function ‘void QuadBatch::DrawOrdered()’:
../../src/UI/QuadBatch.cpp:173:112: error: ‘glVertexAttribPointer’ was not declared in this scope
   glVertexAttribPointer(program->PositionAttribute(), 3, GL_FLOAT, GL_FALSE, sizeof(PositionColorTexture), data);
                                                                                                                ^
../../src/UI/QuadBatch.cpp:184:50: error: ‘glDrawArrays’ was not declared in this scope
   glDrawArrays(GL_TRIANGLES, 0, quad.Verts.size());
                                                  ^
c2play-x11.make:223: recipe for target 'obj/Debug/c2play-x11/QuadBatch.o' failed
make[1]: *** [obj/Debug/c2play-x11/QuadBatch.o] Error 1
make[1]: *** Waiting for unfinished jobs....
Makefile:20: recipe for target 'c2play-x11' failed
make: *** [c2play-x11] Error 2
odroid@odroid-jessie:~/Downloads/c2play-S805$

Also, I have the updated libass from Ubuntu.

Galen
gseaman
 
Posts: 87
Joined: Fri Jan 01, 2016 2:42 pm
Location: WA, USA
languages_spoken: english
ODROIDs: c1+

Re: Command line video player (S805)

Unread postby crashoverride » Fri Nov 11, 2016 12:55 pm

This is a warning only, it does not prevent the code from compiling or working:
Code: Select all
../../src/Media/SubtitleCodecElement.cpp: In member function ‘void SubtitleDecoderElement::ProcessBuffer(AVPacketBufferSPTR)’:
../../src/Media/SubtitleCodecElement.cpp:152:125: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 6 has type ‘int64_t {aka long long int}’ [-Wformat=]
     avSubtitle->format, avSubtitle->start_display_time, avSubtitle->end_display_time, avSubtitle->num_rects, avSubtitle->pts);


As mentioned earlier, this is due to gl2.h headers being different:
Code: Select all
../../src/UI/QuadBatch.cpp: In member function ‘void QuadBatch::Draw()’:
../../src/UI/QuadBatch.cpp:143:112: error: ‘glVertexAttribPointer’ was not declared in this scope
   glVertexAttribPointer(program->PositionAttribute(), 3, GL_FLOAT, GL_FALSE, sizeof(PositionColorTexture), data);
                                                                                                                ^
../../src/UI/QuadBatch.cpp:154:46: error: ‘glDrawArrays’ was not declared in this scope
   glDrawArrays(GL_TRIANGLES, 0, verts->size());
                                              ^
../../src/UI/QuadBatch.cpp: In member function ‘void QuadBatch::DrawOrdered()’:
../../src/UI/QuadBatch.cpp:173:112: error: ‘glVertexAttribPointer’ was not declared in this scope
   glVertexAttribPointer(program->PositionAttribute(), 3, GL_FLOAT, GL_FALSE, sizeof(PositionColorTexture), data);
                                                                                                                ^
../../src/UI/QuadBatch.cpp:184:50: error: ‘glDrawArrays’ was not declared in this scope
   glDrawArrays(GL_TRIANGLES, 0, quad.Verts.size());
 


You can either install the Ubuntu gl2.h header linked earlier or modify the source code:
https://github.com/OtherCrashOverride/c ... I/GL.h#L22
Code: Select all
#define GL_GLEXT_PROTOTYPES 1
#include <GLES2/gl2.h>


I updated my installation; however, I still do not have the required device entry. Therefore, I can not provide any additional support for this distribution beyond that which has already been provided since the program will not run for me (kodi does not work for me either):
Code: Select all
root@odroid-jessie:~# ls /dev/am*
/dev/amaudio_ctl  /dev/amaudio_utils  /dev/amvenc_avc
/dev/amaudio_in   /dev/amhdmitx0      /dev/amvideo
/dev/amaudio_out  /dev/amsubtitle     /dev/amvideocap0
root@odroid-jessie:~# uname -a
Linux odroid-jessie 3.10.104 #1 SMP PREEMPT Thu Nov 10 07:56:43 CET 2016 armv7l GNU/Linux


[edit]
I suspect the issue I encounter with the missing devices may be due to a compatibility issue with the resize script and the SD card brand I use rather than the distro.
crashoverride
 
Posts: 3865
Joined: Tue Dec 30, 2014 8:42 pm
languages_spoken: english
ODROIDs: C1

Re: Command line video player (S805)

Unread postby gseaman » Fri Nov 11, 2016 2:20 pm

I add the "#define GL_GLEXT_PROTOTYPES 1" and was able to complete the build. However, when I try to play a video it fails:
Code: Select all
odroid@odroid-jessie:~/Downloads/c2play-S805$ ./c2play-x11 /media/odroid/PCLOS/Video/A*/*.mp4
added device: /dev/input/event4
added device: /dev/input/event3
added device: /dev/input/event2
added device: /dev/input/event1
added device: /dev/input/mouse0
added device: /dev/input/event0
added device: /dev/input/mice
Device: /dev/input/event4
device open failed. (/dev/input/event4)
Device: /dev/input/event3
device open failed. (/dev/input/event3)
Device: /dev/input/event2
device open failed. (/dev/input/event2)
Device: /dev/input/event1
device open failed. (/dev/input/event1)
Device: /dev/input/mouse0
device open failed. (/dev/input/mouse0)
Device: /dev/input/event0
device open failed. (/dev/input/event0)
Device: /dev/input/mice
device open failed. (/dev/input/mice)
X11Window: width=1600, height=900
EGL: major=1, minor=4
EGL: Vendor=ARM
EGL: Version=1.4 Linux-r6p2-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 = 52428802
open /dev/fb0 failed.
terminate called after throwing an instance of 'Exception'
Aborted
odroid@odroid-jessie:~/Downloads/c2play-S805$


Galen
gseaman
 
Posts: 87
Joined: Fri Jan 01, 2016 2:42 pm
Location: WA, USA
languages_spoken: english
ODROIDs: c1+

Re: Command line video player (S805)

Unread postby crashoverride » Fri Nov 11, 2016 3:13 pm

You likely do not have permission to open /dev/fb0. You can change the permission on the device or run c2play-x11 as root.

Also, I re-imaged my jessie installation and removed the resize scripts. At first boot, the /dev/am* devices are still missing. This means there is still no way for me to test the distro.
crashoverride
 
Posts: 3865
Joined: Tue Dec 30, 2014 8:42 pm
languages_spoken: english
ODROIDs: C1

Re: Command line video player (S805)

Unread postby gseaman » Sat Nov 12, 2016 1:23 am

Yeah! I have it working. I ran as root, to test. Then, I did 'chmod a+rw /dev/fb0', and it works. Now, I just need a way to pause, resume, adjust volume and stop it. ;)

Galen
gseaman
 
Posts: 87
Joined: Fri Jan 01, 2016 2:42 pm
Location: WA, USA
languages_spoken: english
ODROIDs: c1+

Re: Command line video player (S805)

Unread postby gseaman » Sat Nov 12, 2016 1:35 am

It works for the first three *.mp4 and *.mkv files I tested, but it fails on one.
Code: Select all
added device: /dev/input/event4
added device: /dev/input/event3
added device: /dev/input/event2
added device: /dev/input/event1
added device: /dev/input/mouse0
added device: /dev/input/event0
added device: /dev/input/mice
Device: /dev/input/event4
device open failed. (/dev/input/event4)
Device: /dev/input/event3
device open failed. (/dev/input/event3)
Device: /dev/input/event2
device open failed. (/dev/input/event2)
Device: /dev/input/event1
device open failed. (/dev/input/event1)
Device: /dev/input/mouse0
device open failed. (/dev/input/mouse0)
Device: /dev/input/event0
device open failed. (/dev/input/event0)
Device: /dev/input/mice
device open failed. (/dev/input/mice)
X11Window: width=1600, height=900
EGL: major=1, minor=4
EGL: Vendor=ARM
EGL: Version=1.4 Linux-r6p2-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 = 48234498
Source Metadata:
   key=major_brand, value=mp42
   key=minor_version, value=0
   key=compatible_brands, value=isommp42
   key=creation_time, value=2016-11-07 02:34:03
Duration: 2575.765000
Streams (count=2):
stream #0 - VIDEO/H264
   w=1280 h=720 fps=24.870330(800750/32197) SAR=(0/1)
stream #1 - AUDIO/AAC
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.
AmlVideoSink: ExtraData size=44
Element (AudioCodec) ChangeState oldState=0 newState=1.
AmlVideoSink - VIDEO/H264
Element (AudioSink) ChangeState oldState=0 newState=1.
Element (Source) ChangeState oldState=0 newState=1.
   w=1280 h=720 fps=24.870330 am_sysinfo.rate=3861
AmlVideoSinkElement: got marker buffer Marker=2
Header (pkt.size=da):
00 00 00 d6 65 88 84 7f ea 40 35 79 c0 01 85 5f
isAnnexB=0
AudioCodecElement: outInfo->SampleRate=44100, outInfo->Channels=1
AlsaAudioSinkElement: isFirstData changed.
SetupAlsa: frameSize=1024
terminate called after throwing an instance of 'NotSupportedException'
Aborted
gseaman
 
Posts: 87
Joined: Fri Jan 01, 2016 2:42 pm
Location: WA, USA
languages_spoken: english
ODROIDs: c1+

Re: Command line video player (S805)

Unread postby crashoverride » Sat Nov 12, 2016 5:33 am

gseaman wrote:Now, I just need a way to pause, resume, adjust volume and stop it.

Keyboard, CEC, and the official Odroid remote are tested on Ubuntu. Volume control is currently not supported. The following keys/buttons are supported:
https://github.com/OtherCrashOverride/c ... #L391-L476

gseaman wrote:It works for the first three *.mp4 and *.mkv files I tested, but it fails on one.

The output log indicates that the issue is that the audio stream is mono channel. This issue is discussed briefly here:
https://github.com/OtherCrashOverride/c2play/issues/11
You will need to provide a sample of the media file for support to be added and tested.
crashoverride
 
Posts: 3865
Joined: Tue Dec 30, 2014 8:42 pm
languages_spoken: english
ODROIDs: C1

Re: Command line video player (S805)

Unread postby gseaman » Sun Nov 13, 2016 12:21 am

The keyboard shortcuts do not work for me, but I can alt-tab to bring up the console window that started the app. I then have access to the volume on the task bar and cat ctrl-c to stop the video. Not elegant, but it works.
The video is about 300Mb, so I will get a 5Mb excerpt. How do you want me to get it to you?
I've also found that when using the --time option, sometimes you can freeze the video with lots of these:
Code: Select all
[NULL @ 0xdc9b0] missing picture in access unit with size 319
Element (AudioSink) Flush exited.
[aac @ 0xaf9010a0] ChannelElement 0.0 missing
[aac @ 0xaf9010a0] ChannelElement 0.0 missing
[NULL @ 0xdc9b0] missing picture in access unit with size 311
[aac @ 0xaf9010a0] ChannelElement 0.0 missing
[aac @ 0xaf9010a0] ChannelElement 0.0 missing
[NULL @ 0xdc9b0] missing picture in access unit with size 277
[aac @ 0xaf9010a0] ChannelElement 0.0 missing
[aac @ 0xaf9010a0] ChannelElement 0.0 missing
[NULL @ 0xdc9b0] missing picture in access unit with size 3372
[aac @ 0xaf9010a0] ChannelElement 0.0 missing
[NULL @ 0xdc9b0] missing picture in access unit with size 251
Element (AudioSink) InternalWorkThread - Terminating
[aac @ 0xaf9010a0] ChannelElement 0.0 missing
[aac @ 0xaf9010a0] ChannelElement 0.0 missing
[NULL @ 0xdc9b0] missing picture in access unit with size 310
[aac @ 0xaf9010a0] ChannelElement 0.0 missing
[aac @ 0xaf9010a0] ChannelElement 0.0 missing

I can get around this by starting a few seconds earlier in the stream.
Galen
gseaman
 
Posts: 87
Joined: Fri Jan 01, 2016 2:42 pm
Location: WA, USA
languages_spoken: english
ODROIDs: c1+

Re: Command line video player (S805)

Unread postby crashoverride » Sun Nov 13, 2016 5:16 am

gseaman wrote:The keyboard shortcuts do not work for me,

According to the log, the program does not have the required permissions to access the input devices:
Code: Select all
added device: /dev/input/event4
added device: /dev/input/event3
added device: /dev/input/event2
added device: /dev/input/event1
added device: /dev/input/mouse0
added device: /dev/input/event0
added device: /dev/input/mice
Device: /dev/input/event4
device open failed. (/dev/input/event4)
Device: /dev/input/event3
device open failed. (/dev/input/event3)
Device: /dev/input/event2
device open failed. (/dev/input/event2)
Device: /dev/input/event1
device open failed. (/dev/input/event1)
Device: /dev/input/mouse0
device open failed. (/dev/input/mouse0)
Device: /dev/input/event0
device open failed. (/dev/input/event0)
Device: /dev/input/mice
device open failed. (/dev/input/mice)


gseaman wrote:How do you want me to get it to you?

There are some free puplic hosting sites that others have used. They upload the video and then post a link in forum.

gseaman wrote:I've also found that when using the --time option, sometimes you can freeze the video with lots of these:

This is something I will likely change. Unless the --time is exactly a keyframe, playback will be undefined until a key frame arrives. I am considering forcing --time to seek to the nearest keyframe instead of the exact time.
crashoverride
 
Posts: 3865
Joined: Tue Dec 30, 2014 8:42 pm
languages_spoken: english
ODROIDs: C1

Re: Command line video player (S805)

Unread postby gseaman » Mon Nov 14, 2016 1:06 am

I sent you a pm with a link to a 7mb clip that won't play with c2play-x11.
gseaman
 
Posts: 87
Joined: Fri Jan 01, 2016 2:42 pm
Location: WA, USA
languages_spoken: english
ODROIDs: c1+

Re: Command line video player (S805)

Unread postby crashoverride » Mon Nov 14, 2016 7:09 am

The issue should be resolved now with the latest commit. It was tested with sample stream provided.
https://github.com/OtherCrashOverride/c ... 22ed269c06
crashoverride
 
Posts: 3865
Joined: Tue Dec 30, 2014 8:42 pm
languages_spoken: english
ODROIDs: C1

Re: Command line video player (S805)

Unread postby gseaman » Mon Nov 14, 2016 7:17 am

Thanks. I'll get the update and continue to test different videos and see if there are more that won't play.

Galen
gseaman
 
Posts: 87
Joined: Fri Jan 01, 2016 2:42 pm
Location: WA, USA
languages_spoken: english
ODROIDs: c1+

Re: Command line video player (S805)

Unread postby gseaman » Mon Nov 14, 2016 8:52 am

Works! Thanks
gseaman
 
Posts: 87
Joined: Fri Jan 01, 2016 2:42 pm
Location: WA, USA
languages_spoken: english
ODROIDs: c1+

Re: Command line video player (S805)

Unread postby gseaman » Sun Nov 27, 2016 4:25 am

I still have some videos that have glitches. I've always assumed that these were errors in the encoding, not the decoding. But now I am wondering, maybe Kodi and vlc also have less than optimal decoding even on x86. I'm not sensitive to these frame drops/glitches, but when I watch something with my wife, it bothers her so much that she cannot watch. I'll cut a short clip of an example, if you are still interested in optimizing. Thanks.
gseaman
 
Posts: 87
Joined: Fri Jan 01, 2016 2:42 pm
Location: WA, USA
languages_spoken: english
ODROIDs: c1+

Re: Command line video player (S805)

Unread postby crashoverride » Sun Nov 27, 2016 5:42 pm

VLC is pretty much the "gold standard" when it comes to Linux media players. If VLC can not play the media properly (on x86), likely nothing else can because everything uses the same software components such as ffmpeg/libav. This also means that if VLC can not play the media properly (and the media is pristine), filing a bug against VLC propogates the fix downstream to everyone else.
crashoverride
 
Posts: 3865
Joined: Tue Dec 30, 2014 8:42 pm
languages_spoken: english
ODROIDs: C1

Re: Command line video player (S805)

Unread postby gseaman » Sun Nov 27, 2016 5:56 pm

Thanks for the reply. Maybe there are kernel or media scheduling delays that can't be overcome outside of the kernel?
gseaman
 
Posts: 87
Joined: Fri Jan 01, 2016 2:42 pm
Location: WA, USA
languages_spoken: english
ODROIDs: c1+

Re: Command line video player (S805)

Unread postby crashoverride » Sun Nov 27, 2016 7:43 pm

The most likely explanation is that the source media itself is the issue. The preponderance of evidence (no media player can correctly play it) supports this premise.
crashoverride
 
Posts: 3865
Joined: Tue Dec 30, 2014 8:42 pm
languages_spoken: english
ODROIDs: C1

Re: Command line video player (S805)

Unread postby gseaman » Wed Dec 07, 2016 3:20 pm

I think maybe the problem comes from playing videos from a usb stick. I just watched a show without a single visible glitch, but I had copied it to the sd card first.
gseaman
 
Posts: 87
Joined: Fri Jan 01, 2016 2:42 pm
Location: WA, USA
languages_spoken: english
ODROIDs: c1+

Re: Command line video player (S805)

Unread postby alabama » Wed Mar 22, 2017 12:56 am

I recently purchased an Odroid C1+. I have loaded the latest Ubuntu version image from http://dn.odroid.com/S805/Ubuntu/ubuntu ... 221.img.xz
Because is a minimal version I had to also add libgegl-dev libegl1-mesa-dev libglfw3-dev libgles2-mesa-dev to compile c2play ok.
I downloaded locally http://www.libde265.org/hevc-bitstreams ... -cfg06.mkv to test the player.
I tried to play it from a remote SSH root session:

Code: Select all
root@odroid:~/videos# c2play bbb-1920x1080-cfg02.mkv
added device: /dev/input/event2
added device: /dev/input/event1
added device: /dev/input/event0
added device: /dev/input/mice
Device: /dev/input/event2
   bustype=16, vendor=7054, product=3308, version=1
   name=cec_input
InputDevice entering running state.
Device: /dev/input/event1
   bustype=3, vendor=1133, product=49948, version=272
   name=Logitech USB Keyboard
InputDevice entering running state.
Device: /dev/input/event0
   bustype=3, vendor=1133, product=49948, version=272
   name=Logitech USB Keyboard
InputDevice entering running state.
Device: /dev/input/mice
EVIOCGBIT failed.
Using input device: cec_input
Using input device: Logitech USB Keyboard
Using input device: Logitech USB Keyboard
libEGL warning: DRI3: xcb_connect failed
libEGL warning: DRI2: xcb_connect failed
libEGL warning: DRI2: xcb_connect failed
eglGetError failed: 0x3001
terminate called after throwing an instance of 'Exception'
Aborted



I also tried to play it from the terminal keyboard, but the screens goes black, and never gets back. From the ssh session I can see nothing is being played.
What I want is to play videos from the commandline directly to the framebuffer (no X11) as I do with omxplayer in my RPi.
alabama
 
Posts: 15
Joined: Wed Mar 22, 2017 12:27 am
languages_spoken: english
ODROIDs: 2x Odroid C1+
2x Odroid C2

Re: Command line video player (S805)

Unread postby crashoverride » Thu Mar 23, 2017 5:14 am

alabama wrote:Because is a minimal version I had to also add libgegl-dev libegl1-mesa-dev libglfw3-dev libgles2-mesa-dev to compile c2play ok.

alabama wrote:What I want is to play videos from the commandline directly to the framebuffer (no X11) as I do with omxplayer in my RPi.

For command line use, the "mali-fbdev" package is required; not the packages listed. Also note there are two programs: "c2play" and "c2play-x11". The former is intended for environments without X11.

For best results, start with a clean image. The "mesa" packages are not compatible with C1/C2 and may bring in unintended dependencies. The c2play "readme" states the dependencies required:
https://github.com/OtherCrashOverride/c2play/blob/master/README
Code: Select all
sudo apt install libasound2-dev libavformat-dev libass-dev


For non-X11 environments, you will also need to install "mali-fbdev".
Code: Select all
sudo apt install mali-fbdev


To compile for non-X11:
Code: Select all
make c2play -j4
crashoverride
 
Posts: 3865
Joined: Tue Dec 30, 2014 8:42 pm
languages_spoken: english
ODROIDs: C1

Re: Command line video player (S805)

Unread postby alabama » Thu Mar 23, 2017 7:43 pm

Thanks crashoverride, it works like a charm with 1080p60 HEVC videos.
Only an advice to the users of minimal Ubuntu images, mali-fbdev deb package uses a postinstall command that needs odroid user to be present in the system, so it will raise an error when apt installed.

I have another issue but not related to topic (power cycle). I will open another topic.

Thanks for your help.
alabama
 
Posts: 15
Joined: Wed Mar 22, 2017 12:27 am
languages_spoken: english
ODROIDs: 2x Odroid C1+
2x Odroid C2

Re: Command line video player (S805)

Unread postby alabama » Thu Mar 23, 2017 8:32 pm

Only one more question.
I've seen that in README you say the supported containers: MKV, AVI, MP4 have been tested.
Do you support TS ? I've tested 1 .ts clips and worked OK. Shoudn't be supported all the formats supported by libavformat ?

Thanks
alabama
 
Posts: 15
Joined: Wed Mar 22, 2017 12:27 am
languages_spoken: english
ODROIDs: 2x Odroid C1+
2x Odroid C2

Next

Return to Ubuntu

Who is online

Users browsing this forum: No registered users and 3 guests