You are not logged in.

#1 2017-01-11 13:37:34

Registered: 2009-06-21
Posts: 270

mpv open the video using another decoder

I am using mpv:

I have a mp4 file with the following codec details:

ffmpeg -i input.mp4

    Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1280x534 [SAR 801:800 DAR 12:5], 899 kb/s, 24 fps, 24 tbr, 12288 tbn, 48 tbc (default)
      handler_name    : VideoHandler
    Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 140 kb/s (default)

Now i am trying to open the same file decoding in the lavc:rawvideo codec. I want to decode because i found in raw files its easy to navigate frames back and forth smoothly using keyboard shortcuts like "." and ","

so i tried:

`mpv --vd=lavc:rawvideo "input.mp4"`

but i dont think it decoded it into rawvideo.

I looking something similar to when i open a file in avidemux, it decodes the file and opens. then the file becomes very smooth to navigate

mp4 files navigation is by key frames. not so good in single frames


#2 2017-01-11 13:45:26

Registered: 2008-11-14
Posts: 1,639

Re: mpv open the video using another decoder

It is not "decoded into", but "decoded by", and you cannot decode an H264 file using the rawvideo decoder.
What you want is to transcode it into a format that allows seeking to frames instead.

If a little loss of quality is not a problem, try to transcode to mjpeg.

If the space on disk is not a problem, transcode to a lossless format (in the past i've seen something like Huffyuv).

Note that i didn't test the commands linked.

Last edited by kokoko3k (2017-01-11 13:48:53)


#3 2017-01-11 21:31:04

Registered: 2013-02-21
Posts: 243

Re: mpv open the video using another decoder

You say rawvideo...

out.yuv will be huge.

ffmpeg -i video.mp4 -c:v rawvideo -pix_fmt yuv420p -s 400x225 out.yuv
mplayer -demuxer rawvideo -rawvideo w=400:h=225:format=i420 out.yuv

uncompressed RGB frames

ffmpeg -i video.mp4 -f rawvideo -c:v rawvideo -pix_fmt rgb565 -s 400x225 out.raw
mplayer -demuxer rawvideo -rawvideo w=400:h=225:format=i420 out.raw

Look at man ffmpeg for more.


Board footer

Powered by FluxBB