ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
All information is being posted to the script from an HTML file...
I try running it this way but I keep on getting this feed pack from mplayer:
Code:
Final Command:/usr/local/bin/mplayer -vo null -ao null -frames 0 -nosound -identify '/home/jeremiah/testVideo/test.mkv'
MPlayer 1.0pre6-3.3.3 (C) 2000-2004 MPlayer Team
CPU: Intel Celeron 2/Pentium III Coppermine,Geyserville (Family: 6, Stepping: 6)
Detected cache-line size is 32 bytes
CPUflags: MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 0
Compiled for x86 CPU with extensions: MMX MMX2 SSE
Playing /home/jeremiah/testVideo/test.mkv.
Exiting... (End of file)
If I run the same command in the commandline I get desired output. Is there something that I am missing that is preventing me from achieving this?
Also is it possible to do threading in php?
MPlayer 1.0pre6-3.3.3 (C) 2000-2004 MPlayer Team
CPU: Intel Celeron 2/Pentium III Coppermine,Geyserville (Family: 6, Stepping: 6)
Detected cache-line size is 32 bytes
CPUflags: MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 0
Compiled for x86 CPU with extensions: MMX MMX2 SSE
77 audio & 186 video codecs
Failed to open /dev/rtc: Device or resource busy (it should be readable by the user.)
Playing /home/jeremiah/testVideo/test.mkv.
ID_VIDEO_ID=0
[mkv] Track ID 1: video (V_MS/VFW/FOURCC), -vid 0
ID_AUDIO_ID=0
ID_AID_0_LANG=eng
[mkv] Track ID 2: audio (A_AAC/MPEG4/LC/SBR), -aid 0, -alang eng
ID_AUDIO_ID=1
ID_AID_1_LANG=jpn
[mkv] Track ID 3: audio (A_AAC/MPEG4/LC/SBR), -aid 1, -alang jpn
ID_SUBTITLE_ID=0
ID_SID_0_LANG=eng
[mkv] Track ID 4: subtitles (S_TEXT/SSA), -sid 0, -slang eng
[mkv] Will play video track 1
[mkv] Will play audio track 2
Matroska file format detected.
VIDEO: [XVID] 720x480 12bpp 23.976 fps 0.0 kbps ( 0.0 kbyte/s)
==========================================================================
Opening audio decoder: [faad] AAC (MPEG2/4 Advanced Audio Coding)
FAAD: compressed input bitrate missing, assuming 128kbit/s!
AUDIO: 44100 Hz, 2 ch, 16 bit (0x10), ratio: 16000->176400 (128.0 kbit)
Selected audio codec: [faad] afm:faad (FAAD AAC (MPEG2/MPEG4 Audio) decoder)
==========================================================================
ID_FILENAME=/home/jeremiah/testVideo/test.mkv
ID_VIDEO_FORMAT=XVID
ID_VIDEO_BITRATE=0
ID_VIDEO_WIDTH=720
ID_VIDEO_HEIGHT=480
ID_VIDEO_FPS=23.976
ID_VIDEO_ASPECT=1.7771
ID_AUDIO_CODEC=faad
ID_AUDIO_FORMAT=MP4A
ID_AUDIO_BITRATE=128000
ID_AUDIO_RATE=44100
ID_AUDIO_NCH=2
ID_LENGTH=1435
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
Selected video codec: [ffodivx] vfm:ffmpeg (FFmpeg MPEG-4)
==========================================================================
Checking audio filter chain for 44100Hz/2ch/16bit -> 44100Hz/2ch/16bit...
AF_pre: af format: 2 bps, 2 ch, 44100 hz, little endian signed int
AF_pre: 44100Hz 2ch Signed 16-bit (Little-Endian)
AO: [null] 44100Hz 2ch Signed 16-bit (Little-Endian) (2 bps)
Building audio filter chain for 44100Hz/2ch/16bit -> 44100Hz/2ch/16bit...
Starting playback...
MKV/MKA is mastroka. Its a file container format for video/audio and I believe subtitles... http://www.matroska.org/
When I run mplayer by itself through the script I get the same thing as the commandline, which is:
Code:
MPlayer 1.0pre6-3.3.3 (C) 2000-2004 MPlayer Team
CPU: Intel Celeron 2/Pentium III Coppermine,Geyserville (Family: 6, Stepping: 6)
Detected cache-line size is 32 bytes
CPUflags: MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 0
Compiled for x86 CPU with extensions: MMX MMX2 SSE
Usage: mplayer [options] [url|path/]filename
Basic options: (complete list in the man page)
-vo select video output driver & device ('-vo help' for a list)
-ao select audio output driver & device ('-ao help' for a list)
vcd:// play (S)VCD (Super Video CD) track (raw device, no mount)
dvd:// play DVD title from device instead of plain file
-alang/-slang select DVD audio/subtitle language (by 2-char country code)
-ss seek to given (seconds or hh:mm:ss) position
-nosound do not play sound
-fs fullscreen playback (or -vm, -zoom, details in the man page)
-x -y set display resolution (for use with -vm or -zoom)
-sub specify subtitle file to use (also see -subfps, -subdelay)
-playlist specify playlist file
-vid x -aid y select video (x) and audio (y) stream to play
-fps x -srate y change video (x fps) and audio (y Hz) rate
-pp enable postprocessing filter (details in the man page)
-framedrop enable frame dropping (for slow machines)
Basic keys: (complete list in the man page, also check input.conf)
<- or -> seek backward/forward 10 seconds
up or down seek backward/forward 1 minute
pgup or pgdown seek backward/forward 10 minutes
< or > step backward/forward in playlist
p or SPACE pause movie (press any key to continue)
q or ESC stop playing and quit program
+ or - adjust audio delay by +/- 0.1 second
o cycle OSD mode: none / seekbar / seekbar + timer
* or / increase or decrease PCM volume
z or x adjust subtitle delay by +/- 0.1 second
r or t adjust subtitle position up/down, also see -vf expand
* * * SEE THE MAN PAGE FOR DETAILS, FURTHER (ADVANCED) OPTIONS AND KEYS * * *
Last edited by bai_design; 01-27-2005 at 09:45 AM.
well it certainly knows what file it's meant to be playing... i'd be thinking along the lines of output streams... presumably in the php script you're only looking at stdout, and not stderr? i wouldn't have thought the -identify data would be going to stderr, but i do this exact same thing inside my dvd ripper, acidrip (perl) and i habitually redirect stderr back into stdout in the command line.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.