mplayer snapshot commands not working

 
Thread Tools Search this Thread
Special Forums UNIX and Linux Applications mplayer snapshot commands not working
# 1  
Old 04-30-2012
mplayer snapshot commands not working

About 8-12 months ago I wrote a script that pulled together several mplayer commands to perform various activities. One allowed me to press the s-key to take snapshots with my webcam. Useful for recording the sensors I build.
Now it:
Code:
vd=0
bash-4.1$ TV1="-tv driver=v4l2:device=/dev/video${vd}:width=320:height=240"
bash-4.1$ TV2="norm=NTSC:chanlist=us-cable:input=0:noaudio:outfmt=i420"
bash-4.1$ OUT="-fps 30 -cache 128"
bash-4.1$ PIC="-hue 0  -brightness 0  -contrast 0  -saturation 0 -aspect 4:3"
bash-4.1$ mplayer tv:// $TV1:$TV2 $OUT $PIC -vf screenshot -vo xv,x11

no longer works under Slackware 13.37 and mplayer (phonon-mplayer-20101213-i486-1).

I scanned the web for working commands and what I found also does not work:
Code:
1) mplayer tv:// -tv driver=v4l2:width=640:height=480:outfmt=rgb24:device=/dev/video0 -fps 15 -vo png
2) mplayer tv:// -tv driver=v4l2:device=/dev/video0 -vo png:z=9 -frames 1
3) mplayer -vo png -frames 1 tv://
4) mplayer tv:// -vf-pre pp=hb:a/vb:a/dr:a/al:a,hqdn3d -tv   driver=v4l2:device=/dev/video0:width=640:height=480:noaudio

Most yielded:
Code:
tv.c: norm_from_string(pal): Bogus norm parameter, setting default.
v4l2: ioctl enum norm failed: Invalid argument
Error: Cannot set norm!
Selected input hasn't got a tuner!
v4l2: Cannot get fps
v4l2: ioctl set mute failed: Invalid argument
v4l2: ioctl query control failed: Invalid argument
Cannot find codec matching selected -vo and video format 0x31384142.

My initial command produces:
Code:
v4l2: your device driver does not support VIDIOC_G_STD ioctl, VIDIOC_G_PARM was used instead.
Selected device: SN9C1xx PC Camera
 Capabilities:  video capture  read/write  streaming
 supported norms:
 inputs: 0 = Camera;
 Current input: 0
 Current format: unknown (0x31384142)
tv.c: norm_from_string(NTSC): Bogus norm parameter, setting default.
v4l2: ioctl enum norm failed: Invalid argument
Error: Cannot set norm!
Selected input hasn't got a tuner!
v4l2: Cannot get fps
v4l2: ioctl set mute failed: Invalid argument
v4l2: ioctl query control failed: Invalid argument
v4l2: ioctl query control failed: Invalid argument
v4l2: ioctl query control failed: Invalid argument
v4l2: ioctl query control failed: Invalid argument
Opening video filter: [screenshot]
==========================================================================
 Cannot find codec matching selected -vo and video format 0x31384142.
==========================================================================

v4l2: select timeout
v4l2: ioctl set mute failed: Invalid argument
v4l2: 0 frames successfully processed, 1 frames dropped.

for vd=1 as well.
I am currently using Slackware 13.37. Under 13.0 there was a problem of /dev/video0 and /dev/video1 getting assignments exchanged on different boots. Since the webcam should not have a tuner that error is suspicious.
The video format 0x31384142 is not one which I have seen before. The inability to set norm to NTSC and getting fps is also questioned.
Anyone see a failing? Suggestions & comments welcomed.

