1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Find time duration of a video file uploaded.

Discussion in 'PHP' started by ramsarvan, Dec 28, 2010.

  1. #1
    Hi,
    SEMrush
    I am using a video uploading option in m site. I need to restrict in such a way that, only files with duration of 3mins or less can be uploaded.

    Can anyone find a solution for this?

    Thank you.
     
    ramsarvan, Dec 28, 2010 IP
    SEMrush
  2. pig2cat

    pig2cat Active Member

    Messages:
    299
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    60
    #2
    http://mediainfo.sourceforge.net/en

    $aspect = exec('/path/to/mediainfo --Inform="Video;%DisplayAspectRatio%" "/path/to/'.$file.'"');

    look up the correct inform command in the mediainfo --help
     
    pig2cat, Dec 28, 2010 IP