Un sombrero. -Listones. Mire qué listones más bonitos para que se haga unos moños.
A hat. Ribbons. -Look at what beautiful ribbons so that one can make some [hair] buns.
Captions 15-17, El Ausente - Acto 1 - Part 6Play Caption
This rule must be applied without exception. When a word that ends in an n is combined with a word that begins with a p or b to form a compound word like cien+pies → ciempiés (centipede) the n becomes an m. Some other examples of this are en+pollo (chicken) → empollar (to sit on eggs, to hatch), en+bala (bundle) → embalar (to pack) and en+belesa (the belesa is a narcotic plant) → embelesar (to captivate).
Vamos a empollar veinte criaturas
Let's hatch twenty children
Caption 16, Calle 13 - Tango del pecadoPlay Caption
Take note, this rule doesn’t apply to v, despite the fact that native Spanish speakers often conflate it with b. In fact, in Spanish, it is also a rule that you should always write n before v.
La gente no me parecía... no me parecía el tipo de gente con el que yo me quería involucrar.
The people didn't seem to... they didn't seem to be the kind of people I wanted to get involved with.
Captions 80-81, Arturo Vega - Entrevista - Part 2Play Caption
This rule is very useful when trying to figure out the proper way to spell certain Spanish words, especially considering that it is not uncommon to hear native speakers replace the m sound with an n sound. Listen to our Nicaraguan friend, Doña Coco:
Y hay mucho cristia'... este... católicos también.
And there's a lot of Christia'... I mean... Catholics also.
Caption 28, Doña Coco - MúsicaPlay Caption