PDA

View Full Version : [Bash]Manipolare informazioni file video


Mighty83
28-08-2009, 17:57
Buongiorno a tutti!

Vorrei creare un piccolo script che dato in ingresso un file video mi restituisce in output alcune informazioni riguardo a dei filmati.

Mi spiego: usando il comando "file video.avi" da shell ottengo una cosa del genere:
Mighty:~/Movies/ mighty$ file video.avi
video.avi: RIFF (little-endian) data, AVI, 624 x 352, 25.00 fps, video: XviD, audio: MPEG-1 Layer 3 (stereo, 48000 Hz)


che è perfetto! Se non fosse che vorrei sapere la durata del filmato! Possibilmente in h:m:s o in un formato che poi posso convertire in quella maniera...

Ovviamente sto usando la bash e preferirei non usare comandi tipo tcprobe visto che mi piacerebbe che fosse compatibile sia su Linux che su Mac OS...

Mi piacerebbe in poche parole avere un output simile al tab Audio/video di nautilus quando seleziono Proprietà file...

Grazie :fagiano:

Mighty83
31-08-2009, 11:39
Nessuno che sa come agire? :fagiano:

Hardware Upgrade Forum Database Error
Database Error Database error
The Hardware Upgrade Forum database has encountered a problem.

Please try the following:
  • Load the page again by clicking the Refresh button in your web browser.
  • Open the www.hwupgrade.it home page, then try to open another page.
  • Click the Back button to try another link.
The www.hwupgrade.it forum technical staff have been notified of the error, though you may contact them if the problem persists.
 
We apologise for any inconvenience.