Which sentence is capitalized correctly?

Halfway through the movie, i began wondering, “When will this end?”

Halfway through the movie, I began wondering, “when will this end?”

halfway through the movie, I began wondering, “When will this end?”

Halfway through the movie, I began wondering, “When will this end?”