mplayer / xine dxr3 output with proper a/v sync?

View: New views
10 Messages — Rating Filter:   Alert me  

mplayer / xine dxr3 output with proper a/v sync?

by Thomas Orgis :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi!

After donating my two dxr3 cards to driver development, I still have my Hollywood+ and after a fruitless battle to get some VGA-RGB TVout going, resorted to using it again with a slightly faster processor to play certain movies (mplayer seems to have a harder time playing h264 on dxr3 than on xvideo).
There simply doesn't seem to be another TVout for linux that "just does it right".

So, there I am, fresh setup of a Linux system, 0.17.3 dxr3 drivers, no X installed, since I just want video on the TV. For playing DVDs I still treasure the specialized dxr3player app, which "does it right" for DVDs since many years now, while mplayer is battling to get menu support in.
What the MPlayer also is battling with is massive A/V desynchronization when using the dxr3. I am currently trying to get some non-X11 xine frontend working with dxr3 ... but I am afraid that I will again face sync issues.
This is the introduction for my, superficially, simple question:

What is a stable setup / configuration to get video files played back properly on the dxr3, preferrably without needing to install X11?
MPlayer seems to be chronically struggling with A/V sync ... which is extremely ironic since the dxr3 offers one timing source for picture and audio, thus it should be far _easier_ to maintain sync. Actually, what can an application do to desynchronize? It must be malicious intent:-/
I found some posting where someone reported that some tweaks to xine config made a/v sync work, mainly enabling audio resampling to keep sync. MPlayer sync options seem to be based on dropping frames, mainly, which really does not work with the dxr3 (when I specify -framedrop, it starts dropping nearly _all_ frames).

Well, someone on this list must have a setup where video files play properly... or am I wrong?


Alrighty then,

Thomas.

PS: The don't install X11 is not a requirement, but just a preference... I like it to be able to install a minimal console system and compile dxr3player to have a working DVD playback box, that, using LIRC won't even need any Monitor connected.
I also briefly tried GeeXbox, which sounds nice from the description, but sadly seems to include incompatible em8300 drivers for the 2.6.27 kernel, which is rather ironic, given its single purpose being playback of video.
In the end... I am looking for a nice media center thingie that does work with dxr3, doesn't eat CPU, and is not centered about recording the crap that comes on TV but rather on playing stuff to it. Does that exist?


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Dxr3-devel mailing list
Dxr3-devel@...
https://lists.sourceforge.net/lists/listinfo/dxr3-devel

signature.asc (204 bytes) Download Attachment

Re: mplayer / xine dxr3 output with proper a/v sync?

by Gabor Z. Papp :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

* Thomas Orgis <thomas-forum@...>:

| So, there I am, fresh setup of a Linux system, 0.17.3 dxr3 drivers,
| no X installed, since I just want video on the TV. For playing DVDs
| I still treasure the specialized dxr3player app, which "does it
| right" for DVDs since many years now, while mplayer is battling to
| get menu support in.  What the MPlayer also is battling with is
| massive A/V desynchronization when using the dxr3.

Same problem here. B-)

But, the development version of dxr3player have a new option -M that
let play the standard mpeg2 video format with ac3 audio, so in the
meantime I'm using that. Thats a very simple option, just plays the
input without fast forward or anything else, but it keeps the A/V sync
very well.

So, here what I'm using:

mencoder -of mpeg -mpegopts format=dvd -ovc lavc -oac lavc -lavcopts acodec=ac3:vcodec=mpeg2video -ofps 25 -o $out $in &
dxr3player -x -g 2 -F -M $out

mencoder converts anything to mpeg2, then dxr3player plays the stream.
ffmpeg is a little bit faster than mencoder, but I was unable to
preserve some timestamps with it, so finally stayed with mencoder.
You need at least P3 1.3GHz CPU to convert faster the input than playing it. ;-)

