Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Video Encoding > MPEG-4 AVC / H.264

Reply
 
Thread Tools Search this Thread Display Modes
Old 18th February 2016, 17:24   #1  |  Link
mushahidh
Registered User
 
Join Date: Nov 2015
Posts: 29
Is there a way to prioritize video frames?

Hi experts,
As we see different videos in our daily life , the obvious fact is that not every frame contains equal amount of important information. I am trying to apply a protection to video frames based on their importance in video.For that i need to prioritize a frame based on criteria(which i don't know yet). What i want to know is there any quantitative measure that can calculate frame importance or priority in video streams?
mushahidh is offline   Reply With Quote
Old 18th February 2016, 21:02   #2  |  Link
LoRd_MuldeR
Software Developer
 
LoRd_MuldeR's Avatar
 
Join Date: Jun 2005
Location: Last House on Slunk Street
Posts: 13,039
If with "prioritize" you mean that you want to give certain frames a higher quality (more bits) as compared to the rest, then --qpfile is what you are looking for:
https://en.wikibooks.org/wiki/MeGUI/...ettings#qpfile

And, if you want to do this on a per-macroblock basis instead of a per-frame basis, we are talking about ROI (region of interest) encoding. This is only possible via API, not via CLI.

How to decide which frames (or regions) you want to "prioritize", that's a totally different question and can only be answered with more context...
__________________
There was of course no way of knowing whether you were being watched at any given moment.
How often, or on what system, the Thought Police plugged in on any individual wire was guesswork.



Last edited by LoRd_MuldeR; 18th February 2016 at 21:10.
LoRd_MuldeR is offline   Reply With Quote
Old 19th February 2016, 09:18   #3  |  Link
mushahidh
Registered User
 
Join Date: Nov 2015
Posts: 29
Quote:
Originally Posted by LoRd_MuldeR View Post
How to decide which frames (or regions) you want to "prioritize", that's a totally different question and can only be answered with more context...
Thanks for your answer. I want to add more on it. Say for instance in foreman sequence. Initially, there isn't much movement between the frames. So loss of one frame when there isn't much difference between the lost frame and previous frame won't make much difference. But in case of sudden change between the frames and previous frame in much more different from coming frame than lost of one frame cause much more problem. So i want to prioritize video frames based on the data inside it with respect to previous frame.
Hope you understand.
mushahidh is offline   Reply With Quote
Old 19th February 2016, 09:53   #4  |  Link
Sparktank
47.952fps@71.928Hz
 
Sparktank's Avatar
 
Join Date: Mar 2011
Posts: 903
Would this be like for security videos?
Motion tracking, per se?
__________________
Win10 (x64) build 18362| GPU Caps Viewer 1.42.4.0
NVIDIA GeForce GTX 1060 3GB (GP106) 3071MB/GDDR5 | (r435_95-4)
NTSC | DVD: R1 | BD: A
Intel Xeon X5660 @2.80GHz
Sparktank is offline   Reply With Quote
Old 19th February 2016, 10:50   #5  |  Link
mushahidh
Registered User
 
Join Date: Nov 2015
Posts: 29
Quote:
Originally Posted by Sparktank View Post
Would this be like for security videos?
Motion tracking, per se?
Not actually. Again to be more clear. For example I have IPPP structure and GOP contains 30 frames. And as we know first I frame is much more important than P frames so i will give more priority to first I frame. Then for remaining P frames initial P frames are more important than last P frames. So on what basis can i define a threshold so that i can say initial 25% percent P frames are much important that last 25% of frames?
mushahidh is offline   Reply With Quote
Old 19th February 2016, 16:58   #6  |  Link
vivan
/人 ◕ ‿‿ ◕ 人\
 
Join Date: May 2011
Location: Russia
Posts: 649
So, number of frames referenced is a metric you are looking for.
I believe mbtree is basically this, except on per macroblock basis.
vivan is offline   Reply With Quote
Old 19th February 2016, 18:22   #7  |  Link
mushahidh
Registered User
 
Join Date: Nov 2015
Posts: 29
Quote:
Originally Posted by vivan View Post
So, number of frames referenced is a metric you are looking for.
I believe mbtree is basically this, except on per macroblock basis.
Yeah thanks for giving me right direction. But after having some go through of this paper i start believing that it won't be so much easy if i am using encoder other than x264.
mushahidh is offline   Reply With Quote
Old 19th February 2016, 18:55   #8  |  Link
LoRd_MuldeR
Software Developer
 
LoRd_MuldeR's Avatar
 
Join Date: Jun 2005
Location: Last House on Slunk Street
Posts: 13,039
Quote:
Originally Posted by mushahidh View Post
Not actually. Again to be more clear. For example I have IPPP structure and GOP contains 30 frames. And as we know first I frame is much more important than P frames so i will give more priority to first I frame. Then for remaining P frames initial P frames are more important than last P frames. So on what basis can i define a threshold so that i can say initial 25% percent P frames are much important that last 25% of frames?
This is called "rate control" and "frame type decision". Every (halfway decent) video encoder does this by default

You only need a --qpfile option (or ROI encoding), if you want to overwrite the encoder's rate control and/or frame type decisions, in some specific places.

See also:
* http://git.videolan.org/?p=x264.git;...atecontrol.txt (a bit outdated, but still gives the idea)
* https://web.archive.org/web/20120910...cx/archives/98
__________________
There was of course no way of knowing whether you were being watched at any given moment.
How often, or on what system, the Thought Police plugged in on any individual wire was guesswork.



Last edited by LoRd_MuldeR; 21st February 2016 at 14:28.
LoRd_MuldeR is offline   Reply With Quote
Old 21st February 2016, 14:16   #9  |  Link
kuchikirukia
Registered User
 
Join Date: Oct 2014
Posts: 434
I think someone needs some b-frames.
kuchikirukia is offline   Reply With Quote
Reply

Tags
frames, h.264, perceived resolution

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 18:05.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2019, vBulletin Solutions Inc.