Commit a7a20895 authored by YONG-LIN SU's avatar YONG-LIN SU

20220613 merged

parent eb8ebc3e
......@@ -38,10 +38,10 @@ easyLPR=EZLPR()
# source="/home/aaeon/Kevin_Car.MOV"
#source = "../Ch17-20220314-190000.mp4"
source="rtsp://192.168.5.218/txg/01"
#source="rtsp://140.120.65.31/live.sdp"
cam=Camera(1,source,encoder = "h265",width=1920,height=1080)
# cam=Camera(1,source,encoder = "h264",width=1920,height=1080)
# source="rtsp://192.168.5.218/txg/01"
source="rtsp://140.120.65.31/live.sdp"
# cam=Camera(1,source,encoder = "h265",width=1920,height=1080)
cam=Camera(1,source,encoder = "h264",width=1920,height=1080)
camera_id=1
break_flag=False
......
......@@ -15,11 +15,7 @@ class Camera(object):
self.height = height
self.framerate = framerate
self.encoder = encoder
<<<<<<< HEAD
self.use_gstr = True
=======
self.use_gstr = use_gstr
>>>>>>> e020b4923e347af9612c9f21db2490da91fbf4fe
self.__thread = Thread(target=self.__job)
self.resultQueue = Queue(maxsize=maxsize)
def start(self):
......@@ -90,14 +86,14 @@ class Camera(object):
if self.encoder=="h265":
print("h265")
return (
f'rtspsrc location={source} protocols=tcp ! ' +
f'rtspsrc location={source} ! ' +
# 'watchdog timeout=10000 !'+
'rtph265depay ! h265parse ! nvv4l2decoder ! nvvidconv ! '+
'video/x-raw,format=BGRx ! videoconvert ! video/x-raw,format=BGR ! appsink'
)
elif self.encoder=="h264":
print("h264")
gst_str = ('rtspsrc location={} latency={} protocols=tcp ! '
gst_str = ('rtspsrc location={} latency={} ! '
'rtph264depay ! h264parse ! omxh264dec ! '
'nvvidconv ! '
'video/x-raw, width=(int){}, height=(int){}, '
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment