LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 05-17-2010, 08:00 PM   #16
Electrode
Member
 
Registered: Oct 2002
Location: Michigan
Distribution: Debian
Posts: 158

Original Poster
Rep: Reputation: 16

If it helps anyone, I have uploaded a 10 second dump (19 MB) of the stream I'm trying to watch.
 
Old 05-17-2010, 08:45 PM   #17
mac.tieu
Member
 
Registered: Jan 2010
Location: Vietnam
Distribution: Arch
Posts: 65

Rep: Reputation: 22
Quote:
Originally Posted by Electrode View Post
Some observations:

* the latest ffmpeg gives garbled video output. SVN r20373 works better.
* I tried building a 32-bit ffplay binary in a chroot, and that uses much less CPU (102% vs. 130%).
* Building a 32-bit mplayer seems to make no difference vs. 64-bit.
Have you ever tried hardware video acceleration version of mplayer (vdpau/vaapi)? It must be less CPU usage.

MT.
 
Old 05-17-2010, 09:06 PM   #18
Electrode
Member
 
Registered: Oct 2002
Location: Michigan
Distribution: Debian
Posts: 158

Original Poster
Rep: Reputation: 16
Hardware-accelerated playback doesn't appear to work on x86-64. -vo xv, gl, gl2 all give similar results.

Further observations:
* CPU utilization with mplayer is about 75-80% with 32-bit build and 70-73% with 64-bit build (video still runs slow and desyncs)
* -vo null does not have any effect on CPU usage or desync
* -nosound or -ao null has no effect, video still runs slightly faster than half speed, no change in CPU usage

Last edited by Electrode; 05-17-2010 at 09:13 PM.
 
Old 05-17-2010, 09:50 PM   #19
mac.tieu
Member
 
Registered: Jan 2010
Location: Vietnam
Distribution: Arch
Posts: 65

Rep: Reputation: 22
Quote:
Originally Posted by Electrode View Post
Hardware-accelerated playback doesn't appear to work on x86-64. -vo xv, gl, gl2 all give similar results.

Further observations:
* CPU utilization with mplayer is about 75-80% with 32-bit build and 70-73% with 64-bit build (video still runs slow and desyncs)
* -vo null does not have any effect on CPU usage or desync
* -nosound or -ao null has no effect, video still runs slightly faster than half speed, no change in CPU usage
I am running ArchLinux (x86_64) and mplayer-vaapi work just fine. All I need are libav, vdpau-video driver and mplayer-vaapi.

Have a look at:
Video Acceleration (VA) API

MT.
 
Old 05-18-2010, 03:06 AM   #20
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301
When I try to play that dump it says:

Code:
h264 @ 0xf056c0]number of reference frames exceeds max (probably corrupt input), discarding one
lots of times with mplayer, which then hangs.

However, it plays fine with 'ffplay', try that.

I think that this message might be correct, the input may be corrupt. It could be a driver problem with the capture card or something.
 
Old 05-18-2010, 09:06 AM   #21
Electrode
Member
 
Registered: Oct 2002
Location: Michigan
Distribution: Debian
Posts: 158

Original Poster
Rep: Reputation: 16
I have already tried ffplay, as mentioned earlier in the thread. It maintains sync but stutters due to high CPU consumption.
 
Old 05-18-2010, 09:41 AM   #22
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301
Did you enable vdpau in ffplay ? when compiling it ? that might help.
 
Old 05-18-2010, 02:56 PM   #23
Electrode
Member
 
Registered: Oct 2002
Location: Michigan
Distribution: Debian
Posts: 158

Original Poster
Rep: Reputation: 16
Quote:
Originally Posted by H_TeXMeX_H View Post
Did you enable vdpau in ffplay ? when compiling it ? that might help.
Makes no difference
 
Old 05-20-2010, 12:04 AM   #24
mac.tieu
Member
 
Registered: Jan 2010
Location: Vietnam
Distribution: Arch
Posts: 65

