playing a specific interval of a video in mplayer using command line option

前端 未结 2 1248
广开言路
广开言路 2021-02-01 05:01

I am using mplayer to play videos... I wanted to know if there are command line options to play a specific interval of a video in mplayer? For example, if I want to play a video

相关标签:
2条回答
  • 2021-02-01 05:20

    Using mpv, a fork of MPlayer:

    # specify start and length
    mpv --start=3:20 --length=10 <file-name>
    
    # specifying end
    mpv --start=30 --end=40 <file-name>
    
    # specifying end from end
    mpv --start=80 --end=-90 <file-name>
    

    More at mpv manual.

    0 讨论(0)
  • 2021-02-01 05:34
    man mplayer
    

    reveals:

    -ss <time>: Seek to given time position
    -endpos <[[hh:]mm:]ss[.ms]|size[b|kb|mb]>: Stop at given time or byte position
    

    so you should be able to do what you want by simple using:

    mplayer -ss 56 -endpos 3
    
    0 讨论(0)
提交回复
热议问题