Last edited by Corona688; 04-30-2012 at 12:49 PM..
# 2  
Old 06-20-2012
it also depend on the version and what sought of commands you are giving
This is what I don`t get. you installed Mplayer by ppa ,so all those packages marked with the red dot in theory Another point is my distro is not a normal 8.04 , it is built especially for the machine I`m using. mainframe application modernization I run a Reelbox which is a multimedia kinda pc and there are some extra packages added which a normal 8.04 wouldn`t have.

Last edited by timitiwinkle; 06-24-2012 at 10:57 AM..
# 3  
Old 06-22-2012
I won't attempt to understand how Reelbox is created/configured as I have enough with Slackware. I think we can both be confident that the respective boxes are properly built and configured. If we accept that I am curious what results U obtained from running any/all of the 5 Mplayer commands as I have been told each works and that the unnumbered one which I listed did work on my earlier version. I suspect the numbered versions were used with web cams and a filled out configuration file. I am running with no command options being available from the system directed /etc/mplayer/mplayer.conf nor users .mplayer/conf (except for alang, slang, (each is =en) and cache=8192 configuration files. Thanx
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Solaris

Tilde commands not working

Hi I have a script that it sends emails to various recipients using mailx, but some of the recipients should be sent as BCC, but ~b flag when used in the following line, does not put the gmail address as BCC: echo "node $output is down" | mailx -s "$output not pinging" sadf@xyz.com ~b... (8 Replies)
Discussion started by: fretagi
8 Replies

2. Shell Programming and Scripting

Commands not working with ssh remote login

Hi Friends, I am unable to run our application commands on remote server using ssh (passwordless login enabled). But the same command running with telent perl script. please suggest. SSH: C:/bin>ssh -l monitor tl04cp01 exec "/home/monitor/123" /home/monitor/123: viewlog: not found. ... (7 Replies)
Discussion started by: suresh3566
7 Replies

3. Shell Programming and Scripting

Sftp commands not working in shell script

hi, i am having 2 linux boxes as source and 1 linux box as destination.i want to create a shell script containing code to transfer a csv file from either of the 2 linux boxes (file will be present in just one box, i need to check both the boxes to see which box has the csv file) to 3rd linux box... (1 Reply)
Discussion started by: linuxlearn2013
1 Replies

4. Shell Programming and Scripting

SED sub commands in KSH not working for me

I am using SED to edit a file (called file) the file contains the word "ERROR" and I want to use SED to: 1. Search for text "ERROR" If found, 2. Append new line with text "hoi" I tried: sed 's/ERROR/ a\hoi' file sed 's/ERROR/ a\ hoi' file I get all the time the error sed:... (7 Replies)
Discussion started by: Alex400
7 Replies

5. Shell Programming and Scripting

Commands not working in script file

Hi All, I have created a shell script having some general copying and moving commands. Commands are working fine in Shell but while executing the shell script it is showing an error mv: cannot stat `/apps/orarpt/in/*': No such file or directory command is mv $IN_DIR* $ARCHIVE_DIR where... (5 Replies)
Discussion started by: maindola.amit
5 Replies

6. Fedora

wall and write commands are not working

hi friends i am using fedora linux operating system on the server and two clients(with windows os) are connected to it(server ).but here wall and write cmds are not working to send messages from one system to another system . pls help me (4 Replies)
Discussion started by: sankar_vitam
4 Replies

7. UNIX for Advanced & Expert Users

commands not working if the executed from forked process

Hi, I have an application where if it runs indivisually could able to execute commands (like system("ls")) and could able to execute tcl script. Same application if started from health monitor process (From health monitor process my application will be forked), it could not execute the... (1 Reply)
Discussion started by: chandrutiptur
1 Replies

8. UNIX for Advanced & Expert Users

commands after .profile modification not working

Hi , I have modified .profile and after that i ran it as .profile. Now no command i working even ls is not working When i type ls , it is showing that -ksh not found I tried to run as . $home/.profile , it is saying as permission denied . How can we do that .. any idea.. Thanks... (2 Replies)
Discussion started by: arunkumar_mca
2 Replies

9. Shell Programming and Scripting

How to get shell commands working through ruby?

Hi all, I am a newbie currently trying to execute shell commands from ruby instead of a shell script.(This method is conceived only for solaris so no issues with porting to other OS and all) Eg: Consider the command 'ls" with a shell script ,I would use it like this bash# ls <all the... (4 Replies)
Discussion started by: wrapster
4 Replies

10. UNIX for Dummies Questions & Answers

differnce between working of at and crontab commands

h I would like to know the differnce (both working and how) between at command and crontab.. Thanks in advance Satish D (2 Replies)
Discussion started by: doddas
2 Replies
Login or Register to Ask a Question