Author Topic: NVIDA H264 Codec  (Read 37031 times)

pw44

  • Addicted
  • *
  • Posts: 666
    • View Profile
Re: NVIDA H264 Codec
« Reply #30 on: February 24, 2010, 07:04:24 pm »
Are you running mplayer from kde or linuxmce? i can run it on both.....
Is it happening with all files or with only a few?
Did you test these files on a kubuntu only environmet with mplayer?

maverick0815

  • Administrator
  • wants to work for LinuxMCE
  • *****
  • Posts: 858
    • View Profile
Re: NVIDA H264 Codec
« Reply #31 on: February 24, 2010, 07:16:24 pm »
I tested it only in linuxmce and my windowsbox. So far this only happens with a few files and I think those are also ac3 encoded.

pw44

  • Addicted
  • *
  • Posts: 666
    • View Profile
Re: NVIDA H264 Codec
« Reply #32 on: February 24, 2010, 07:40:54 pm »
May i suggest, if you have a kubuntu only environment, that you test them with mplayer (if you wish with smplayer), to see if it works.
You can also try under kde (on linuxmce). Try it also with kaffeine.
I think this can help isolate the problem, as i did.... and after that, audio will be the issue, but with Phenigma's hint, it's easier....

phenigma

  • LinuxMCE God
  • ****
  • Posts: 1758
    • View Profile
Re: NVIDA H264 Codec
« Reply #33 on: February 24, 2010, 08:57:25 pm »
I'll try this under LMCE tonight and see what happens on my end.

J.

phenigma

  • LinuxMCE God
  • ****
  • Posts: 1758
    • View Profile
Re: NVIDA H264 Codec
« Reply #34 on: February 25, 2010, 05:07:06 am »
So I tried this on my Zotac ION under LMCE and mplayer is not using VDPAU acceleration under LMCE.  I checked in the svn and the video values below are currently hard-coded into MPlayer_Player.  The wiki says the functionality was added in Beta2 "Update 2009-12-06 22569" but the code doesn't appear to be in svn.  So no VDPAU with mplayer under LMCE currently.  MPlayer is using xv and can't keep the video in sync with the audio.

On the up side the af options and the channels option in the config appear to work with mplayer to enable the on-the-fly ac3 re-encode.

Code: [Select]
root@moon40:~/.mplayer# ps ax | grep mplayer
  833 pts/11   S+     0:00 grep mplayer
30686 pts/9    Rl+    1:45 mplayer -slave -idle -msglevel all=4 -noborder -fixed-vo -fs -vo xv,x11 -vf screenshot -ao alsa:device=asym_spdif -ac hwac3,hwdts,a52, -lavdopts fast:threads=2 /usr/pluto/share/black.mpeg
root@moon40:~/.mplayer#

J.

niz23

  • Guru
  • ****
  • Posts: 361
    • View Profile
