Japanese encephalitis is mainly considered a rural disease, but there is growing evidence of a peri-urban and urban transmission in several countries, including Cambodia. We, therefore, compared the epidemiologic dynamic of Japanese encephalitis between a rural and a peri-urban setting in Cambodia. We monitored two cohorts of 15 pigs and determined the force of infection-rate at which seronegative pigs become positive-in two study farms located in a peri-urban and rural area, respectively. We also studied the mosquito abundance and diversity in proximity of the pigs, as well as the host densities in both areas. All the pigs seroconverted before the age of 6 months. The force of infection was 0.061 per day (95% confidence interval = 0.034-0.098) in the peri-urban cohort and 0.069 per day (95% confidence interval = 0.047-0.099) in the rural cohort. Several differences in the epidemiologic dynamic of Japanese encephalitis between both study sites were highlighted. The later virus amplification in the rural cohort may be linked to the later waning of maternal antibodies, but also to the higher pig density in direct proximity of the studied pigs, which could have led to a dilution of mosquito bites at the farm level. The force of infection was almost identical in both the peri-urban and the rural farms studied, which shifts the classic epidemiologic cycle of the virus. This study is a first step in improving our understanding of Japanese encephalitis virus ecology in different environments with distinct landscapes, human and animal densities.