Thursday, January 10, 2013

how do you access a remote computer from the linux command line?

Q. i know the sshusername@computername part, but how do i get to the point where i type that in the command line?

A. Take a look at the "ssh" command (manual page linked below from Duke University)

What is the windows equivalent of the Linux terminal's CTRL + D?
Q. I wrote and compiled a c program, and in the Linux command line, it allows me to enter text, then press CTRL + D to enter the next step of the program, if thats what you wanna call it. Ive recompiled the source for windows, and i notice that CTRL + D just types ^D... what key combo should I be using?

A. If the program is looking for end-of-file, use ctrl-Z.

Using command line only, how to I retrieve the exact number of frames in a given video in Linux?
Q. Using command line only, how to I retrieve the exact number of frames in a given video in Linux?

ffmpeg will return the duration in minutes and the framerate but duration*framerate does not give an exact number of frames.

I need to know the exact number of frames.

A. mplayer -identify -fps 1 VIDEOFILE

Then look at
ID_VIDEO_FPS=1.000
ID_VIDEO_ASPECT=0.0000
ID_AUDIO_FORMAT=80
ID_AUDIO_BITRATE=224000
ID_AUDIO_RATE=0
ID_AUDIO_NCH=0
ID_LENGTH=41819.00

Notice how the length, in seconds, is now the exact number of frames. (41819 frames)

If you need it to be interactive-less:
mplayer -msglevel all=0 -identify -fps 1 -vo null -frames 0 VIDEOFILE | grep ID_LENGTH

Or, for a program:
mplayer -identify -fps 1 -vo null -frames 0 -msglevel all=-1 VIDEO > moviedata

then to get the frame info:

grep ID_LENGTH moviedata

should do.

Thanks for that, now I know how to do it too!
~Purr




Powered by Yahoo! Answers

No comments:

Post a Comment