Low res video playback in high res
Just wondering if it is possible to either re-encode or play back a 1280x720 video in 1920x1080 resolution without losing sharpness, detail ...etc?
----- Original Message ----- From: "jd1008" <jd1008@gmail.com> To: "mencoder usage discussions" <mencoder-users@mplayerhq.hu> Sent: Wednesday, March 23, 2016 2:37 AM Subject: [MEncoder-users] Low res video playback in high res
Just wondering if it is possible to either re-encode or play back a 1280x720 video in 1920x1080 resolution without losing sharpness, detail ...etc?
Sorry to have to say this, but it is impossible. See for yourself: mplayer -vf scale=1920:1080 your_video It is like zooming in. Quality goes out the window.
On 23.03.2016, at 04:06, "Bill Crockett" <wsc4@optusnet.com.au> wrote:
Just wondering if it is possible to either re-encode or play back a 1280x720 video in 1920x1080 resolution without losing sharpness, detail ...etc?
Sorry to have to say this, but it is impossible. See for yourself:
mplayer -vf scale=1920:1080 your_video
It is like zooming in. Quality goes out the window.
There are better scaling windows (-sws) but if you consider that as quality going out the window probably nothing will make you happy... Though if sharpness, detail, .. is the only concern you can use nearest-neighbour scaling. It will not lose any, but it will likely look a bit strange and bad since every other line/column becomes twice as high/wide. Definitely no loss of sharpness or anything though. As the scale factor is 1.5 it should be possible to do better by not just duplicating every other row/column but instead inserting the average. But it will likely look more blurry even though it is not.
Just wondering if it is possible to either re-encode or play back a 1280x720 video in 1920x1080 resolution without losing sharpness, detail ...etc?
Sorry to have to say this, but it is impossible. See for yourself:
mplayer -vf scale=1920:1080 your_video
It is like zooming in. Quality goes out the window.
There are better scaling windows (-sws) but if you consider that as quality going out the window probably nothing will make you happy... Though if sharpness, detail, .. is the only concern you can use nearest-neighbour scaling. It will not lose any, but it will likely look a bit strange and bad since every other line/column becomes twice as high/wide. Definitely no loss of sharpness or anything though. As the scale factor is 1.5 it should be possible to do better by not just duplicating every other row/column but instead inserting the average. But it will likely look more blurry even though it is not.
I thought the -sws 9 (lanczos) was the best choice. -sws 4 nearest neighbour (bad quality) Are you referring to -vf ilpack=0 nearest-neighbour sampling? Are these option the best? mencoder -sws 9 -vf scale=1920:1800 (encoding options) -o 1920_1800_video.mpg 1280_720_video.mpg
On Sun, Apr 03, 2016 at 09:04:58PM +1000, Bill Crockett wrote:
Just wondering if it is possible to either re-encode or play back a 1280x720 video in 1920x1080 resolution without losing sharpness, detail ...etc?
Sorry to have to say this, but it is impossible. See for yourself:
mplayer -vf scale=1920:1080 your_video
It is like zooming in. Quality goes out the window.
There are better scaling windows (-sws) but if you consider that as quality going out the window probably nothing will make you happy... Though if sharpness, detail, .. is the only concern you can use nearest-neighbour scaling. It will not lose any, but it will likely look a bit strange and bad since every other line/column becomes twice as high/wide. Definitely no loss of sharpness or anything though. As the scale factor is 1.5 it should be possible to do better by not just duplicating every other row/column but instead inserting the average. But it will likely look more blurry even though it is not.
I thought the -sws 9 (lanczos) was the best choice. -sws 4 nearest neighbour (bad quality)
There is no "best" without specifying the criteria. Lanczos is considered on of the best looking by most people in most cases. That doesn't change that e.g. I don't like it compared to a smooth bicubic and that it e.g. fails very badly at scaling content that was scaled before. Also you specifically asked about preserving content. For upscaling -sws 4 will 100% preserve the data, which Lanczos cannot guarantee. To most people it will look like crap if you upscale by around 2x or more though.
Are you referring to -vf ilpack=0 nearest-neighbour sampling? Are these option the best?
No, I don't see what ilpack has to do with it.
mencoder -sws 9 -vf scale=1920:1800 (encoding options) -o 1920_1800_video.mpg 1280_720_video.mpg
Also, what I said so far applied to viewing. Presuming you are not using an extremely high, near-lossless bitrate, Lanczos due to creating sharpening and ringing is likely to vastly increase bitrate/decrease quality. Upscaling, especially at a factor 1.5, before encoding will cost you a lot and if in any way possible you should of course avoid it, so under that aspect these clearly aren't good options. But I assume you have a reason. Also why 1800? Just typo I guess?
On Sun, Apr 03, 2016 at 09:04:58PM +1000, Bill Crockett wrote:
Just wondering if it is possible to either re-encode or play back a 1280x720 video in 1920x1080 resolution without losing sharpness, detail ...etc?
Sorry to have to say this, but it is impossible. See for yourself:
mplayer -vf scale=1920:1080 your_video
It is like zooming in. Quality goes out the window.
There are better scaling windows (-sws) but if you consider that as quality going out the window probably nothing will make you happy... Though if sharpness, detail, .. is the only concern you can use nearest-neighbour scaling. It will not lose any, but it will likely look a bit strange and bad since every other line/column becomes twice as high/wide. Definitely no loss of sharpness or anything though. As the scale factor is 1.5 it should be possible to do better by not just duplicating every other row/column but instead inserting the average. But it will likely look more blurry even though it is not.
I thought the -sws 9 (lanczos) was the best choice. -sws 4 nearest neighbour (bad quality)
There is no "best" without specifying the criteria. Lanczos is considered on of the best looking by most people in most cases. That doesn't change that e.g. I don't like it compared to a smooth bicubic and that it e.g. fails very badly at scaling content that was scaled before. Also you specifically asked about preserving content. For upscaling -sws 4 will 100% preserve the data, which Lanczos cannot guarantee. To most people it will look like crap if you upscale by around 2x or more though.
Are you referring to -vf ilpack=0 nearest-neighbour sampling? Are these option the best?
No, I don't see what ilpack has to do with it.
mencoder -sws 9 -vf scale=1920:1080 (encoding options) -o 1920_1080_video.mpg 1280_720_video.mpg
Also, what I said so far applied to viewing. Presuming you are not using an extremely high, near-lossless bitrate, Lanczos due to creating sharpening and ringing is likely to vastly increase bitrate/decrease quality. Upscaling, especially at a factor 1.5, before encoding will cost you a lot and if in any way possible you should of course avoid it, so under that aspect these clearly aren't good options. But I assume you have a reason. Also why 1800? Just typo I guess?
Sorry about that. Yes, it should be 1080. I've corrected it above. Actually, I am using a very high bitrate in the encoding options. I will experiment with the -sws 4 and compare. I guess my eyes have to decide which look better. Thanks for your knowledge and info on this.
Can this be fixed in r37802 please? mencoder -demuxer mov -sws 9 -vf scale=1024:576 -oac copy -fafmttag 0x1 -ovc lavc -lavcopts vcodec=mjpeg:autoaspect:mbd=1 -of avi -o bugs.avi mvi_2019.mov MEncoder sherpya-r37802+g666e2ed-5.3.1 (C) 2000-2016 MPlayer Team 181 audio & 389 video codecs success: format: 0 data: 0x0 - 0x661d762c ISO: File Type Major Brand: Original QuickTime Quicktime/MOV file format detected. [mov] Video stream found, -vid 0 [mov] Audio stream found, -aid 1 VIDEO: [avc1] 1280x720 24bpp 23.976 fps 0.0 kbps ( 0.0 kbyte/s) [V] filefmt:7 fourcc:0x31637661 size:1280x720 fps:23.976 ftime:=0.0417 libavcodec version 57.25.101 (internal) Opening video filter: [expand osd=1] Expand: -1 x -1, -1 ; -1, osd: 1, aspect: 0.000000, round: 1 Opening video filter: [scale w=1024 h=576] ========================================================================== Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family Selected video codec: [ffh264] vfm: ffmpeg (FFmpeg H.264) ========================================================================== Forcing output audio format tag to 0x1. audiocodec: framecopy (format=1 chans=2 rate=48000 bits=16 B/s=192000 sample-4) Movie-Aspect is undefined - no prescaling applied. [swscaler @ 0000000001a55820]Lanczos scaler, from yuv420p to yuv420p using MMXEXT videocodec: libavcodec (1024x576 fourcc=47504a4d [MJPG]) [VE_LAVC] High quality encoding selected (non-realtime)! [mjpeg @ 000000000191ee60]AVFrame.format is not set [mjpeg @ 000000000191ee60]AVFrame.width or height is not set Writing header... ODML: vprp aspect is 16:9. Writing header... ODML: vprp aspect is 16:9. Pos: 0.0s 1f ( 0%) 0.00fps Trem: 0min 0mb A-V:0.000 [0:0] [mjpeg @ 000000000191ee60]AVFrame.format is not set [mjpeg @ 000000000191ee60]AVFrame.width or height is not set Pos: 0.1s 2f ( 0%) 0.00fps Trem: 0min 0mb A-V:0.004 [0:0] [mjpeg @ 000000000191ee60]AVFrame.format is not set [mjpeg @ 000000000191ee60]AVFrame.width or height is not set Pos: 0.1s 3f ( 0%) 0.00fps Trem: 0min 0mb A-V:0.008 [0:0] [mjpeg @ 000000000191ee60]AVFrame.format is not set [mjpeg @ 000000000191ee60]AVFrame.width or height is not set Pos: 0.2s 4f ( 0%) 0.00fps Trem: 0min 0mb A-V:0.011 [0:0] [mjpeg @ 000000000191ee60]AVFrame.format is not set [mjpeg @ 000000000191ee60]AVFrame.width or height is not set Pos: 0.2s 5f ( 0%) 0.00fps Trem: 0min 0mb A-V:0.014 [0:0] [mjpeg @ 000000000191ee60]AVFrame.format is not set [mjpeg @ 000000000191ee60]AVFrame.width or height is not set Pos: 0.3s 6f ( 0%) 0.00fps Trem: 0min 0mb A-V:0.017 [0:0] <snip> [mjpeg @ 000000000191ee60]AVFrame.format is not set [mjpeg @ 000000000191ee60]AVFrame.width or height is not set Pos: 59.9s 1437f ( 8%) 35.95fps Trem: 6min 1155mb A-V:0.042 [12849:1536] [mjpeg @ 000000000191ee60]AVFrame.format is not set [mjpeg @ 000000000191ee60]AVFrame.width or height is not set Pos: 60.0s 1438f ( 8%) 35.95fps Trem: 6min 1155mb A-V:0.042 [12850:1536] [mjpeg @ 000000000191ee60]AVFrame.format is not set [mjpeg @ 000000000191ee60]AVFrame.width or height is not set Pos: 60.0s 1439f ( 8%) 35.95fps Trem: 6min 1156mb A-V:0.042 [12850:1536] Flushing video frames. Writing index... Writing header... ODML: vprp aspect is 16:9. Video stream: 12850.462 kbit/s (1606307 B/s) size: 96407843 bytes 60.018 secs 1439 frames Audio stream: 1536.000 kbit/s (192000 B/s) size: 11520000 bytes 60.000 secs Assertion v>0 && v<=(1 ? 32 : 16) failed at libavutil/mem.c:233 This application has requested the Runtime to terminate it in an unusual way. Please contact the application's support team for more information.
On 05.04.2016, at 12:47, "Bill Crockett" <wsc4@optusnet.com.au> wrote:
Can this be fixed in r37802 please?
You should try a newer version, it's probably already fixed.
From: "Reimar Döffinger" <Reimar.Doeffinger@gmx.de> To: "MEncoder usage discussions" <mencoder-users@mplayerhq.hu> Sent: Thursday, April 07, 2016 7:11 AM
Can this be fixed in r37802 please?
You should try a newer version, it's probably already fixed.
Thank you. All good with r37853.
participants (3)
-
Bill Crockett -
jd1008 -
Reimar Döffinger