Re: NVIDA H264 Codec
« Reply #35 on: February 25, 2010, 04:59:27 pm »
WOW
Pretty sure this was committed already.
But can not find it in svn. :(
Somehow It did not slip in.

Have to dig through old installs to find that patch I made again.

/niz23

So I tried this on my Zotac ION under LinuxMCE and mplayer is not using VDPAU acceleration under LinuxMCE.  I checked in the svn and the video values below are currently hard-coded into MPlayer_Player.  The wiki says the functionality was added in Beta2 "Update 2009-12-06 22569" but the code doesn't appear to be in svn.  So no VDPAU with mplayer under LinuxMCE currently.  MPlayer is using xv and can't keep the video in sync with the audio.

On the up side the af options and the channels option in the config appear to work with mplayer to enable the on-the-fly ac3 re-encode.

Code: [Select]
root@moon40:~/.mplayer# ps ax | grep mplayer
  833 pts/11   S+     0:00 grep mplayer
30686 pts/9    Rl+    1:45 mplayer -slave -idle -msglevel all=4 -noborder -fixed-vo -fs -vo xv,x11 -vf screenshot -ao alsa:device=asym_spdif -ac hwac3,hwdts,a52, -lavdopts fast:threads=2 /usr/pluto/share/black.mpeg
root@moon40:~/.mplayer#

J.

phenigma

  • LinuxMCE God
  • ****
  • Posts: 1758
    • View Profile
Re: NVIDA H264 Codec
« Reply #36 on: February 25, 2010, 06:11:32 pm »
Niz, ticket #417 http://svn.linuxmce.org/trac.cgi/ticket/471 has your patch in it, it has not been applied.  I applied it on my dev machine no problem but it wouldn't compile, couldn't find either of these two DATA_ functions:

Code: [Select]
sGraphicsDriver = DATA_Get_Hardware_acceleration();
sGraphicsDeinterlace = DATA_Get_Deinterlacing_Mode();

I didn't figure out exactly where/why they aren't available for me, I'm still learning.

J.

pw44

  • Addicted
  • *
  • Posts: 666
    • View Profile
Re: NVIDA H264 Codec
« Reply #37 on: February 25, 2010, 06:22:37 pm »
Problem: after changing ~/.mplayer/config and /root/.mplayer/config, i was able to watch under linuxxmce AND kde H264 videos with full sound.
After that, i did try to create a media scenario. Did rebuild the MD and regenerate the orbiter. I deleted the scenario. Did rebuild the MD and regenerate the orbiter.
Result: no more H264 or any video with .m2ts extension opens under linuxmce.
Under kde, i did:
Code: [Select]
paulo@dcerouter:/var/log/pluto$ sudo mplayer /mnt/device/27/public/data/videos/Movies/Up\ \(2009\).m2ts
MPlayer UNKNOWN-4.3.2 (C) 2000-2009 MPlayer Team                                                        
Can't open joystick device /dev/input/js0: No such file or directory                                    
Can't init input joystick                                                                              
mplayer: could not connect to socket                                                                    
mplayer: No such file or directory                                                                      
Failed to open LIRC support. You will not be able to use your remote control.                          

Playing /mnt/device/27/public/data/videos/Movies/Up (2009).m2ts.
libavformat file format detected.                              
[lavf] Video stream found, -vid 0                              
[lavf] Audio stream found, -aid 1                              
VIDEO:  [H264]  1280x690  24bpp  23.976 fps  2092.0 kbps (255.4 kbyte/s)
Clip info:                                                              
 major_brand: isom                                                      
 minor_version: 1                                                      
 compatible_brands: isom                                                
SUB: Added subtitle file (1): /mnt/device/27/public/data/videos/Movies/Up (2009).srt
==========================================================================
Forced video codec: ffh264vdpau
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
Selected video codec: [ffh264vdpau] vfm: ffmpeg (FFmpeg H.264 (VDPAU))
==========================================================================
==========================================================================
Trying to force audio codec driver family hwac3...
Opening audio decoder: [faad] AAC (MPEG2/4 Advanced Audio Coding)
AUDIO: 48000 Hz, 6 ch, s16le, 296.6 kbit/6.44% (ratio: 37075->576000)
Selected audio codec: [faad] afm: faad (FAAD AAC (MPEG-2/MPEG-4 Audio))
==========================================================================
[ac3 @ 0x88ae6e0]No channel layout specified. The encoder will guess the layout, but it might be incorrect.
[AO_ALSA] alsa-lib: conf.c:4484:(parse_args) Unknown parameter AES0
[AO_ALSA] alsa-lib: conf.c:4617:(snd_config_expand) Parse arguments error: No such file or directory
[AO_ALSA] alsa-lib: pcm.c:2211:(snd_pcm_open_noupdate) Unknown PCM hw:0,1,AES0=6
[AO_ALSA] Format ac3be is not supported by hardware, trying default.
AO: [alsa] 48000Hz 2ch ac3le (2 bytes per sample)
Starting playback...
[VD_FFMPEG] Trying pixfmt=0.
Movie-Aspect is undefined - no prescaling applied.
VO: [vdpau] 1280x690 => 1280x690 H.264 VDPAU acceleration
[VD_FFMPEG] XVMC-accelerated MPEG-2.
A:  49.9 V:  49.9 A-V:  0.004 ct:  0.005   0/  0  2% 10% 22.9% 11 0
Exiting... (Quit)

It seems that mplayer is using vdpau. But no sound. F***!
I can only suspect that trying to create a scenario broke something because it was the only thing i did after testing some videos as described before. Can anyoune confirm if it's possible?

sudo speaker-test -D hw:0,1 -c2 works.
« Last Edit: February 25, 2010, 08:36:34 pm by pw44 »

niz23

  • Guru
  • ****
  • Posts: 361
    • View Profile
Re: NVIDA H264 Codec
« Reply #38 on: February 25, 2010, 06:41:02 pm »
the reason IT did not compile is because  you miss a change in Gen_devices. IT should include à declaration of the two failing methods.
/niz23
Niz, ticket #417 http://svn.linuxmce.org/trac.cgi/ticket/471 has your patch in it, it has not been applied.  I applied it on my dev machine no problem but it wouldn't compile, couldn't find either of these two DATA_ functions:

Code: [Select]
sGraphicsDriver = DATA_Get_Hardware_acceleration();
sGraphicsDeinterlace = DATA_Get_Deinterlacing_Mode();

I didn't figure out exactly where/why they aren't available for me, I'm still learning.

J.

phenigma

  • LinuxMCE God
  • ****
  • Posts: 1758
    • View Profile
Re: NVIDA H264 Codec
« Reply #39 on: February 25, 2010, 08:36:39 pm »
I figured they needed to be declared but my c++ isn't up to par to know where/how it should be done...  I can read it, just unable to write it effectively yet.

J.

phenigma

  • LinuxMCE God
  • ****
  • Posts: 1758
    • View Profile
Re: NVIDA H264 Codec
« Reply #40 on: February 25, 2010, 08:42:07 pm »
Problem: after changing ~/.mplayer/config and /root/.mplayer/config, i was able to watch under linuxxmce AND kde H264 videos with full sound.
After that, i did try to create a media scenario. Did rebuild the MD and regenerate the orbiter. I deleted the scenario. Did rebuild the MD and regenerate the orbiter.
Result: no more H264 or any video with .m2ts extension opens under linuxmce.

Rebuilding the MD will remove the ~/.mplayer/config file and it will need to be re-created.  But it sounds like mplayer is not running at all though...  You shouldn't be rebuilding your MD so often, it reverts it to it's initial installation without upgrades and bugfixes applied...  Did you upgrade the MD after rebuilding it?

J.

pw44

  • Addicted
  • *
  • Posts: 666
    • View Profile
Re: NVIDA H264 Codec
« Reply #41 on: February 25, 2010, 09:09:13 pm »
Quote
Rebuilding the MD will remove the ~/.mplayer/config file and it will need to be re-created.  But it sounds like mplayer is not running at all though...  You shouldn't be rebuilding your MD so often, it reverts it to it's initial installation without upgrades and bugfixes applied...  Did you upgrade the MD after rebuilding it?
Unfortunately, it did not remove ~/mplayer/config, after rebuilding it, the file /home/paulo/.mplayer/config was there, as i left so as the /root/.mplayer/config.
It seems that mplayer is using vdpau (see the output in my previous message), but something gone weird, because after trying to create a scenario, mplayes does not start under linuxmce (no display, no sound) and under kde, only display, no sound....
Upgrade the MD? How is it done?
When shall the MD be rebuilt? One situation is when xine configs are changed. I learned it at the hard way.

niz23

  • Guru
  • ****
  • Posts: 361
    • View Profile
Re: NVIDA H264 Codec
« Reply #42 on: February 25, 2010, 09:12:30 pm »
I´ll add the missing code pieces during the weekend.
Have to test that it build fine before I commit it to svn to be included into lmce build.

/niz23

I figured they needed to be declared but my c++ isn't up to par to know where/how it should be done...  I can read it, just unable to write it effectively yet.

J.

niz23

  • Guru
  • ****
  • Posts: 361
    • View Profile
Re: NVIDA H264 Codec
« Reply #43 on: February 25, 2010, 09:19:32 pm »
Add the following to MPLayer_PlayerBase.h (it´s located under src/Gen_Devices)

Search for the line below
 string DATA_Get_Name() { return GetData()->Get_Name(); }

And append the two lines below after it.
 string DATA_Get_Hardware_acceleration() { return GetData()->Get_Hardware_acceleration(); }
 string DATA_Get_Deinterlacing_Mode() { return GetData()->Get_Deinterlacing_Mode(); }


You should now be able to build MPlayer_Player and test vdpau.

/niz23

I´ll add the missing code pieces during the weekend.
Have to test that it build fine before I commit it to svn to be included into lmce build.

/niz23

I figured they needed to be declared but my c++ isn't up to par to know where/how it should be done...  I can read it, just unable to write it effectively yet.

J.

pw44

  • Addicted
  • *
  • Posts: 666
    • View Profile
Re: NVIDA H264 Codec
« Reply #44 on: February 25, 2010, 10:00:45 pm »
Hia,

Trying to watch the H264 file which previously worked with mplayer, i got the following log. Mplayer starts and crashes.

Code: [Select]
08      02/25/10 17:40:39.186           Received Message from 21 (OnScreen Orbiter / Living) to 10 (Media Plug-in / Living), type 1 id 43 Command:MH Play Media, retry none, parameters: <0x72fb0b90>                              
08      02/25/10 17:40:39.186             Parameter 2(PK_Device): 0 <0x72fb0b90>                                  
08      02/25/10 17:40:39.186             Parameter 13(Filename): !F13908 <0x72fb0b90>                            
08      02/25/10 17:40:39.186             Parameter 29(PK_MediaType): 0 <0x72fb0b90>                              
08      02/25/10 17:40:39.187             Parameter 44(PK_DeviceTemplate): 0 <0x72fb0b90>                        
08      02/25/10 17:40:39.187             Parameter 45(PK_EntertainArea): 1 <0x72fb0b90>                          
08      02/25/10 17:40:39.187             Parameter 116(Resume): 0 <0x72fb0b90>                                  
08      02/25/10 17:40:39.187             Parameter 117(Repeat): 0 <0x72fb0b90>                                  
08      02/25/10 17:40:39.187             Parameter 253(Queue): 0 <0x72fb0b90>                                    
08      02/25/10 17:40:39.187             Parameter 254(Bypass Event): 0 <0x72fb0b90>                            
08      02/25/10 17:40:39.187             Parameter 276(Dont Setup AV): 0 <0x72fb0b90>                            
01      02/25/10 17:40:39.188           debug_stream_end MediaStream::MediaStream c1 1003/0x9a8b6ec8 source 23 <0x8a7dfb90>                                                                                                        
07      02/25/10 17:40:39.188           Event #19 has no handlers <0xa43efb90>                                    
07      02/25/10 17:40:39.188           Received Message from 10 (Media Plug-in / Living) to -1001 (unknown / ), type 2 id 19 Event:Watching Media, retry none, parameters: <0xa43efb90>                                            
07      02/25/10 17:40:39.188             Parameter 27(PK_Room): 4 <0xa43efb90>                                  
05      02/25/10 17:40:39.189           Doing MPlayer redirection check... <0x8a7dfb90>                          
05      02/25/10 17:40:39.189           Doing MythTV redirection check... <0x8a7dfb90>                            
05      02/25/10 17:40:39.189           Redirecting CMD_Play_Media to MPlayer instead of Xine: media type is 5 <0x8a7dfb90>                                                                                                        
05      02/25/10 17:40:39.189           Found MPlayer for redirect, device #71 <0x8a7dfb90>                      
05      02/25/10 17:40:39.189           sending CMD_Play_Media from 24 to 71 with deq pos 0 <0x8a7dfb90>          
05      02/25/10 17:40:39.189           set media id command sent with id F13908 <0x8a7dfb90>                    
05      02/25/10 17:40:39.189           play media command sent from 24 to 71! <0x8a7dfb90>                      
05      02/25/10 17:40:39.189           Media_Plugin::CheckForAlternatePipes no destination for EA 1 Living <0x8a7dfb90>                                                                                                            
05      02/25/10 17:40:39.189           Also turning on MD and OSD <0x8a7dfb90>                                  
08      02/25/10 17:40:39.190           Received Message from 24 (Xine Plug-in / Living) to 71 (MPlayer Player / Living), type 1 id 37 Command:Play Media, retry none, parameters: <0x9b1eeb90>                                    
08      02/25/10 17:40:39.190             Parameter 29(PK_MediaType): 5 <0x9b1eeb90>                              
08      02/25/10 17:40:39.190             Parameter 41(StreamID): 1003 <0x9b1eeb90>                              
08      02/25/10 17:40:39.190             Parameter 42(MediaPosition):  <0x9b1eeb90>                              
08      02/25/10 17:40:39.190             Parameter 59(MediaURL): /home/public/data/videos/Software Raid 5 [27]/Movies/Up (2009).m2ts <0x9b1eeb90>                                                                                  
08      02/25/10 17:40:39.190           Received Message from 24 (Xine Plug-in / Living) to 71 (MPlayer Player / Living), type 1 id 920 Command:Set Media ID, retry none, parameters: <0x9b1eeb90>                                  
08      02/25/10 17:40:39.190             Parameter 10(ID): F13908 <0x9b1eeb90>                                  
08      02/25/10 17:40:39.190             Parameter 41(StreamID): 1003 <0x9b1eeb90>                              
08      02/25/10 17:40:39.191           Received Message from 10 (Media Plug-in / Living) to 20 (The core/hybrid / Living), type 1 id 192 Command:On, retry none, parameters: <0xa43efb90>                                          
08      02/25/10 17:40:39.191             Parameter 97(PK_Pipe): 0 <0xa43efb90>                                  
08      02/25/10 17:40:39.192             Parameter 98(PK_Device_Pipes):  <0xa43efb90>                            
08      02/25/10 17:40:39.192           Received Message from 10 (Media Plug-in / Living) to 69 (DSP-A1 / Living), type 1 id 192 Command:On, retry none, parameters: <0xb6d06b90>                                                  
08      02/25/10 17:40:39.192             Parameter 98(PK_Device_Pipes):  <0xb6d06b90>                            
08      02/25/10 17:40:39.192           Received Message from 10 (Media Plug-in / Living) to 21 (OnScreen Orbiter / Living), type 1 id 192 Command:On, retry none, parameters: <0xa43efb90>                                        
08      02/25/10 17:40:39.192             Parameter 97(PK_Pipe): 0 <0xa43efb90>                                  
08      02/25/10 17:40:39.192             Parameter 98(PK_Device_Pipes):  <0xa43efb90>                            
08      02/25/10 17:40:39.192           Received Message from 10 (Media Plug-in / Living) to 69 (DSP-A1 / Living), type 1 id 91 Command:Input Select, retry none, parameters: <0xb6d06b90>                                          
08      02/25/10 17:40:39.192             Parameter 71(PK_Command_Input(Laserdisc)): 177 <0xb6d06b90>            
05      02/25/10 17:40:39.192           The target device 20 (routed to 20) has not registered. <0xb6d06b90>      
05      02/25/10 17:40:39.192           The target device 69 (routed to 60) has not registered. <0xb6d06b90>      
05      02/25/10 17:40:39.193           The target device 69 (routed to 60) has not registered. <0xb6d06b90>      
05      02/25/10 17:40:39.201           Media_Plugin::StartMedia() function call completed with honors! <0x8a7dfb90>                                                                                                                
08      02/25/10 17:40:39.202           Received Message from 21 (OnScreen Orbiter / Living) to 60 (USB UIRT 0038 / Living), type 1 id 687 Command:Set Screen Type, retry none, parameters: <0x72fb0b90>                            
08      02/25/10 17:40:39.202             Parameter 48(Value): 66 <0x72fb0b90>                                    
05      02/25/10 17:40:39.202           The target device 60 (routed to 60) has not registered. <0xb6d06b90>      
08      02/25/10 17:40:39.202           Received Message from 10 (Media Plug-in / Living) to 23 (Xine Player / Living), type 1 id 192 Command:On, retry none, parameters: <0xa43efb90>                                              
08      02/25/10 17:40:39.202             Parameter 97(PK_Pipe): 0 <0xa43efb90>                                  
08      02/25/10 17:40:39.202             Parameter 98(PK_Device_Pipes):  <0xa43efb90>                            
08      02/25/10 17:40:39.203           Received Message from 10 (Media Plug-in / Living) to 21 (OnScreen Orbiter / Living), type 1 id 242 Command:Set Now Playing, retry none, parameters: <0xa43efb90>                            
08      02/25/10 17:40:39.203             Parameter 3(PK_DesignObj): 70,4964,47,140,224,230 <0xa43efb90>          
08      02/25/10 17:40:39.203             Parameter 5(Value To Assign): Up (2009).m2ts <0xa43efb90>              
08      02/25/10 17:40:39.203             Parameter 9(Text):  <0xa43efb90>                                        
08      02/25/10 17:40:39.203             Parameter 29(PK_MediaType): 5 <0xa43efb90>                              
08      02/25/10 17:40:39.203             Parameter 41(StreamID): 1003 <0xa43efb90>                              
08      02/25/10 17:40:39.203             Parameter 48(Value): 0 <0xa43efb90>                                    
08      02/25/10 17:40:39.203             Parameter 50(Name): xv.MPlayer <0xa43efb90>                            
08      02/25/10 17:40:39.203             Parameter 103(List PK Device): 71,71,69,,0,1,0 <0xa43efb90>            
08      02/25/10 17:40:39.203             Parameter 120(Retransmit): 0 <0xa43efb90>                              
08      02/25/10 17:40:39.203           Received Message from 10 (Media Plug-in / Living) to 21 (OnScreen Orbiter / Living), type 1 id 741 Command:Goto Screen, retry none, parameters: <0xa43efb90>                                
08      02/25/10 17:40:39.203             Parameter 10(ID):  <0xa43efb90>                                        
08      02/25/10 17:40:39.203             Parameter 159(PK_Screen): 140 <0xa43efb90>                              
08      02/25/10 17:40:39.203             Parameter 251(Interruption): 0 <0xa43efb90>                            
08      02/25/10 17:40:39.203             Parameter 252(Turn On): 1 <0xa43efb90>                                  
08      02/25/10 17:40:39.203             Parameter 253(Queue): 0 <0xa43efb90>                                    
08      02/25/10 17:40:39.207           Received Message from 21 (OnScreen Orbiter / Living) to 6 (Datagrid Plug-in / Living), type 1 id 35 Command:Populate Datagrid, retry none, parameters: <0x727afb90>                        
08      02/25/10 17:40:39.207             Parameter 4(PK_Variable): 0 <0x727afb90>                                
08      02/25/10 17:40:39.207             Parameter 5(Value To Assign):  <0x727afb90>                            
08      02/25/10 17:40:39.207             Parameter 10(ID): 146 <0x727afb90>                                      
08      02/25/10 17:40:39.207             Parameter 15(DataGrid ID): MediaFile_21 <0x727afb90>                    
08      02/25/10 17:40:39.207             Parameter 38(PK_DataGrid): 63 <0x727afb90>                              
08      02/25/10 17:40:39.207             Parameter 39(Options): 5||||1,2|0|13|0 | 2 | <0x727afb90>              
08      02/25/10 17:40:39.207             Parameter 40(IsSuccessful): 1 <0x727afb90>                              
08      02/25/10 17:40:39.207             Parameter 44(PK_DeviceTemplate): 0 <0x727afb90>                        
08      02/25/10 17:40:39.207             Parameter 60(Width): 1 <0x727afb90>                                    
08      02/25/10 17:40:39.207             Parameter 61(Height): 20 <0x727afb90>  

I just would like to know why, if it worked before trying to create scenario. Is there a way to fix it or will i need to start all over again (reinstall from ground zero)?
« Last Edit: February 25, 2010, 11:12:48 pm by pw44 »