With the rapid development of autonomous driving and heterogeneous vehicular networks (HetVNets), vehicles can collect data and generate valuable information to obtain profits, thus forming a new vehicular self-media paradigm. However, with potential security risks, the current data trading schemes in the HetVNets lack the comprehensive consideration of the requirements of the participants including media data producers (MDPs), media data sellers (MDSs), and media data buyers (MDBs) to design a trading framework that integrates data caching services and data selling services. To this end, we propose an on-demand self-media data trading scheme in HetVNets. Specifically, based on blockchain and smart contracts, we first design an on-demand self-media trading architecture that jointly considers the data caching services and the data selling services to provide the participants with a secure transaction environment. In the data caching phase, by considering the value of media data generated by the MDPs and the sales capabilities of different MDSs, we model the requirements of the MDPs and the MDSs as utility functions and formulate the interactions between them as a Stackelberg game, where an iterative algorithm is designed for the MDPs and the MDSs to obtain their optimal strategies. In the data selling phase, we consider the diversified requirements of the MDBs and propose an iteration-based mechanism to help the MDSs dynamically determine the data selling strategies. Compared with the traditional schemes, the simulation results show that our scheme can obtain the optimal strategies for the MDPs and the MDSs and bring them the highest utilities.