In many cases, you want to know the number of frames of the scene you are interested in by checking the video frame by frame. Despite the relatively likely demand, recent video players can only display seconds, and even if you look it up, there is no way to do it. I desperately investigated if something could be done and found a response as a measure of pain, so I made a note. Please let me know if there is another good way. Why is there no player who can do such a basic thing? (I wish I could use QuictimePlayer7, but I can't run 32-bit apps now.)
Compile by slightly rewriting the player called mpv. First, download the source code from Git.
All you have to do is add a line to the get_term_status_msg function in player / osd.c. (About the 200th line in the current version)
// Playback position
sadd_hhmmssff(&line, get_playback_time(mpctx), opts->osd_fractions);
saddf(&line, " / ");
sadd_hhmmssff(&line, get_time_length(mpctx), opts->osd_fractions);
sadd_percentage(&line, get_percent_pos(mpctx));
/////////// add to //////////////// line = talloc_asprintf_append(line, " (%d frame)", (int)(mpctx->video_pts * mpctx->tracks[0]->stream->codec->fps+0.5)); /////////// So far ////////////
Then compile and install according to the README. Then, the number of frames will be displayed at the end of the display of the playback time of the terminal. (Paused) V: 00:00:00 / 00:00:03 (21%) (19 frame)
Recommended Posts