문제

I have a script that parses a bunch of events from a given movie file and uses the -ss and -endpos flags to play specific portions of the file. Let's say there is one file available. What I want to do is run a chained command like:

mplayer vidfile.mp4 -ss 110 -endpos 5 -fs;mplayer vidfile.mp4 -ss 130 -endpos 9

The idea is to have both sections of the video play in full screen, sequentially. However, there is major flicker between the two videos as it exits to the desktop briefly. (Ubuntu 12.04.)

How can I keep mplayer open or make the switch less jarring? Doing this with 30 clips would give someone a massive headache, and I'd like to see if it can be done this way without writing a script to cut the movies and put them together (which sounds like a nightmare, but if anyone has ideas, please post those in the comments).

도움이 되었습니까?

해결책

I ended up solving it with a quick solution that a friend suggested - take the semi-colon out since mplayer supports multiple files AND flags. (Works for a few files for now, will update if I run into problems down the line.)

mplayer vidfile.mp4 -ss 110 -endpos 5 -fs vidfile.mp4 -ss 130 -endpos 9 -fs

다른 팁

Not sure when it was introduced, but mplayer now supports this via the -fixed-vo parameter, from the man page:

-fixed-vo
   Enforces a fixed video system for multiple files (one (un)initialization for all files).  
   Therefore only one window will be opened for all files.  
   Currently the following drivers are fixed-vo compliant: 
      gl, gl_tiled, mga, svga, x11, xmga, xv, xvidix and dfbmga.

in my testing this works well with full screen (-fs), no flicker.

example usage:

mplayer -fs -fixed-vo thats_marvellous.mp4 cliff.mp4

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top