Go Back   nV News Forums > Linux Support Forums > NVIDIA Linux

Newegg Daily Deals

Reply
 
Thread Tools
Old 07-26-09, 04:34 AM   #1
ksng
Registered User
 
Join Date: Jul 2009
Posts: 10
Default mplayer slow playback for Hong Kong h264 DVB broadcast

Playback of video for h264 DVB broadcast in Hong Kong is slower than it should. There's no problem in audio playback. A sample clip hd_from_ksng_090726a.ts has been uploaded to the NVIDIA file drop. When playing this file, it can be found that audio finishes earlier than the video. Nvidia-bug-report.log.gz is attached.

I've tested with GeForce 9300GS and 9500GT, and the problem happens for both cards. My CPU is AMD X2 4800+.

Would you please have a look!

Thanks and Regards,
KSNG
Attached Files
File Type: gz nvidia-bug-report.log.gz (43.7 KB, 110 views)
ksng is offline   Reply With Quote
Old 07-26-09, 05:54 AM   #2
cehoyos
FFmpeg developer
 
Join Date: Jan 2009
Location: Vienna, Austria
Posts: 467
Default Re: mplayer slow playback for Hong Kong h264 DVB broadcast

Full, uncut output of your call to mplayer is needed.

Carl Eugen

PS: Do not forget to try -mc 2.

Last edited by cehoyos; 07-26-09 at 05:55 AM. Reason: I missed the fact that the issue is about mplayer
cehoyos is offline   Reply With Quote
Old 07-26-09, 10:29 AM   #3
ksng
Registered User
 
Join Date: Jul 2009
Posts: 10
Default Re: mplayer slow playback for Hong Kong h264 DVB broadcast

With -mc 2, video speed is improved but there's still A/V out of sync happening - video constantly lagging behind audio by about 0.5 sec.

My command to play the video was 'mplayer -vo vdpau -vc ffh264vdpau -mc 2 hd_from_ksng_090726a.ts', and attached is the full log with 'VDPAU_TRACE=1' and 'VDPAU_NVIDIA_DEBUG=3'.

Thanks,
KS Ng
Attached Files
File Type: gz mplayer_vdpau.log.gz (86.5 KB, 72 views)
ksng is offline   Reply With Quote
Old 07-26-09, 10:42 AM   #4
cehoyos
FFmpeg developer
 
Join Date: Jan 2009
Location: Vienna, Austria
Posts: 467
Default Re: mplayer slow playback for Hong Kong h264 DVB broadcast

Quote:
Originally Posted by ksng View Post
With -mc 2, video speed is improved but there's still A/V out of sync happening - video constantly lagging behind audio by about 0.5 sec.
Then use -mc 2 -delay -0.5 (I've never observed such a high value, 0.2 is more likely).
Note that your problem has nothing to do with VDPAU, it is expected to happen with -vc ffh264 as well.

Carl Eugen
cehoyos is offline   Reply With Quote
Old 07-27-09, 06:36 AM   #5
ksng
Registered User
 
Join Date: Jul 2009
Posts: 10
Default Re: mplayer slow playback for Hong Kong h264 DVB broadcast

With '-mc 2 -delay -0.5' (and probably fine tuned by the +/- keys while playing), play back is now acceptable. Thank you!
ksng is offline   Reply With Quote
Old 08-02-09, 09:03 AM   #6
ksng
Registered User
 
Join Date: Jul 2009
Posts: 10
Default Re: mplayer slow playback for Hong Kong h264 DVB broadcast

I thought the issue has been resolved with '-mc 2', but when I add deinterlacing, e.g. '-vo vdpau:deint=2', slow playback re-occurred. '-mc 2' doesn't seem to have any effect. Playback speed is same for 9300GS and 9500GT.

I haven't done an exact timing, but it seems to be playing at half the speed that it should. Does it have to do with the DVB broadcast being in interlaced mode (1080i for HK DVB HD broadcast)?
ksng is offline   Reply With Quote
Old 08-02-09, 09:56 AM   #7
cehoyos
FFmpeg developer
 
Join Date: Jan 2009
Location: Vienna, Austria
Posts: 467
Default Re: mplayer slow playback for Hong Kong h264 DVB broadcast

Quote:
Originally Posted by ksng View Post
I thought the issue has been resolved with '-mc 2', but when I add deinterlacing, e.g. '-vo vdpau:deint=2', slow playback re-occurred. '-mc 2' doesn't seem to have any effect.
This is usually an indication that your system is too slow for deinterlacing (which is surprising for a 9500 GT). You could test -mc 2 -speed 0.5 to see if A/V sync stays correct without frames being dropped if performance is no problem (anymore).

Carl Eugen
cehoyos is offline   Reply With Quote
Old 08-03-09, 04:51 AM   #8
ksng
Registered User
 
Join Date: Jul 2009
Posts: 10
Default Re: mplayer slow playback for Hong Kong h264 DVB broadcast

I've done some more thorough tests, and found that there's no problem with video speed in playing HD files with -vo vdpau:deint -vc ffh264vdpau -mc 2. Slow video only occurs when playing live HD TV via http streaming using following command:

mplayer -vo vdpau:deint=2 -vc ffh264vdpau -delay -0.4 -tsprobe 100000 -mc 2 http://<ip address>:8080

Video speed is normal without 'deint=2', and with it, '-mc 2' has no effect and video speed is halved.
ksng is offline   Reply With Quote

Old 08-03-09, 05:52 AM   #9
cehoyos
FFmpeg developer
 
Join Date: Jan 2009
Location: Vienna, Austria
Posts: 467
Default Re: mplayer slow playback for Hong Kong h264 DVB broadcast

Quote:
Originally Posted by ksng View Post
Slow video only occurs when playing live HD TV via http streaming using following command:

mplayer -vo vdpau:deint=2 -vc ffh264vdpau -delay -0.4 -tsprobe 100000 -mc 2 http://<ip address>:8080
Does -cache <very big value> help? Do you see the same problems with the file produced by mplayer -dumpstream? If yes, please upload a sample.
I forgot to mention before: deint=2 usually is less effective than deint=3 (or pressing "D").
Quote:
Video speed is normal without 'deint=2', and with it, '-mc 2' has no effect and video speed is halved.
And without -mc2 and without deint?

Carl Eugen
cehoyos is offline   Reply With Quote
Old 08-03-09, 10:40 AM   #10
gerbenr
Registered User
 
Join Date: Jan 2009
Posts: 12
Default Re: mplayer slow playback for Hong Kong h264 DVB broadcast

I have the exact same issue, when I watch (with MPlayer) a recording made by MythTV of a 1080i broadcast, the video speed is halved and the audio speed is normal. Using -mc 2 -delay -0.5 makes it just about right (thanks for that tip!). I too suspect the interlaced nature of the broadcast to be the problem. Does the receiver save every interlaced frame (of the 50 interlaced frames/sec) as a normal frame or something? MPlayer thinks it's a 25fps stream. The time counter in MPlayer (typing "o" for OSD) also runs at half speed.

The strange thing is that a Eurosport HD recording plays at the correct speed. So it's probably nothing to do with nvidia or vdpau...

Code:
# mplayer effe.mpg -vc ffh264vdpau -vo vdpau
MPlayer SVN-r29324-4.3.2 (C) 2000-2009 MPlayer Team

Playing effe.mpg.
TS file format detected.
VIDEO H264(pid=101) AUDIO A52(pid=103) NO SUBS (yet)!  PROGRAM N. 1
FPS seems to be: 25.000000
==========================================================================
Forced video codec: ffh264vdpau
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
[VD_FFMPEG] XVMC-accelerated MPEG-2.
Selected video codec: [ffh264vdpau] vfm: ffmpeg (FFmpeg H.264 (VDPAU))
==========================================================================
==========================================================================
Opening audio decoder: [liba52] AC3 decoding with liba52
Using SSE optimized IMDCT transform
Using MMX optimized resampler
AUDIO: 48000 Hz, 2 ch, s16le, 448.0 kbit/29.17% (ratio: 56000->192000)
Selected audio codec: [a52] afm: liba52 (AC3-liba52)
==========================================================================
AO: [oss] 48000Hz 2ch s16le (2 bytes per sample)
Starting playback...
[h264_vdpau @ 0xc550e0]non-existing SPS 32 referenced in buffering period
[VD_FFMPEG] XVMC-accelerated MPEG-2.
VDec: vo config request - 1920 x 1080 (preferred colorspace: H.264 VDPAU acceleration)
VDec: using H.264 VDPAU acceleration as output csp (no 0)
Movie-Aspect is 1.78:1 - prescaling to correct movie aspect.
VO: [vdpau] 1920x1080 => 1920x1080 H.264 VDPAU acceleration 
[h264_vdpau @ 0xc550e0]non-existing SPS 32 referenced in buffering period
[h264_vdpau @ 0xc550e0]non-existing SPS 32 referenced in buffering period
[h264_vdpau @ 0xc550e0]non-existing SPS 32 referenced in buffering period
[h264_vdpau @ 0xc550e0]non-existing SPS 32 referenced in buffering period
[h264_vdpau @ 0xc550e0]non-existing SPS 32 referenced in buffering period

< and this above goes on and on while watching >
I use a 9800GT with a Phenom X4, Ubuntu 9.04, driver 180.51, and a KNC-1 DVB-C adapter (SAA7146).

For me it's not a really big deal because MythTV plays it fine, but I would like to be able to use MPlayer for these files.
gerbenr is offline   Reply With Quote
Old 08-03-09, 11:17 AM   #11
cehoyos
FFmpeg developer
 
Join Date: Jan 2009
Location: Vienna, Austria
Posts: 467
Default Re: mplayer slow playback for Hong Kong h264 DVB broadcast

Quote:
Originally Posted by gerbenr View Post
I have the exact same issue
No, you describe MPlayer's known behaviour when playing PAFF streams while user ksng observes "slow video" with -mc 2.
I'm still surprised about -delay 0.5 though, it is usually 0.2 or 0.3.

Carl Eugen
cehoyos is offline   Reply With Quote
Old 08-03-09, 12:00 PM   #12
gerbenr
Registered User
 
Join Date: Jan 2009
Posts: 12
Default Re: mplayer slow playback for Hong Kong h264 DVB broadcast

You're right, apparently Eurosport uses MBAFF (checked with h264_parse) and Nederland 1 HD doesn't, (does this mean PAFF or can it be just normal interlaced?) and mplayer apparently has problems with that. Do you know if -mc 2 (and -delay -0.5) is the normal workaround or are people working on this?

I noticed that my on-board card (8300) didn't have problems showing Eurosport but it did showing Nederland HD, this probably means that Eurosport doesn't have to be deinterlaced...

(don't want to hijack this thread, just curious)

thanks!
gerbenr is offline   Reply With Quote
Reply


Thread Tools

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 On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 11:55 PM.


Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Copyright 1998 - 2014, nV News.