So there is two answers here: What is legal and what is practical. Without context (I haven't watched the video yet, but even then, I would also remind you that what is in the video is not always the whole side of the story and you need to understand the offense the woman committed might have occured before the released segment of video began recording) there is no law saying you need to shut up when an officer tells you to (in fact, Officers typically do not mind people talking more as it helps the case, as you have a right to remain silent... which hurts the case he's making against her, not helps his case.).
As a practical rule, it's in your best interest to do whatever the officer says on the scene and if he did something wrong, let the lawyers figure it out. As your post indicates, you are trying not to get shot or accused of trumped up charges, than it's far better for you to comply with the officers commands, even if they seem to violate the law, than it is to give them a reason. Keep in mind this encounter is out of the ordinary for you... but it is routine for the officer. Each time they deal with the public, somewhere in the back of their mind is the little voice saying "will this be the person who kills me?" It may be your thought too... and make you nervice in that moment... but it's a constant for a beat cop on highway patrol or responding to a call. Sometimes they have to listen to both the complaintant and the accused, who are naturally contridictory, while doing crowd control and keeping their own selves safe. It's a very stressful job.
I've recommended in similar answers that the best approach is to not only do exactly what they say, but explain what you are doing as you do it. "I am getting out of the car." "I am reaching for my wallet." "I am turning off the car's engine." You cannot help if the cop is twitchy, but doing what he or she says and slowly (bad guys who want to kill cops move quickly... hoping they get the drop on the officer... good guys who move fast will trigger a response. Good guys who move slow give the officer time to double check things.) performing those actions will put them at ease. Never ever reach for anything in your pockets, or out of his immediate field of vision without first announcing that you are going to do that or being asked to do it.
Addressing them with sir or ma'am is also helpful in releasing tension. Your goal and the cops goal in any situation is to come out alive and in one piece. No one wants to die in a shoot out or kill anyone in a shoot out, least of all the cops. If he needs you to step out of the car or turn off the engine, asking for a reason is going to escalate a situation... doing what he says is going to deescalate (it also looks good if you are compliant to the judge and jury and he's still a jerk and you don't usually die).
Some other tricks that you should be aware of: If he asks to search your car, you do not need to consent... but anything in plain view is reasonable grounds for a search. I am not encouraging any illegal activity, but if you do not want the officer to see something, before you drive with it, put it in a glove box, trunk, or other part of the car where it is not visible from the windows to the outside world. Furtive movements once the cops put on the lights will provoke a more agressive response.
Roll down your window fully and even if you know exactly why you were pulled over, always answer "Do you know why I pulled you over?" always answer in a polite tone, "No." Even if you pulled 65 in a 30... that was a school zone... and you were drag racing... Let him tell you. It could be because your tail light was out, which is a minor infraction. It could be because he has you dead to rights... telling him you were speeding may not be the answer he was looking for, but it makes the ticket easier to write when you show you know you did it.
If you are carrying a fire arm (legally or illegally) it is better to inform the officer of the fact (even if it's in the trunk). Tell the officer exactly where it is but to not reach for it or move without him asking you to retrieve the weapon or the paperwork. If the gun is legal and being legally carried, it may be as simple as that. If not, keep in mind the officer is now concerned with all scenarioes as to what happens next and needs to safely handle the situation. Do exactly what he says no more no less. Do it slowly... and be as compliant as possible.
If you are unsure if you are about to be arrested when asked to step out of the car, politely ask if you are free to leave the scene. A "No" is tantamount to incoming arrest and from this point on, do not say anything except to advise the officer that you will not be saying anything without your lawyer present (you don't have to have a lawyer yet). Don't try and talk your way out. Refusing to answer the police's questions is not evidence of guilt and cannot be held against you at trial. That won't stop the cops from asking more questions of you... they're hoping you start talking again. All answers should be silence or "Lawyer" at this point. If you receive a Yes, walk away. Don't say a word. Get out of there. Don't look back.
Never let the officer search your car (or house, or any property of yours) without a warrant. Cars do have some special rules, but basically if you have something suspicious in plain view, the cop can call in a warrant for another search, but if you have a body in the trunk, and the officer is citing you for a broken light, don't give him permission to search the vehicle.
At all times, remember that the cop can do more harm than you (I'm 6'4", 225 lbs male, and bench above my body weight... and a 5'2" 100 lbs female cop with a gun still will overpower me). It's the Police FORCE - Size Matters Not. I'll freely admit I'd rather be in the legal right when I have to deal with law enforcement... but I'm not going to pay for that victory with my life. If you feel the cop's behavior was inappropriate, that ticket has his name on it, and his office contact information... call the superior or the Internal Affairs (i.e. the Cops who police the Cops) or the Judge (Law and Order Doing Doing). Telling the cop he's wrong is not going to make things easier or safer for you.