from converter import Converter
import sys
sys.path.append("ffprobe")
sys.path.append("ffmpeg")
ffmpegPath = "/Users/test/Sites/Coding/ffmpeg"
ffprobePath = "/Users/test/Sites/Coding/ffprobe"
conv = Converter(ffmpegPath, ffprobePath)
input_file = "Final Judgment tutorial forclosures.mov"
output_file = "Final Judgment tutorial forclosures.mp4"
# Probe the input video file to get its information
info = conv.probe(input_file)
# Define the output options for regular conversion
options = {
"format": "mp4",
"audio": {
"codec": "aac",
"samplerate": 44100,
"channels": 2,
},
"video": {
"codec": "h264", # Change to h264 or hevc
"width": 640, # Adjust to Samsung device resolution
"height": 360, # Adjust to Samsung device resolution
"fps": 30, # Adjust to a common frame rate
"video_stream": "yuv420p",
"colorspace": "bt709",
"color_primaries": "bt709",
}
}
# Perform the regular conversion
convert = conv.convert(input_file, output_file, options)
# Print progress
for timecode in convert:
print(f'\rConverting ({timecode:.2f}) ...')
# Define the options for re-encoding for text message
imessage_output_file = "Final Judgment tutorial forclosures_imessage.mp4"
imessage_options = {
"format": "mp4",
"audio": options["audio"], # Inherit audio settings from regular conversion
"video": options["video"], # Inherit video settings from regular conversion
"vf": "scale=iw*2:ih*2, scale=iw/2:ih/2, unsharp=5:5:1:5:5:1"
}
# Perform the re-encoding for text message
imessage_output = conv.convert(output_file, imessage_output_file, imessage_options)
# Print progress for the re-encoding
for timecode in imessage_output:
print(f'\rRe-encoding ({timecode:.2f}) ...')
i have a reencoded video i am trying to send to a samsung over text message. The quality is too blurry to see when sent from an iphone to a samsung but it is clear when sending iphone to iphone (in messages for both) please help new to coding