Tx2: jetson_multimedia_api/samples/01_video_encode output h.264 file can not be opened by windows media player

gst-launch-1.0 videotestsrc num-buffers=150 ! video/x-raw,width=640,height=480,format=I420 ! filesink location=a.yuv

./video_encode a.yuv 640 480 H264 a.h264

it will save a a.h264 file
…/00_video_decode/video_decode H264 a.h264 can show the video

but windows media player cant not open it ?

how to save it to enable wmp to open it ?

Hi,
You can install ffmpeg

$ sudp apt install ffmpeg

and mux h264 stream to an mp4 file

$ ffmpeg -i sample_outdoor_car_1080p_10fps.h264 -c copy a.mp4