Thursday, January 17, 2013

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

I want to learn the Windows command line. Ware can i get info or a guide to do so?
Q. i have been using Linux since mid windows xp days. i know the Linux Terminal command line frontwards and backwards. however i only know a few simple commands for the Windows command line. for Ms_Dos and the newer Windows command shell. i want to download a guide of some kind so i can learn the windows command line inside and out. do you know ware i can find such a thing?

A. Check http://www.windows-commandline.com also. They have command line tips for all the useful tasks.



Nec Projector Review

Plastic Shed Reviews

Ati Graphic Reviews

Nurse Uniforms Reviews

Cabochons Reviews

Inflatable Water Slides Reviews

Barcode Scanner Reviews

No comments:

Post a Comment