def get_video_dims(fname):
    try:
        import pyffmpeg
    except ImportError:
        raise ImportError("This function requires pyffmpeg "
                          "<http://code.google.com/p/pyffmpeg/>")
    mp = pyffmpeg.FFMpegReader()
    try:
        mp.open(fname)
        tracks = mp.get_tracks()
        for track in tracks:
            if isinstance(track, pyffmpeg.VideoTrack):
                break
        else:
            raise ValueError('no video track found')
        return (track.duration(),) + track.get_orig_size()
    finally:
        mp.close()
Cut list items with indices in sorted_keys that are greater than
dataset/ETHPy150Open lisa-lab/pylearn2/pylearn2/utils/video.py/get_video_dims--crossover with--dataset/ETHPy150Open kivy/kivy/kivy/adapters/listadapter.py/ListAdapter.trim_right_of_sel