| Well, someone on this list must have a setup where video files play properly... or am I wrong?

Heh, no one seen ever. Everybody posts magical options, but I was
unable to make it work since 10 years. Maybe I'm the lamer...

BTW, what cpu power do you need to play X264?

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Dxr3-devel mailing list
Dxr3-devel@...
https://lists.sourceforge.net/lists/listinfo/dxr3-devel

Re: mplayer / xine dxr3 output with proper a/v sync?

by Thomas Orgis :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Am Fri, 04 Sep 2009 12:11:39 +0200
schrieb "Gabor Z. Papp" <gzp@...>:

> * Thomas Orgis <thomas-forum@...>:

> | So, here what I'm using:
>
> | mencoder -of mpeg -mpegopts format=dvd -ovc lavc -oac lavc -lavcopts acodec=ac3:vcodec=mpeg2video -ofps 25 -o $out $in &
> | dxr3player -x -g 2 -F -M $out

Hm, why not plain pcm codec for audio? I'd gather one would like to do this on named pipes instead of using a temporary file. The latter really would be a no-go for me as the video box has limited storage and accesses the archive via network. And then, this is somehow similar to what mplayer is supposed to do internally ... supposedly a bit more efficient, alas mplayer sucks at keeping sync. Both routes seem to lack some ... fun.

> | Well, someone on this list must have a setup where video files play properly... or am I wrong?
>
> Heh, no one seen ever. Everybody posts magical options, but I was
> unable to make it work since 10 years. Maybe I'm the lamer...

This is ridiculous. Back when I started working with video editing, to analog tape in the end, even, I became aware of the sync problem. But there it was about the difficulty of keeping two different time sources in sync (system clock / video output clock and audio clock). You resample audio on the fly, problem solved. The real solution has always been having one board with audio and video output, sharing the same clock.
We have that with the dxr3 -- I cannot accept that our great open source video players simply cannot feed video/audio at the correct rate.

Hm... I wonder: Could it be an issue with audio / video frame rates that are not matching well? Or the dxr3 not being configured for the proper frame rate?
The output frame rate being fixed at 25fps (50 interlaced) for PAL or 29.7something for NTSC ... could that be an issue? That we lack some proper transformation of picture frame rate?

I don't have the overview currently how differing frame rates are handled for the dxr3, of if it can handle them at all. But even then, mplayer should be able to mangle the frame rate to match 25 / 30 fps and resample the audio if it doesn't divide evenly... or not?
Perhaps we need just some dialoge from dxr3 folks with mplayer folks to get sync right with the specialities of the hardware?
The em8300 hardware is not that useful when you cannot play generic video on it your CPU really has to be slow not to decode MPEG2... the TV output is what makes it so useful in these times.

>
> BTW, what cpu power do you need to play X264?

Well, it's a 480p (or so) file, no HD video, just using h264 codec. It played OK (perhaps some non-smooth moments during nasty scenes) with a Athlon XP at 1400MHz, using the XVideo output on a Radeon card... on dxr3 it was unable to keep basic sync, and MPlayer seemed to struggle generally... but I have now found out that it also could be just a problem of the demuxer; mplayer -demuxer mov  plays much more smoothly, although with ugly artifacts.
My new setup features a slight CPU upgrade to an Athlon XP2000 (1.7GHz), giving a bit of headroom.

I do wonder how much of HD content I could play with that box, downscaled (possibly in the decoder, saving CPU time) to normal PAL. But it's not so much of an issue, as I don't intend to ever buy into the BluRay DRM crap, or want to invest into DRM-infested HDMI gear.


Alrighty then,

Thomas.


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Dxr3-devel mailing list
Dxr3-devel@...
https://lists.sourceforge.net/lists/listinfo/dxr3-devel

signature.asc (204 bytes) Download Attachment

Re: mplayer / xine dxr3 output with proper a/v sync?

by Gabor Z. Papp :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

* Thomas Orgis <thomas-forum@...>:

| > | So, here what I'm using:
| >
| > | mencoder -of mpeg -mpegopts format=dvd -ovc lavc -oac lavc -lavcopts acodec=ac3:vcodec=mpeg2video -ofps 25 -o $out $in &
| > | dxr3player -x -g 2 -F -M $out

| Hm, why not plain pcm codec for audio?

I think, due size.

| I'd gather one would like to do this on named pipes instead of using
| a temporary file.

That was the first version, but the pipe had limitations and
dxr3player or the card buffer was unable to handle the load. After a
few minutes of playing got problems. Finally stayed with the file
version instead of pipe.

| The latter really would be a no-go for me as the video box has limited storage and accesses the archive via network. And then, this is somehow similar to what mplayer is supposed to do internally ... supposedly a bit more efficient, alas mplayer sucks at keeping sync. Both routes seem to lack some ... fun.

Nowadays a silent and big harddisk isn't an issue I think...

| > | Well, someone on this list must have a setup where video files play properly... or am I wrong?
| >
| > Heh, no one seen ever. Everybody posts magical options, but I was
| > unable to make it work since 10 years. Maybe I'm the lamer...

| We have that with the dxr3 -- I cannot accept that our great open source video players simply cannot feed video/audio at the correct rate.

I think the mplayer code itself is good, since I was able to use it
with nvidia output without sync problems. The problem is with the
mpalyer's dxr3 part.

| Hm... I wonder: Could it be an issue with audio / video frame rates that are not matching well? Or the dxr3 not being configured for the proper frame rate?
| The output frame rate being fixed at 25fps (50 interlaced) for PAL or 29.7something for NTSC ... could that be an issue? That we lack some proper transformation of picture frame rate?

mplayer reports the correct fps when playing, so dunno, I don't think so.

| The em8300 hardware is not that useful when you cannot play generic
| video on it your CPU really has to be slow not to decode
| MPEG2... the TV output is what makes it so useful in these times.

yeah

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Dxr3-devel mailing list
Dxr3-devel@...
https://lists.sourceforge.net/lists/listinfo/dxr3-devel

Re: mplayer / xine dxr3 output with proper a/v sync?

by Jan Willies :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Gabor,

2009/9/4 Gabor Z. Papp <gzp@...>
* Thomas Orgis <thomas-forum@...>:

| So, there I am, fresh setup of a Linux system, 0.17.3 dxr3 drivers,
| no X installed, since I just want video on the TV. For playing DVDs
| I still treasure the specialized dxr3player app, which "does it
| right" for DVDs since many years now, while mplayer is battling to
| get menu support in.  What the MPlayer also is battling with is
| massive A/V desynchronization when using the dxr3.

Same problem here. B-)

But, the development version of dxr3player have a new option -M that

How did you manage to compile the development version of dxr3player? I'm stuck at the actual Makefile. Here's what I did:

cvs -d:pserver:anonymous@...:/cvsroot/dxr3player login
cvs -z3 -d:pserver:anonymous@...:/cvsroot/dxr3player co -P dxr3player

cd dxr3player
aclocal
autoconf

cp /usr/share/automake-1.11/{install-sh,config.sub,config.guess} .
for i in `find ./ -name Makefile.am`; do cp $i `echo $i|sed 's/am$/in/'`; done

./configure --with-em8300=/usr/local/src/em8300/ --with-lirc=/usr --with-ffmpeg=/usr --with-mad=/usr

And now I'm stuck. My distro doesn't have cvs2cl, but when I remove it from the Makefile it doesn't compile anything anyway.


 - jan

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Dxr3-devel mailing list
Dxr3-devel@...
https://lists.sourceforge.net/lists/listinfo/dxr3-devel

Re: mplayer / xine dxr3 output with proper a/v sync?

by Gabor Z. Papp :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

* Jan Willies <jan@...>:

| How did you manage to compile the development version of dxr3player? I'm
| stuck at the actual Makefile. Here's what I did:

| cd dxr3player
| aclocal
| autoconf

| cp /usr/share/automake-1.11/{install-sh,config.sub,config.guess} .
| for i in `find ./ -name Makefile.am`; do cp $i `echo $i|sed 's/am$/in/'`;
| done

Instead of this cp and find game, run automake with the proper options:

$ cd dxr3player
$ aclocal
$ autoheader
$ automake --add-missing --copy
$ autoconf

| ./configure --with-em8300=/usr/local/src/em8300/ --with-lirc=/usr
| --with-ffmpeg=/usr --with-mad=/usr

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Dxr3-devel mailing list
Dxr3-devel@...
https://lists.sourceforge.net/lists/listinfo/dxr3-devel

Re: mplayer / xine dxr3 output with proper a/v sync?

by Jan Willies :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Gabor,

Am 04.09.2009 14:43, schrieb Gabor Z. Papp:
> Instead of this cp and find game, run automake with the proper options:
>
> $ cd dxr3player
> $ aclocal
> $ autoheader
> $ automake --add-missing --copy
> $ autoconf

Thanks. I'm not familiar with autotools, obviously.

Although it doesn't compile for me:

Making all in dxr3player
make[3]: Entering directory
`/usr/local/src/dxr3player/dxr3player/src/dxr3player'
../../cxxld.sh  -g -O2 -Wall -W -include
/usr/local/src/dxr3player/dxr3player/config.h -fno-rtti -fno-exceptions
-L/usr/lib  -o dxr3player Player.o DXR3Player.o Coordinator.o
MPEGPlayer.o dxr3player.o ../lib/dvd/reader/libdvd_reader.a
../lib/dvd/vm/libdvd_vm.a ../lib/dvd/demux/libdvd_demux.a
../lib/dvd/libdvd.a ../lib/media/libmedia.a ../lib/sched/libsched.a
../lib/input/libinput.a ../lib/output/liboutput.a
../lib/output/dxr3/liboutput_dxr3.a ../lib/dxr3/libdxr3.a
../lib/output/liboutput.a  ../lib/dvd/packet/libdvd_packet.a
../lib/dvd/spu/libdvd_spu.a ../lib/ifodump/libifodump.a
../lib/buffer/libbuffer.a ../lib/util/libutil.a
../../libmpdvdkit/libmpdvdkit.a ../../liba52/liba52.a -L/usr/lib
-llirc_client -L/usr/lib -lmad -lm  -lavformat -lavcodec -lswscale
-lavutil  -lfaad -lz -lm -lpthread
../lib/output/liboutput.a(FFMpegAudioDecoder.o): In function
`output::FFMpegAudioDecoder::decodePacket(unsigned char const*, unsigned
int, unsigned long long)':
/usr/local/src/dxr3player/dxr3player/src/lib/output/FFMpegAudioDecoder.cc:69:
undefined reference to `ffmpeg::Decoder::decodeAudioData(short*,
unsigned int, unsigned char const*, unsigned int) const'
collect2: ld returned 1 exit status
make[3]: *** [dxr3player] Error 1

Dunno what's the problem here, maybe different ffmpeg-versions?

ffmpeg-0.5 and gcc-4.4.1 here.


  - jan

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Dxr3-devel mailing list
Dxr3-devel@...
https://lists.sourceforge.net/lists/listinfo/dxr3-devel

Re: mplayer / xine dxr3 output with proper a/v sync?

by Gabor Z. Papp :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

* Jan Willies <jan@...>:

| Although it doesn't compile for me:

| Making all in dxr3player
| make[3]: Entering directory
[...]
| ../lib/output/liboutput.a(FFMpegAudioDecoder.o): In function
| output::FFMpegAudioDecoder::decodePacket(unsigned char const*,
| unsigned int, unsigned long long)':
| /usr/local/src/dxr3player/dxr3player/src/lib/output/FFMpegAudioDecoder.cc:69:
| undefined reference to `ffmpeg::Decoder::decodeAudioData(short*,
| unsigned int, unsigned char const*, unsigned int) const'
| collect2: ld returned 1 exit status
| make[3]: *** [dxr3player] Error 1

| Dunno what's the problem here, maybe different ffmpeg-versions?

| ffmpeg-0.5 and gcc-4.4.1 here.

Skip out --with-ffmpeg, dxr3player has its own version that compiles
with the app.

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Dxr3-devel mailing list
Dxr3-devel@...
https://lists.sourceforge.net/lists/listinfo/dxr3-devel

Re: mplayer / xine dxr3 output with proper a/v sync?

by Jan Willies :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Gabor,

Am 04.09.2009 15:05, schrieb Gabor Z. Papp:

> * Jan Willies<jan@...>:
>
> | Although it doesn't compile for me:
>
> | Making all in dxr3player
> | make[3]: Entering directory
> [...]
> | ../lib/output/liboutput.a(FFMpegAudioDecoder.o): In function
> | output::FFMpegAudioDecoder::decodePacket(unsigned char const*,
> | unsigned int, unsigned long long)':
> | /usr/local/src/dxr3player/dxr3player/src/lib/output/FFMpegAudioDecoder.cc:69:
> | undefined reference to `ffmpeg::Decoder::decodeAudioData(short*,
> | unsigned int, unsigned char const*, unsigned int) const'
> | collect2: ld returned 1 exit status
> | make[3]: *** [dxr3player] Error 1
>
> | Dunno what's the problem here, maybe different ffmpeg-versions?
>
> | ffmpeg-0.5 and gcc-4.4.1 here.
>
> Skip out --with-ffmpeg, dxr3player has its own version that compiles
> with the app.

Thanks again, works like a charm.


  - jan

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Dxr3-devel mailing list
Dxr3-devel@...
https://lists.sourceforge.net/lists/listinfo/dxr3-devel

Re: mplayer / xine dxr3 output with proper a/v sync?

by Thomas Orgis :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Am Fri, 04 Sep 2009 12:11:39 +0200
schrieb "Gabor Z. Papp" <gzp@...>:

> BTW, what cpu power do you need to play X264?

Let's hook in there again... I have looked at problematic files again and it really seems like they share on common treat:
They are encoded in h264! There are different steps of evil, matroska containers being beyond repair, while some other files can be played, at least with somewhat proper sync, using mplayer -demuxer mov.

Also, The "new sync code", used by

mplayer -vo dxr3:sync

Makes it even worse... there is no video flow at all. Only short sequences with pauses. Also, these problematic files share certain error messages given by mplayer... so I suspect it's indeed more of a decoder bug (combined with failure to compensate in the dxr3 driver... I'll check with an X11-enabled mplayer if the sync is proper there).

I installed xine now, also with X support (fbxine just plainly refuses to run with dxr3 output, I came so far to get to the error message that it cannot encode mpeg1 ...); it simply crashes when trying to play something.
The xine logo appears on the TV screen just fine... just playback is broken. Maybe some magic flags during compile might help that, but also the xine build in sidux (debian sid... or some multimedia repo, perhaps) crashed that way.

I still don't have my happy setup... also, I think I remember the mplayer errors not being present when playing the h264 files via X11... so it still can be something special to the way dxr3 is handled... and so a relevant problem to this list.
I'd still be interested in hearing from someone who has a nicely working setup for playing any media on dxr3 with linux... without re-encoding the files (having to guess framerate, aspect ratio ... extracting subtitles...?)


Alrighty then,

Thomas.


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Dxr3-devel mailing list
Dxr3-devel@...
https://lists.sourceforge.net/lists/listinfo/dxr3-devel

signature.asc (204 bytes) Download Attachment