Skip to content

Instantly share code, notes, and snippets.

@me-suzy
Created January 21, 2026 10:34
Show Gist options
  • Select an option

  • Save me-suzy/39ffb92c5236d9ee003c2492ee35e27b to your computer and use it in GitHub Desktop.

Select an option

Save me-suzy/39ffb92c5236d9ee003c2492ee35e27b to your computer and use it in GitHub Desktop.
suetre
Vezi mai intai ce problema are video
import subprocess
import json
filepath = r"g:\De pus pe FTP 2\masina de spalat\VID_20260119_141236 - probleme.mp4"
cmd = ['ffprobe', '-v', 'quiet', '-print_format', 'json', '-show_streams', '-select_streams', 'v:0', filepath]
result = subprocess.run(cmd, capture_output=True, text=True)
print(result.stdout)
*** Remote Interpreter Reinitialized ***
{
"streams": [
{
"index": 0,
"codec_name": "h264",
"codec_long_name": "H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10",
"profile": "High",
"codec_type": "video",
"codec_tag_string": "avc1",
"codec_tag": "0x31637661",
"width": 1920,
"height": 1080,
"coded_width": 1920,
"coded_height": 1080,
"has_b_frames": 0,
"pix_fmt": "yuv420p",
"level": 42,
"color_range": "tv",
"color_space": "bt709",
"color_transfer": "bt709",
"color_primaries": "bt709",
"chroma_location": "left",
"field_order": "progressive",
"refs": 1,
"is_avc": "true",
"nal_length_size": "4",
"id": "0x1",
"r_frame_rate": "60/1",
"avg_frame_rate": "60480000/1177181",
"time_base": "1/90000",
"start_pts": 0,
"start_time": "0.000000",
"duration_ts": 5885905,
"duration": "65.398944",
"bit_rate": "15245533",
"bits_per_raw_sample": "8",
"nb_frames": "3360",
"extradata_size": 35,
"disposition": {
"default": 1,
"dub": 0,
"original": 0,
"comment": 0,
"lyrics": 0,
"karaoke": 0,
"forced": 0,
"hearing_impaired": 0,
"visual_impaired": 0,
"clean_effects": 0,
"attached_pic": 0,
"timed_thumbnails": 0,
"non_diegetic": 0,
"captions": 0,
"descriptions": 0,
"metadata": 0,
"dependent": 0,
"still_image": 0,
"multilayer": 0
},
"tags": {
"creation_time": "2026-01-19T12:13:42.000000Z",
"language": "eng",
"handler_name": "VideoHandle",
"vendor_id": "[0][0][0][0]"
},
"side_data_list": [
{
"side_data_type": "Display Matrix",
"displaymatrix": "\n00000000: 0 65536 0\n00000001: -65536 0 0\n00000002: 0 0 1073741824\n",
"rotation": -90
}
]
}
]
}
>>>
Am găsit problema! Videoul are rotation: -90 în metadata. A fost filmat vertical pe telefon și are rotație de 90°.Dimensiunea stocată: 1920x1080, dar afișarea reală e 1080x1920 (vertical). MoviePy nu aplică automat rotația.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment