You are not logged in.

#1 2017-01-08 17:58:15

Chuck Arch Linux
Member
Registered: 2011-06-23
Posts: 81

[SOLVED] Mplayer crash using -vf screenshot

Mplayer always crash when using 's' for taking a screenshot.
Error log :

[png @ 0x7f0dd86d9da0]The encoder timebase is not set.
Could not open libavcodec PNG encoder

My system is up to date and -vf screenshot was working in the past.

Anyone know when the patch will be added to the Arch Linux mplayer package?
I found this on the net :
http://lists.mplayerhq.hu/pipermail/mpl … 73502.html

Thanks,

Last edited by Chuck Arch Linux (2017-01-20 01:48:49)

Offline

#2 2017-01-09 18:55:10

teckk
Member
Registered: 2013-02-21
Posts: 518

Re: [SOLVED] Mplayer crash using -vf screenshot

Had not tried that for a good while. Same here.

In the mean time you can pause the video where you want it and capture the active window

scrot -u
import shot.png
import -screen shot.png
gnome-screenshot -w

Or if you want the frame

import -frame shot.png

Or select an area

scrot -s
gnome-screenshot -a

etc......

Offline

#3 2017-01-10 02:41:14

Chuck Arch Linux
Member
Registered: 2011-06-23
Posts: 81

Re: [SOLVED] Mplayer crash using -vf screenshot

Hi teckk,
            Thanks for the solutions, but actualy I'm using mplayer in framebuffer, so I can't take a screenshot while mplayer is running.

Last edited by Chuck Arch Linux (2017-01-10 02:41:35)

Offline

#4 2017-01-10 20:58:22

teckk
Member
Registered: 2013-02-21
Posts: 518

Re: [SOLVED] Mplayer crash using -vf screenshot

Problem appears to be saving to .png
This works

mplayer -frames 5 -vo jpeg -vf scale=-1 file.mp4

This won't

mplayer -frames 5 -vo png -vf scale=-1 file.mp4

I made a script that works using ffmpeg for the capture. Modify it as you wish.

#! /usr/bin/env bash

#Frambuffer player and screenshot capture
#Usage: fbplay file.mp4

a=1
mplayer $1 -vo fbdev2 -vf scale=-1 &> /dev/null &
while :; do
    read -p "Press Enter for screenshot, Ctrl + C to exit" 
    ffmpeg -f fbdev -i /dev/fb0 -vframes 1 -r 1 shot"$a".jpeg &> /dev/null
    echo "Saved as "$(pwd)"/shot"$a".jpeg"
    a=$(($a + 1))
done

Or use something else.

Edit: Sorry for the multiple edits...what the crap dillo...

Last edited by teckk (2017-01-10 21:02:56)

Offline

#5 2017-01-13 01:09:09

Chuck Arch Linux
Member
Registered: 2011-06-23
Posts: 81

Re: [SOLVED] Mplayer crash using -vf screenshot

Thanks, I will try this.

Edit :
Mplayer update 37916-1 fixed this bug

Last edited by Chuck Arch Linux (2017-01-20 01:48:33)

Offline

Board footer

Powered by FluxBB