I'm looking to build a portable amplified speaker and want to know how long a 1200W car audio amplifier will run on a 12v 50ah battery supply?
As the comment thread states, you can make a guess, but it might be wildly off.
If you measure the current that is being pulled in a 'typical' use case, then your wattage becomes much less of a variable.
Watts = Volts * Amps Watt*hours = Volts * Amp * hours Watt-hours in battery = 12V * 50A-hours = 600Wh
This assumes that the battery actually stays at 12V (it doesn't). You can measure the voltage drop as you run the battery down to further remove this variable. Most 12V batteries are nearly out of energy when they are at 12V. Consult your manufacturers data sheet for details and adjust accordingly.
So, we have 600Wh of energy in our battery. If we run it at 1200W, then we have 1/2 hour of energy in our battery. If we run it at 600W, then we have 1h of energy in our battery. If we run it at 300W, then 2h ... and so on ...
W-h / W = hours
The precision with which you measure voltage and current - along with the useful life of the battery - will determine how close you get to the real-world value.