Showing posts with label xine. Show all posts
Showing posts with label xine. Show all posts

Sunday, November 16, 2008

playing Tokyo Reality in 1080p

The guys at Akihabara News got their hands on a Canon EOS 5D Mark II and produced some beautiful (though shakey) video while running and gunning around Tokyo:


The video is on Vimeo, but the guys kindly also made the 1080p source available here. I downloaded the gigantic 1.8GB Torrent from here. That is 1.8GB for six minutes and ten seconds of video. Wow!

Linux Playback
I wanted to see which media players could handle such a large file. Here were my results on my Fedora 7 x86-64 system:
- dual quad core, 1.6Ghz
- 2GB
- NVidia 8800GT dual head system with twin Dell FP1905 monitors

mplayer played the file cleanly if the application window was stretched to a max of about 1400 pixels wide. Any wider, and mplayer would stutter.

xine couldn't play the file as it seems I do not have the correct codec installed. I got the dreaded "file uses an unsupported codec" error:


ffplay played it with slight audio stutters and the following error:
[mpeg4aac @ 0x3947e23ca0]faac: frame decoding failed: Gain control not yet implemented

I will have to investigate this.

Update 2008/11/23
Reviewing Google for this error, most of the suggestions for fixing the problem state that you should have the latest version of faad2/faac. According to the developer at www.audiocoding.com, I do:
faac x86_64 1.26-3.fc9 installed 182 k
faac-devel x86_64 1.26-3.fc9 installed 49 k
faad2 x86_64 1:2.6.1-10.fc9 installed 344 k
faad2-devel x86_64 1:2.6.1-10.fc9 installed 414 k


So, I'm at a loss why these messages are occurring.
end update

I converted Tokyo Reality using mjpeg as the video compression method:
ffmpeg -i Tokyo-Reality-h264-1080p.mp4 -b 3000k -vcodec mjpeg -ab 256k -ar 44100 -acodec mpeg4aac -coder 1 -flags +loop -cmp +chroma -partitions +parti4x4+partp8x8+partb8x8 -me hex -subq 5 -me_range 16 -g 250 -keyint_min 25 -sc_threshold 40 -i_qfactor 0.71 tokyo.mp4

On my Dell SC1430, 1.6Ghz with eight cores, the conversion took about the same time as the file was long, about 6 minutes, 10 seconds. The size of the original was 1.8GB; the size of the conversion was 1.6GB. Not much difference there.

Update 2008/11/22
I compared the output of the original to the output of the MJPEG conversion. On the left of the below screengrab is the original from Akihabara. On the right is my conversion. You'll notice that the converted image on the right is slightly more saturated than the one on the left. I'll have to play with the conversion parameters to get the colors a little more like the original.

end update

When I replayed this video, within about four minutes, I exhausted 2GB of RAM and 4GB of swap. Holy crap! The normal Cinelerra editing functions (cutting/pasting) did not exacerbate this memory issue. Only the replay function seemed to suck up all my memory:


The replay was a little choppy at the beginning, but ran at 30fps. However, as RAM filled up, playback performance dropped to 12fps, as RAM was exhausted and swap was being utilized. Once swap was exhausted, the entire box locked up! Scary!!

Update 2008/11/17
I had been planning on upgrading my system to Fedora 9 and the above memory leak was enough for me to say "fuck it" and just do the upgrade. Upgrades are increasingly complex as I've added four RAID drives to my setup. Well, just when you think it is going to be a nightmare, along comes Fedora and actually made the process pretty seemless. Within two hours, I had Fedora 9 installed, all my Cinelerra source dependencies installed, Cinelerra compiled and up and running. Of course, this is from a guy who has been doing this for how many years now? But still..two hours..I hardly believe it myself.

The icing on the cake is that my memory leak is no longer present! The below chart show CPU utilization and memory while the video plays:


So far, the system is much more responsive than the old Fedora 7, 64-bit. I guess I had some old/outdated/corrupted libraries in there. Now playback of Tokyo Reality in Cinelerra is more consistent, albeit at a slower 19fps.
end update

MacBook Pro Playback
I next copied the file to my 2GB, dual core Intel 2.2Ghz MacBook Pro 17". I attached my 42inch display to the second head on the MacBook's video card. The file played in QuickTime. It played without errors when I manually enlarged the Quicktime window to fill the screen; however, QuickTime stuttered when the video was maximized to Full Screen using the 42" monitor as the output display.

Finally, I tried to play the file on my MediaGate to absolutely no avail.

So, it looks like the only reliable players are mplayer on Fedora 7 and QuickTime on my MacBook Pro.

I think I need to upgrade my Fedora 7 system to a newer OS. Hopefully, a more recent OS and supporting encoders/decoders will do a better job of playing these large files back.

The Mule

Friday, February 22, 2008

Xine install on Fedora 7 x86-64

Another reason to dump FreshRPMs. I wanted to Xine on my Fedora 7, x86-64 system and got the following error:
Error: Missing Dependency: xine-lib = 1.1.7 is needed by package xine-lib-moles

Yuck. Upon investigation, it looks like FreshRPMs were screwing me up:
http://forums.fedoraforum.org/showthread.php?t=179979
http://forums.fedoraforum.org/showthread.php?t=180425

I was using FreshRPMs because they had previously worked on my Fedora Core 6 install:
/2007/06/xine-no-demuxer-plugin-available-to.html

Now that I was on Fedora 7, things had changed and those FreshRPM packages were no longer good. Specifically, I had some xine-lib packages installed from FreshRPMs which conflicted with either the Livna or Fedora base packages. I removed them:
[root@ogre ~]# yum remove xine-lib
=============================================================================
Package Arch Version Repository Size
=============================================================================
Removing:
xine-lib x86_64 1.1.6-2.fc7 installed 3.9 M

Removing for dependencies:
xine-lib-devel x86_64 1.1.6-2.fc7 installed 649 k

xine-lib-extras-nonfree x86_64 1.1.7-1.lvn7 installed 1.1 M


I then installed xine from only the Fedora base and Livna repositories:
[root@ogre ~]# yum install xine --disablerepo freshrpms
Loading "installonlyn" plugin

Setting up
Install Process
Parsing package install arguments
Resolving Dependencies
-->
Running transaction check
--->
Package xine.x86_64 0:0.99.5-1.lvn7 set to be updated
-->
Processing Dependency: libxine.so.1()(64bit) for package: xine
-->
Restarting Dependency Resolution with new changes.
-->
Running transaction check
--->
Package xine-lib.x86_64 0:1.1.10.1-1.fc7 set to be updated

Dependencies Resolved
=============================================================================
Package Arch Version Repository Size
=============================================================================
Installing:
xine x86_64 0.99.5-1.lvn7 livna 1.6 M
Installing for dependencies:
xine-lib x86_64 1.1.10.1-1.fc7 updates 2.3 M

Transaction Summary

=============================================================================

Install 2 Package(s)

Update 0 Package(s)

Remove 0 Package(s)

Total download size: 3.8 M
Is this ok [y/N]: y
Downloading Packages:
(1/2): xine-0.99.5-1.lvn7 100% |=========================| 1.6 MB 00:02
(2/2): xine-lib-1.1.10.1- 100% |=========================| 2.3 MB 00:02

Running Transaction Test

Finished Transaction Test
Transaction Test Succeeded

Running Transaction

Installing:xine-lib ######################### [1/2]

Installing: xine ######################### [2/2]
Installed: xine.x86_64 0:0.99.5-1.lvn7
Dependency Installed: xine-lib.x86_64 0:1.1.10.1-1.fc7

Complete!


Testing the xine install with "xine-check", I got this error:
[root@ogre ~]# xine-check
[ hint ] No xine-config found. Assuming xine from RPMs The xine-config script can be used to determine some file locations used by xine-lib, but you don't have such a script on your system. However, it looks like you installed xine from the RedHat packages. So I'll just guess that you are using the standard locations. If you want me to be sure about those file locations, you can install the 'xine-lib-devel' package (or 'xine-devel', depend on what packages you're using, which contains xine-config. However, this package is not really needed to run xine... press to continue...

Doing what the man says, I installed xine-lib-devel from Fedora Updates:
[root@ogre ~]# yum install xine-lib-devel --disablerepo freshrpms
=============================================================================
Package Arch Version Repository Size
============================================================================= Installing:
xine-lib-devel i386 1.1.10.1-1.fc7 updates 282 k
xine-lib-devel x86_64 1.1.10.1-1.fc7 updates 282 k
Installing for dependencies:

xine-lib i386 1.1.10.1-1.fc7 updates 2.6 M


When I ran xine-check again, I no longer received that error. Good. But when I started up xine to play a test mpeg video, I got the dreaded error:
There is no demuxer plugin available to handle "file:/usr/share/xine/skins/xine-ui_logo.mpv".
Usually this means the file format was not recognized.


Hmm. I listed the packages I installed and found that I didn't have the "xine-lib-extras" packages installed. Specifically, the "xine-lib-extras-nonfree" one from Livna:
[root@ogre ~]# rpm -qa | grep xine
xine-lib-devel-1.1.10.1-1.fc7
xine-0.99.5-1.lvn7
xine-lib-1.1.10.1-1.fc7
xine-lib-devel-1.1.10.1-1.fc7
xine-lib-arts-1.1.10.1-1.fc7

xine-lib-1.1.10.1-1.fc7


I then installed "xine-lib-extras-nonfree" from Livna:
=============================================================================
Package Arch Version Repository Size
============================================================================= Installing:
xine-lib-extras-nonfree x86_64 1.1.10.1-1.lvn7 livna 558 k


Transaction Summary
=============================================================================
Install 1 Package(s) Update 0 Package(s) Remove 0 Package(s)


Happily, my mpeg video played! Also, an x264 video played. Great!
So it looks like the Livna "nonfree" package is responsible for this joy. Thanks, Livna!

The lesson here folks is that you have to watch your libraries. And stay away from FreshRPMs, if at all possible.

CM

Saturday, June 09, 2007

xine: no demuxer plugin available to handle file

I recently installed xine on my Fedora Core 6 virtual machine. Trying to view a file, I get this error:
There is no demuxer plugin available to handle "file xxx"
Usually this means that the file format was not recognized.



After a bit of googling, I found that this error can be caused by a couple things:
1) a corrupted .xine/catalog.cache file
2) a bad xine-libs install

I also learned that you can run "xine-check" to check out your xine installation. Here's the result of my xine-check before fixing things:
[root@localhost ~]# xine-check
Please be patient, this script may take a while to run...
[ good ] you're using Linux, doing specific tests
[ good ] looks like you have a /proc filesystem mounted.
[ good ] You seem to have a reasonable kernel version (2.6.18-1.2798.fc6)
[ good ] intel compatible processor, checking MTRR support
[ good ] you have MTRR support and there are some ranges set.
[ good ] found the player at /usr/bin/xine
[ good ] /usr/bin/xine is in your PATH
[ hint ] No xine-config found. Assuming xine from RPMs
The xine-config script can be used to determine some file locations
used by xine-lib, but you don't have such a script on your system.
However, it looks like you installed xine from the RedHat packages.
So I'll just guess that you are using the standard locations.
If you want me to be sure about those file locations, you can install
the 'xine-lib-devel' package (or 'xine-devel', depend on what packages
you're using, which contains xine-config. However, this package is
not really needed to run xine...
press to continue...

[ good ] plugin directory /usr/lib/xine/plugins exists.
[ good ] found unknown plugin: *.so
[OUCH!!] There are no input plugins.
xine needs at least one input plugin, but none is installed.
You should probably reinstall xine-lib...
press to continue...

[OUCH!!] There are no demux plugins.
xine needs at least one demux plugin, but none is installed.
You should probably reinstall xine-lib...
press to continue...

[OUCH!!] There are no decoder plugins.
xine needs at least one decoder plugin, but none is installed.
You should probably reinstall xine-lib...
press to continue...

[OUCH!!] There are no video_out plugins.
xine needs at least one video_out plugin, but none is installed.
You should probably reinstall xine-lib...
press to continue...

[OUCH!!] There are no audio_out plugins.
xine needs at least one audio_out plugin, but none is installed.
You should probably reinstall xine-lib...
press to continue...


OK! So it looks like I have a few problems. But now, at least, I had two avenues to pursue:
1) delete .xine/catalog.cache
2) reinstall xine and xine-libs

I tried the first option, but to no avail. I got the same error.

Secondly, I reinstalled xine-libs, but still received the same error. Since I've had some yum repository conflicts this weekend, I started thinking that Livna or Dries might be at fault here, as they are my main repositories.

So then, I decided to:
1) remove xine and xine-libs
2) try to install xine without the Livna repos online.

Doing this, I got this error with only the Fedora and Dries repos online:
Error: Missing Dependency: xine-lib = 1.1.4 is needed by package xine-lib-moles

Hmmm. OK, so that didn't work. Let me try the next option:
1) remove xine and xine libs
2) install the Freshrpms repositories
3) rerun the install without Livna, but with Dries and Freshrpms

I installed the Freshrpms repos by using the below URL to start the yum graphical installer widget on the Core 6 desktop:
http://ftp.freshrpms.net/pub/freshrpms/fedora/linux/6/freshrpms-release/freshrpms-release-1.1-1.fc.noarch.rpm

After Freshrpms repos were online, I disabled Livna in my yum install request:
[root@localhost ~]# yum install --disablerepo=livna xine
Loading "installonlyn" plugin
Setting up Install Process
Setting up repositories
freshrpms 100% ========================= 2.1 kB 00:00
Reading repository metadata in from local files
primary.xml.gz 100% ========================= 62 kB 00:00
################################################## 168/168
Parsing package install arguments
...
Dependencies Resolved

=======================================
Package Arch Version Repository Size
=======================================
Installing:
xine i386 0.99.5-1.fc6 freshrpms 2.2 M
Installing for dependencies:
libfame i386 0.9.1-12.fc6.rf dries 227 k
xine-lib-moles i386 1.1.6-1.fc6 freshrpms 1.8 M

Transaction Summary
=======================================
Install 3 Package(s)
Update 0 Package(s)
Remove 0 Package(s)

Total download size: 4.3 M
Is this ok [y/N]: y
Downloading Packages:
(1/3): xine-0.99.5-1.fc6. 100% ========================= 2.2 MB 00:21
(2/3): libfame-0.9.1-12.f 100% ========================= 227 kB 00:01
(3/3): xine-lib-moles-1.1 100% ========================= 1.8 MB 00:17
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Installing: libfame ######################### [1/3]
Installing: xine-lib-moles ######################### [2/3]
Installing: xine ######################### [3/3]

Installed: xine.i386 0:0.99.5-1.fc6
Dependency Installed: libfame.i386 0:0.9.1-12.fc6.rf xine-lib-moles.i386 0:1.1.6-1.fc6
Complete!


This time, no missing dependency! Looks like Freshrpms had the necessary files! Sweet! Now for the final test, to play a video. Sure enough, my videos played and xine-check found my plugins. Hooray. But yeesh..what a headache!

So, the lesson here is that Fedora dependency resolution can be a tricky thing and that you should keep as few repos in your yum repository list as possible. This will minimize your pain. Though I must admit that, on the whole, the repos are doing a better job than they used to.

Finally, if the options above don't work, try compiling from source:
http://www.xinehq.de/index.php/download

May you all be blessed to work with just one repository. Ha!

Update 2/25/2008
This latest post provides further troubleshooting steps. It lists specific information regarding Xine installs on Fedora 7, x86-64:

/2008/02/xine-install-on-fedora-7-x86-64.html