Skip to content
This repository has been archived by the owner on Apr 15, 2021. It is now read-only.

Commit

Permalink
Some fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
jnclink committed Mar 23, 2021
1 parent e83dcf0 commit 81e54c8
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 3 deletions.
1 change: 1 addition & 0 deletions python_prototype/EVEEX/main_PC_recepteur.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,7 @@ def on_received_data(data):

print("\n")
log.debug(f"Durée de l'algorithme : {duree_algo:.3f} s")
log.debug(f"Taille des frames : {img_size}")
log.debug(f"Macroblock size : {macroblock_size}x{macroblock_size}")
log.debug(f"Nombre moyen de FPS (réception / décodage) : {nb_fps_moyen:.2f}")

Expand Down
3 changes: 2 additions & 1 deletion python_prototype/EVEEX/main_RPi_emettrice.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ def encode_et_envoie_frame(image_BGR, frame_id):


# nombre de FPS de la PiCamera
framerate = 2 # stonks
framerate = 1 # stonks

piCameraObject = PiCameraObject(img_width, img_height, framerate, callback=encode_et_envoie_frame)

Expand All @@ -130,6 +130,7 @@ def encode_et_envoie_frame(image_BGR, frame_id):

print("")
log.debug(f"Durée de la démonstration : {duree_demo:.3f} s")
log.debug(f"Taille des frames : {img_size}")
log.debug(f"Macroblock size : {macroblock_size}x{macroblock_size}")
log.debug(f"Nombre moyen de FPS (émission / encodage) : {nb_fps_moyen:.2f}")

Expand Down
7 changes: 5 additions & 2 deletions python_prototype/EVEEX/main_emetteur_video.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
DEFAULT_QUANTIZATION_THRESHOLD = 10

import sys
from time import time
from time import time, sleep
from os import getcwd
import numpy as np

Expand Down Expand Up @@ -59,7 +59,7 @@
elif OS == "linux" or OS == "linux2":
video_path = getcwd() + "/assets/" + video_name
else:
Logger.get_instance().error(f"Unrecognized platform : {OS}")
log.error(f"Unrecognized platform : {OS}")
sys.exit()

frames = VideoHandler.vid2frames(video_path)
Expand Down Expand Up @@ -130,6 +130,8 @@ def encode_et_envoie_frame(image_BGR, frame_id):
frame = frames[frame_id - 1]
encode_et_envoie_frame(frame, frame_id)

sleep(0.5)

# on indique au serveur que l'on a fini d'envoyer les données
cli.send_data_to_server("FIN_ENVOI")

Expand All @@ -143,6 +145,7 @@ def encode_et_envoie_frame(image_BGR, frame_id):

print("")
log.debug(f"Durée de l'algorithme : {duree_algo:.3f} s")
log.debug(f"Taille des frames : {img_size}")
log.debug(f"Macroblock size : {macroblock_size}x{macroblock_size}")
log.debug(f"Nombre moyen de FPS (émission / encodage) : {nb_fps_moyen:.2f}")

Expand Down
2 changes: 2 additions & 0 deletions python_prototype/EVEEX/main_recepteur_video.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,10 +180,12 @@ def on_received_data(data):

print("\n")
log.debug(f"Durée de l'algorithme : {duree_algo:.3f} s")
log.debug(f"Taille des frames : {img_size}")
log.debug(f"Macroblock size : {macroblock_size}x{macroblock_size}")
log.debug(f"Nombre moyen de FPS (réception / décodage) : {nb_fps_moyen:.2f}")

if enregistrer_frames_recues:
print("")
log.info("Enregistrement de la vidéo en cours ...")
saved_video_filename = "test2.mp4"
VideoHandler.frames2vid(frames_recues, saved_video_filename)
Expand Down

0 comments on commit 81e54c8

Please sign in to comment.