Rep: Reputation: 22
Quote:
Originally Posted by Electrode View Post
Makes no difference
I've tried to play your 'test.ts' sample on my ArchLinux (x86_64)
Code:
mplayer -va vaapi -vo vaapi test.ts
CPU usage is very low. This is output log:
Code:
... 
Playing test.ts.
TS file format detected.
VIDEO H264(pid=517) AUDIO MPA(pid=751) NO SUBS (yet)!  PROGRAM N. 9
FPS seems to be: 29.970030
libva: libva version 0.31.0
Xlib:  extension "XFree86-DRI" missing on display ":0.0".
libva: va_getDriverName() returns 0
libva: Trying to open /usr/local/lib/dri/nvidia_drv_video.so
libva: va_openDriver() returns 0
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
[VD_FFMPEG] VA API accelerated codec.
Selected video codec: [ffh264] vfm: ffmpeg (FFmpeg H.264)
==========================================================================
==========================================================================
Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders
AUDIO: 48000 Hz, 2 ch, s16le, 384.0 kbit/25.00% (ratio: 48000->192000)
Selected audio codec: [ffmp2] afm: ffmpeg (FFmpeg MPEG layer-1 and layer-2 audio)
==========================================================================
AO: [oss] 48000Hz 2ch s16le (2 bytes per sample)
Starting playback...
[VD_FFMPEG] Trying pixfmt=0.
Movie-Aspect is 1.78:1 - prescaling to correct movie aspect.
VO: [vaapi] 1920x1080 => 1920x1080 H.264 VA API Acceleration 
[vo_vaapi] Using 1:1 VA surface mapping
[VD_FFMPEG] XVMC-accelerated MPEG-2.
...
Regards,
MT.
 
Old 05-20-2010, 01:23 AM   #25
Electrode
Member
 
Registered: Oct 2002
Location: Michigan
Distribution: Debian
Posts: 158

Original Poster
Rep: Reputation: 16
Alright, tried building mplayer-vaapi as mentioned earlier in the thread. Builds OK but I get this when I try to run it:

Code:
Playing test.ts.
TS file format detected.
VIDEO H264(pid=517) AUDIO MPA(pid=751) NO SUBS (yet)!  PROGRAM N. 9
FPS seems to be: 29.970030
libva: libva version 0.31.0-sds6
Xlib:  extension "XFree86-DRI" missing on display ":0.0".
libva: va_getDriverName() returns 0
libva: Trying to open /usr/lib64/va/drivers/nvidia_drv_video.so
vdpau_video: error: Assertion failed in file vdpau_driver.c at line 227
mac.tieu: What versions of mplayer, libva, vdpau_video and Nvidia driver are you using?
 
Old 05-20-2010, 05:20 AM   #26
mac.tieu
Member
 
Registered: Jan 2010
Location: Vietnam
Distribution: Arch
Posts: 65

Rep: Reputation: 22
Quote:
Originally Posted by Electrode View Post
...What versions of mplayer, libva, vdpau_video and Nvidia driver are you using?
I am using nVidia driver version 195.36.15-2, latest snapshot of libva, vdpau_video, mplayer-vaapi.

You should check for valid path of nvidia_drv_video.so (your is /usr/lib64/va/drivers/nvidia_drv_video.so). There are a utility named 'vainfo' which use to check whether libva installed properly or not.
Code:
$ ./vainfo
libva: libva version 0.31.0
Xlib:  extension "XFree86-DRI" missing on display ":0.0".
libva: va_getDriverName() returns 0
libva: Trying to open /usr/local/lib/dri/nvidia_drv_video.so
libva: va_openDriver() returns 0
vainfo: VA API version: 0.31
vainfo: Driver version: Splitted-Desktop Systems VDPAU backend for VA API - 0.6.3
vainfo: Supported profile and entrypoints
      VAProfileMPEG2Simple            :	VAEntrypointVLD
      VAProfileMPEG2Main              :	VAEntrypointVLD
      VAProfileH264Main               :	VAEntrypointVLD
      VAProfileH264High               :	VAEntrypointVLD
      VAProfileVC1Simple              :	VAEntrypointVLD
      VAProfileVC1Main                :	VAEntrypointVLD
      VAProfileVC1Advanced            :	VAEntrypointVLD
You should also pay attention at matching two defines of libva and vdpau-video. Mine is:
Code:
File config.h of vdpau-video: 
#define VA_DRIVER_INIT_FUNC __vaDriverInit_0_31
Code:
File va.c of libva: 
#define DRIVER_INIT_FUNC "__vaDriverInit_0_31"
Good lucks,
MT.
 
Old 05-20-2010, 08:39 AM   #27
Shadow_7
Senior Member
 
Registered: Feb 2003
Distribution: debian
Posts: 4,137
Blog Entries: 1

Rep: Reputation: 874Reputation: 874Reputation: 874Reputation: 874Reputation: 874Reputation: 874Reputation: 874
Is your user in the video group?

What's your specs with regards to other baselines speeds?

$ glxinfo | grep -i "direct"

$ glxgears -info
(or -printfps depending on distro / version)

$ xvidtune -show

$ ffmpeg -i <video>

$ cat /proc/cpuinfo | grep -i "bogomip"
(while you're trying to play the video, frequency scaling ruins it if you're not maxed)

Last edited by Shadow_7; 05-20-2010 at 08:41 AM.
 
Old 05-20-2010, 09:25 AM   #28
Electrode
Member
 
Registered: Oct 2002
Location: Michigan
Distribution: Debian
Posts: 158

Original Poster
Rep: Reputation: 16
mac.tieu: I checked the defines you mentioned and they match. I'm using the same versions of everything as you except for the Nvidia driver: 195.36.24

vainfo does the same thing:

Code:
electrode@belphegor:~$ vainfo
libva: libva version 0.31.0-sds6
Xlib:  extension "XFree86-DRI" missing on display ":0.0".
libva: va_getDriverName() returns 0
libva: Trying to open /usr/lib64/va/drivers/nvidia_drv_video.so
vdpau_video: error: Assertion failed in file vdpau_driver.c at line 227
Aborted
/usr/lib64/va/drivers/nvidia_drv_video.so exists and is a symlink to vdpau_drv_video.so in the same directory.

Shadow_7: User is in video group. All video and 3D apps run correctly and at reasonable speeds. MPEG-1/2/4 HD video plays without difficulty. CPU scaling is disabled in the kernel (I was using it at one point but found that it screwed up virtualbox).
 
Old 05-20-2010, 10:02 AM   #29
mac.tieu
Member
 
Registered: Jan 2010
Location: Vietnam
Distribution: Arch
Posts: 65

Rep: Reputation: 22
Quote:
Originally Posted by Electrode View Post
Code:
electrode@belphegor:~$ vainfo
libva: libva version 0.31.0-sds6
Xlib:  extension "XFree86-DRI" missing on display ":0.0".
libva: va_getDriverName() returns 0
libva: Trying to open /usr/lib64/va/drivers/nvidia_drv_video.so
vdpau_video: error: Assertion failed in file vdpau_driver.c at line 227
Aborted
vdp_device_create_x11 had been failed. It may be due to multiple nvidia library existed. I suggest you to search 'vdp_device_create_x11 error', there are several results related.

Hope that help,
MT.
 
Old 05-22-2010, 08:48 PM   #30
Electrode
Member
 
Registered: Oct 2002
Location: Michigan
Distribution: Debian
Posts: 158

Original Poster
Rep: Reputation: 16
After doing some research, it looks like my card (Geforce 7800 AGP) does not support VDPAU/VA API, so this was all a dead end.

If there are no other suggestions, I give up.
 
1 members found this post helpful.
  


Reply

Tags
h264, mplayer



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] mplayer & H.264/AVC Video Steve W Linux - Software 2 07-07-2009 08:22 AM
How do you compile MPlayer with H.264 Support? H.264 Linux - Software 25 03-28-2008 04:27 AM
Sound lagging behind video in Google video slackist Linux - General 1 05-15-2006 07:45 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 10:23 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration