LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 07-06-2011, 10:18 AM   #1
william.l.metcalf
LQ Newbie
 
Registered: Jul 2011
Posts: 1

Rep: Reputation: Disabled
Playing raw video with mplayer on Ubuntu 10.04


I am in the process of writing a program that reads in video frames from a capture card. For now, I am taking those raw video frames and writing them to a file. I am trying to play those files with mplayer and I am running into issues. The video that plays is slowly and continuously scrolling vertically. The video seems to be playing correctly, i.e. I don't see any big loss of frames or anything like that other than the video scrolling vertically.

To play the video I am using the following command:

wmetcalf@wmetcalf-desktop:~/Desktop/Linux/Samples/bin/i386$ mplayer /home/wmetcalf/Desktop/video.raw -demuxer rawvideo -rawvideo ntsc:uyvy

The following is output before the video plays:

MPlayer SVN-r1.0~rc3+svn20090426-4.4.3 (C) 2000-2009 MPlayer Team
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 /home/wmetcalf/Desktop/video.raw.
rawvideo file format detected.
open: No such file or directory
[MGA] Couldn't open: /dev/mga_vid
open: No such file or directory
[MGA] Couldn't open: /dev/mga_vid
[VO_TDFXFB] Can't open /dev/fb0: Permission denied.
[VO_3DFX] Unable to open /dev/3dfx.
==========================================================================
Opening video decoder: [raw] RAW Uncompressed Video
VDec: vo config request - 720 x 480 (preferred colorspace: Packed UYVY)
Could not find matching colorspace - retrying with -vf scale...
Opening video filter: [scale]
VDec: using Packed UYVY as output csp (no 0)
Movie-Aspect is undefined - no prescaling applied.
SwScaler: reducing / aligning filtersize 1 -> 4
Last message repeated 1 times
SwScaler: reducing / aligning filtersize 1 -> 1
SwScaler: reducing / aligning filtersize 9 -> 8
[swscaler @ 0x92f5bf0]BICUBIC scaler, from uyvy422 to yuv420p using MMX2
[swscaler @ 0x92f5bf0]using 4-tap MMX scaler for horizontal luminance scaling
[swscaler @ 0x92f5bf0]using 4-tap MMX scaler for horizontal chrominance scaling
[swscaler @ 0x92f5bf0]using 1-tap MMX "scaler" for vertical scaling (YV12 like)
[swscaler @ 0x92f5bf0]720x480 -> 720x480
VO: [xv] 720x480 => 720x480 Planar YV12
Selected video codec: [rawuyvy] vfm: raw (RAW UYVY)
==========================================================================
Audio: no sound
Starting playback...
V: 4.8 121/121 0% 8% 0.0% 0 0
Exiting... (Quit)

I am thinking that maybe I have some kind of colorspace parameter wrong or something like that, but I am not exactly sure how to figure out what colorspace I need to use. I am pretty new to messing with RAW video so any help you can provide would be very appreciated!

-William
 
Old 07-07-2011, 12:24 PM   #2
teckk
LQ Guru
 
Registered: Oct 2004
Distribution: Arch
Posts: 5,137
Blog Entries: 6

Rep: Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826
Here is what the man page says on it if it helps.

Code:
 -rawvideo <option1:option2:...>
              This option lets you play raw video files.  You have to use -de-
              muxer rawvideo as well.

              Available options are:

                 fps=<value>
                      rate in frames per second (default: 25.0)
                 sqcif|qcif|cif|4cif|pal|ntsc
                      set standard image size
                 w=<value>
                      image width in pixels
                 h=<value>
                      image height in pixels
                 i420|yv12|yuy2|y8
                      set colorspace
                 format=<value>
                      colorspace  (fourcc)  in  hex  or  string constant.  Use
                      -rawvideo format=help for a list of possible strings.
                 size=<value>
                      frame size in Bytes

              EXAMPLE:
                 mplayer foreman.qcif -demuxer rawvideo -rawvideo qcif
                      Play the famous "foreman" sample video.
                 mplayer  sample-720x576.yuv   -demuxer   rawvideo   -rawvideo
                 w=720:h=576
                      Play a raw YUV sample.
 
  


Reply



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
mplayer crashes on playing HQ video duryodhan Slackware 2 03-05-2008 02:12 AM
mplayer + ivtv + raw video input = green and garbled? grooveharder Linux - Software 0 05-18-2007 05:40 PM
Playing video in MPlayer embedded video player and Mozilla fc6_user Linux - Desktop 22 04-02-2007 12:59 PM
ubuntu 5.10 x86_64: mplayer/xine/... stop playing video after a couple of frames Tinkster Ubuntu 2 01-10-2006 01:13 PM
mplayer not playing video pankajmathur Linux - Software 1 05-12-2003 01:56 PM

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

All times are GMT -5. The time now is 12:23 PM.

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