Utils¶
MgProgressbar ¶
MgProgressbar(total=100, time_limit=0.5, prefix='Progress', suffix='Complete', decimals=1, length=40, fill='█')
Calls in a loop to create terminal progress bar.
Initialize the MgProgressbar object.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
total
|
int
|
Total iterations. Defaults to 100. |
100
|
time_limit
|
float
|
The minimum refresh rate of the progressbar in seconds. Defaults to 0.5. |
0.5
|
prefix
|
str
|
Prefix string. Defaults to 'Progress'. |
'Progress'
|
suffix
|
str
|
Suffix string. Defaults to 'Complete'. |
'Complete'
|
decimals
|
int
|
Positive number of decimals in process percent. Defaults to 1. |
1
|
length
|
int
|
Character length of the status bar. Defaults to 40. |
40
|
fill
|
str
|
Bar fill character. Defaults to '█'. |
'█'
|
Source code in musicalgestures/_utils.py
41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 | |
get_now ¶
get_now()
Gets the current time.
Returns:
| Type | Description |
|---|---|
|
datetime.datetime.timestamp: The current time. |
Source code in musicalgestures/_utils.py
77 78 79 80 81 82 83 84 85 | |
over_time_limit ¶
over_time_limit()
Checks if we should redraw the progress bar at this moment.
Returns:
| Name | Type | Description |
|---|---|---|
bool |
bool
|
True if equal or more time has passed than |
Source code in musicalgestures/_utils.py
87 88 89 90 91 92 93 94 95 | |
progress ¶
progress(iteration)
Progresses the progress bar to the next step.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
iteration
|
float
|
The current iteration. For example, the 57th out of 100 steps, or 12.3s out of the total 60s. |
required |
Source code in musicalgestures/_utils.py
159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 | |
MgImage ¶
MgImage(filename)
Class for handling images in the Musical Gestures Toolbox.
Initializes the MgImage object.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
filename
|
str
|
The path to the image file to load. |
required |
Source code in musicalgestures/_utils.py
219 220 221 222 223 224 225 226 227 228 229 | |
save ¶
save(target_name)
Save (copy) the image to target_name and return a new MgImage pointing to it.
Source code in musicalgestures/_utils.py
235 236 237 238 239 240 241 242 | |
to_html ¶
to_html()
Return an HTML snippet embedding the image (base64-encoded).
NB: This is intentionally not exposed as _repr_html_, so an MgImage
is not auto-rendered as the last expression of a Jupyter cell. Use show()
to display the image.
Source code in musicalgestures/_utils.py
244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 | |
MgFigure ¶
MgFigure(figure=None, figure_type=None, data=None, layers=None, image=None)
Class for working with figures and plots within the Musical Gestures Toolbox.
Initializes the MgFigure object.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
figure
|
figure
|
The internal figure. Defaults to None. |
None
|
figure_type
|
str
|
A keyword describing the type of the figure, such as "audio.spectrogram", "audio.tempogram", "audio.descriptors", "layers", etc. Defaults to None. |
None
|
data
|
dictionary
|
The dictionary containing all the necessary variables, lists and (typically) NumPy arrays necessary to rebuild each subplot in the figure. Defaults to None. |
None
|
layers
|
list
|
This is only relevant if the MgFigure instance is of "layers" type, which indicates that it is a composit of several MgFigures and/or MgImages. In this case the layers list should contain all the child instances (MgFigures, MgImages, or MgLists of these) which are included in this MgFigure and are displayed as subplots. Defaults to None. |
None
|
image
|
str
|
Path to the image file (the rendered figure). Defaults to None. |
None
|
Source code in musicalgestures/_utils.py
273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 | |
save ¶
save(target_name)
Save the rendered figure to target_name.
Copies the rendered PNG if one exists, otherwise re-saves the internal matplotlib figure. Returns an MgImage pointing to the saved file (or None if nothing to save).
Source code in musicalgestures/_utils.py
294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 | |
show ¶
show(**kwargs)
Display the rendered figure.
In a Jupyter notebook the saved image is shown inline; otherwise it is opened in a viewer window. Additional keyword arguments are forwarded to the underlying MgImage.show(). If no rendered image is available, the internal matplotlib figure is returned instead.
Source code in musicalgestures/_utils.py
312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 | |
to_html ¶
to_html()
Return an HTML snippet embedding the rendered figure (base64-encoded).
NB: This is intentionally not exposed as _repr_html_, so an MgFigure
is not auto-rendered as the last expression of a Jupyter cell. Use show()
to display the figure.
Source code in musicalgestures/_utils.py
330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 | |
show_progress ¶
show_progress(enabled)
Enable or disable the MGT progress bars globally.
Disabling the progress bars is useful when running batch processing jobs or
when the output is captured by a logging framework where the repeated
\r updates would clutter the log.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
enabled
|
bool
|
Pass |
required |
Examples:
>>> import musicalgestures as mg
>>> mg.show_progress(False) # suppress all progress bars
>>> # … batch processing …
>>> mg.show_progress(True) # re-enable for interactive use
Source code in musicalgestures/_utils.py
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | |
roundup ¶
roundup(num, modulo_num)
Rounds up a number to the next integer multiple of another.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
num
|
int
|
The number to round up. |
required |
modulo_num
|
int
|
The number whose next integer multiple we want. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
int |
int
|
The rounded-up number. |
Source code in musicalgestures/_utils.py
363 364 365 366 367 368 369 370 371 372 373 374 375 | |
clamp ¶
clamp(num, min_value, max_value)
Clamps a number between a minimum and maximum value.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
num
|
float
|
The number to clamp. |
required |
min_value
|
float
|
The minimum allowed value. |
required |
max_value
|
float
|
The maximum allowed value. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
float |
float
|
The clamped number. |
Source code in musicalgestures/_utils.py
378 379 380 381 382 383 384 385 386 387 388 389 390 | |
scale_num ¶
scale_num(val, in_low, in_high, out_low, out_high)
Scales a number linearly.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
val
|
float
|
The value to be scaled. |
required |
in_low
|
float
|
Minimum of input range. |
required |
in_high
|
float
|
Maximum of input range. |
required |
out_low
|
float
|
Minimum of output range. |
required |
out_high
|
float
|
Maximum of output range. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
float |
float
|
The scaled number. |
Source code in musicalgestures/_utils.py
393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 | |
scale_array ¶
scale_array(array, out_low, out_high)
Scales an array linearly.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
array
|
arraylike
|
The array to be scaled. |
required |
out_low
|
float
|
Minimum of output range. |
required |
out_high
|
float
|
Maximum of output range. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
arraylike |
ndarray
|
The scaled array. |
Source code in musicalgestures/_utils.py
411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 | |
generate_outfilename ¶
generate_outfilename(requested_name)
Returns a unique filepath to avoid overwriting existing files. Increments requested filename if necessary by appending an integer, like "_0" or "_1", etc to the file name.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
requested_name
|
str
|
Requested file name as path string. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
If file at requested_name is not present, then requested_name, else an incremented filename. |
Source code in musicalgestures/_utils.py
431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 | |
resolve_filename ¶
resolve_filename(stem, suffix, target_name=None, overwrite=True)
Resolve an output filename for a rendered result.
Centralises the target_name/overwrite logic that most methods repeat: use
stem + suffix when no name is given, otherwise honour the provided target_name but
enforce the extension from suffix; when overwrite is False, auto-increment the name so
nothing is clobbered.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
stem
|
str
|
Input filename stem (e.g. |
required |
suffix
|
str
|
Suffix incl. extension to append to |
required |
target_name
|
str
|
Explicit output path (its extension is normalised to the
|
None
|
overwrite
|
bool
|
If False, auto-increment to avoid overwriting. Defaults to True. |
True
|
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
The resolved output path. |
Source code in musicalgestures/_utils.py
495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 | |
get_frame_planecount ¶
get_frame_planecount(frame)
Gets the planecount (color channel count) of a video frame.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
frame
|
numpy array
|
A frame extracted by |
required |
Returns:
| Name | Type | Description |
|---|---|---|
int |
int
|
The planecount of the input frame, 3 or 1. |
Source code in musicalgestures/_utils.py
525 526 527 528 529 530 531 532 533 534 535 536 537 | |
frame2ms ¶
frame2ms(frame, fps)
Converts frames to milliseconds.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
frame
|
int
|
The index of the frame to be converted to milliseconds. |
required |
fps
|
int
|
Frames per second. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
int |
int
|
The rounded millisecond value of the input frame index. |
Source code in musicalgestures/_utils.py
540 541 542 543 544 545 546 547 548 549 550 551 552 | |
pass_if_containers_match ¶
pass_if_containers_match(file_1, file_2)
Checks if file extensions match between two files. If they do it passes, is they don't it raises WrongContainer exception.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
file_1
|
str
|
First file in comparison. |
required |
file_2
|
str
|
Second file in comparison. |
required |
Raises:
| Type | Description |
|---|---|
WrongContainer
|
If file extensions (containers) mismatch. |
Source code in musicalgestures/_utils.py
560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 | |
pass_if_container_is ¶
pass_if_container_is(container, file)
Checks if a file's extension matches a desired one. Passes if so, raises WrongContainer if not.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
container
|
str
|
The container to match. |
required |
file
|
str
|
Path to the file to inspect. |
required |
Raises:
| Type | Description |
|---|---|
WrongContainer
|
If the file extension (container) matches the desired one. |
Source code in musicalgestures/_utils.py
578 579 580 581 582 583 584 585 586 587 588 589 590 591 | |
ffmpeg_has_encoder ¶
ffmpeg_has_encoder(name)
Returns True if the installed FFmpeg has the named encoder (e.g. 'libtheora').
Useful for guarding format conversions whose codec may be missing from a given FFmpeg build (notably libtheora/libvorbis for .ogg on some macOS/Windows builds).
Source code in musicalgestures/_utils.py
597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 | |
convert ¶
convert(filename, target_name, overwrite=True)
Converts a video to another format/container using ffmpeg.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
filename
|
str
|
Path to the input video file to convert. |
required |
target_name
|
str
|
Target filename as path. |
required |
overwrite
|
bool
|
Whether to allow overwriting existing files or to automatically increment target filename to avoid overwriting. Defaults to True. |
True
|
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
The path to the output file. |
Source code in musicalgestures/_utils.py
619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 | |
convert_to_avi ¶
convert_to_avi(filename, target_name=None, overwrite=True)
Converts a video to one with .avi extension using ffmpeg.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
filename
|
str
|
Path to the input video file to convert. |
required |
target_name
|
str
|
Target filename as path. Defaults to None (which assumes that the input filename should be used). |
None
|
overwrite
|
bool
|
Whether to allow overwriting existing files or to automatically increment target filename to avoid overwriting. Defaults to True. |
True
|
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
The path to the output '.avi' file. |
Source code in musicalgestures/_utils.py
657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 | |
convert_to_mp4 ¶
convert_to_mp4(filename, target_name=None, overwrite=True)
Converts a video to one with .mp4 extension using ffmpeg.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
filename
|
str
|
Path to the input video file to convert. |
required |
target_name
|
str
|
Target filename as path. Defaults to None (which assumes that the input filename should be used). |
None
|
overwrite
|
bool
|
Whether to allow overwriting existing files or to automatically increment target filename to avoid overwriting. Defaults to True. |
True
|
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
The path to the output '.mp4' file. |
Source code in musicalgestures/_utils.py
686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 | |
convert_to_webm ¶
convert_to_webm(filename, target_name=None, overwrite=True)
Converts a video to one with .webm extension using ffmpeg.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
filename
|
str
|
Path to the input video file to convert. |
required |
target_name
|
str
|
Target filename as path. Defaults to None (which assumes that the input filename should be used). |
None
|
overwrite
|
bool
|
Whether to allow overwriting existing files or to automatically increment target filename to avoid overwriting. Defaults to True. |
True
|
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
The path to the output '.webm' file. |
Source code in musicalgestures/_utils.py
715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 | |
cast_into_avi ¶
cast_into_avi(filename, target_name=None, overwrite=True)
Experimental
Casts a video into and .avi container using ffmpeg. Much faster than convert_to_avi,
but does not always work well with cv2 or built-in video players.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
filename
|
str
|
Path to the input video file. |
required |
target_name
|
str
|
Target filename as path. Defaults to None (which assumes that the input filename should be used). |
None
|
overwrite
|
bool
|
Whether to allow overwriting existing files or to automatically increment target filename to avoid overwriting. Defaults to True. |
True
|
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
The path to the output '.avi' file. |
Source code in musicalgestures/_utils.py
744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 | |
extract_frame ¶
extract_frame(filename, frame=None, time=None, target_name=None, overwrite=False)
Extracts a single frame from a video using ffmpeg.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
filename
|
str
|
Path to the input video file. |
required |
frame
|
int
|
The frame number to extract. |
None
|
time
|
Union[str, float]
|
The time in HH:MM:ss.ms where to extract the frame from. If float, it is interpreted as seconds from the start of the video. |
None
|
target_name
|
str
|
The name for the output file. If None, the name will be FRAME. |
None
|
overwrite
|
bool
|
Whether to allow overwriting existing files or to automatically increment target filename to avoid overwriting. Defaults to True. |
False
|
Source code in musicalgestures/_utils.py
771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 | |
extract_subclip ¶
extract_subclip(filename, t1, t2, target_name=None, overwrite=True)
Extracts a section of the video using ffmpeg.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
filename
|
str
|
Path to the input video file. |
required |
t1
|
float
|
The start of the section to extract in seconds. |
required |
t2
|
float
|
The end of the section to extract in seconds. |
required |
target_name
|
str
|
The name for the output file. If None, the name will be SUB |
None
|
overwrite
|
bool
|
Whether to allow overwriting existing files or to automatically increment target filename to avoid overwriting. Defaults to True. |
True
|
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
Path to the extracted section as a video. |
Source code in musicalgestures/_utils.py
827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 | |
rotate_video ¶
rotate_video(filename, angle, target_name=None, overwrite=True)
Rotates a video by an angle using ffmpeg.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
filename
|
str
|
Path to the input video file. |
required |
angle
|
float
|
The angle (in degrees) specifying the amount of rotation. Positive values rotate clockwise. |
required |
target_name
|
str
|
Target filename as path. Defaults to None (which assumes that the input filename with the suffix "_rot" should be used). |
None
|
overwrite
|
bool
|
Whether to allow overwriting existing files or to automatically increment target filename to avoid overwriting. Defaults to True. |
True
|
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
The path to the rotated video file. |
Source code in musicalgestures/_utils.py
880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 | |
convert_to_grayscale ¶
convert_to_grayscale(filename, target_name=None, overwrite=True)
Converts a video to grayscale using ffmpeg.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
filename
|
str
|
Path to the input video file. |
required |
target_name
|
str
|
Target filename as path. Defaults to None (which assumes that the input filename with the suffix "_gray" should be used). |
None
|
overwrite
|
bool
|
Whether to allow overwriting existing files or to automatically increment target filename to avoid overwriting. Defaults to True. |
True
|
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
The path to the grayscale video file. |
Source code in musicalgestures/_utils.py
918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 | |
framediff_ffmpeg ¶
framediff_ffmpeg(filename, target_name=None, color=True, overwrite=True)
Renders a frame difference video from the input using ffmpeg.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
filename
|
str
|
Path to the input video file. |
required |
target_name
|
str
|
The name of the output video. Defaults to None (which assumes that the input filename with the suffix "_framediff" should be used). |
None
|
color
|
bool
|
If False, the output will be grayscale. Defaults to True. |
True
|
overwrite
|
bool
|
Whether to allow overwriting existing files or to automatically increment target filename to avoid overwriting. Defaults to True. |
True
|
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
Path to the output video. |
Source code in musicalgestures/_utils.py
946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 | |
threshold_ffmpeg ¶
threshold_ffmpeg(filename, threshold=0.1, target_name=None, binary=False, overwrite=True)
Renders a pixel-thresholded video from the input using ffmpeg.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
filename
|
str
|
Path to the input video file. |
required |
threshold
|
float
|
The normalized pixel value to use as the threshold. Pixels below the threshold will turn black. Defaults to 0.1. |
0.1
|
target_name
|
str
|
The name of the output video. Defaults to None (which assumes that the input filename with the suffix "_thresh" should be used). |
None
|
binary
|
bool
|
If True, the pixels above the threshold will turn white. Defaults to False. |
False
|
overwrite
|
bool
|
Whether to allow overwriting existing files or to automatically increment target filename to avoid overwriting. Defaults to True. |
True
|
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
Path to the output video. |
Source code in musicalgestures/_utils.py
979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 | |
motionvideo_ffmpeg ¶
motionvideo_ffmpeg(filename, color=True, filtertype='regular', threshold=0.05, blur='none', use_median=False, kernel_size=5, invert=False, target_name=None, overwrite=True)
Renders a motion video using ffmpeg.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
filename
|
str
|
Path to the input video file. |
required |
color
|
bool
|
If False the input is converted to grayscale at the start of the process. This can significantly reduce render time. Defaults to True. |
True
|
filtertype
|
str
|
'Regular' turns all values below |
'regular'
|
threshold
|
float
|
Eliminates pixel values less than given threshold. Ranges from 0 to 1. Defaults to 0.05. |
0.05
|
blur
|
str
|
'Average' to apply a 10px * 10px blurring filter, 'None' otherwise. Defaults to 'None'. |
'none'
|
use_median
|
bool
|
If True the algorithm applies a median filter on the thresholded frame-difference stream. Defaults to False. |
False
|
kernel_size
|
int
|
Size of the median filter (if |
5
|
invert
|
bool
|
If True, inverts colors of the motion video. Defaults to False. |
False
|
target_name
|
str
|
Defaults to None (which assumes that the input filename with the suffix "_motion" should be used). |
None
|
overwrite
|
bool
|
Whether to allow overwriting existing files or to automatically increment target filename to avoid overwriting. Defaults to True. |
True
|
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
Path to the output video. |
Source code in musicalgestures/_utils.py
1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 | |
motiongrams_ffmpeg ¶
motiongrams_ffmpeg(filename, color=True, filtertype='regular', threshold=0.05, blur='none', use_median=False, kernel_size=5, invert=False, target_name_x=None, target_name_y=None, overwrite=True)
Renders horizontal and vertical motiongrams using ffmpeg.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
filename
|
str
|
Path to the input video file. |
required |
color
|
bool
|
If False the input is converted to grayscale at the start of the process. This can significantly reduce render time. Defaults to True. |
True
|
filtertype
|
str
|
'Regular' turns all values below |
'regular'
|
threshold
|
float
|
Eliminates pixel values less than given threshold. Ranges from 0 to 1. Defaults to 0.05. |
0.05
|
blur
|
str
|
'Average' to apply a 10px * 10px blurring filter, 'None' otherwise. Defaults to 'None'. |
'none'
|
use_median
|
bool
|
If True the algorithm applies a median filter on the thresholded frame-difference stream. Defaults to False. |
False
|
kernel_size
|
int
|
Size of the median filter (if |
5
|
invert
|
bool
|
If True, inverts colors of the motiongrams. Defaults to False. |
False
|
target_name_x
|
str
|
Target output name for the motiongram on the X axis. Defaults to None (which assumes that the input filename with the suffix "_mgx_ffmpeg" should be used). |
None
|
target_name_y
|
str
|
Target output name for the motiongram on the Y axis. Defaults to None (which assumes that the input filename with the suffix "_mgy_ffmpeg" should be used). |
None
|
overwrite
|
bool
|
Whether to allow overwriting existing files or to automatically increment target filenames to avoid overwriting. Defaults to True. |
True
|
Returns:
| Name | Type | Description |
|---|---|---|
str |
tuple
|
Path to the output horizontal motiongram (_mgx). |
str |
tuple
|
Path to the output vertical motiongram (_mgy). |
Source code in musicalgestures/_utils.py
1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 | |
crop_ffmpeg ¶
crop_ffmpeg(filename, w, h, x, y, target_name=None, overwrite=True)
Crops a video using ffmpeg.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
filename
|
str
|
Path to the input video file. |
required |
w
|
int
|
The desired width. |
required |
h
|
int
|
The desired height. |
required |
x
|
int
|
The horizontal coordinate of the top left pixel of the cropping rectangle. |
required |
y
|
int
|
The vertical coordinate of the top left pixel of the cropping rectangle. |
required |
target_name
|
str
|
The name of the output video. Defaults to None (which assumes that the input filename with the suffix "_crop" should be used). |
None
|
overwrite
|
bool
|
Whether to allow overwriting existing files or to automatically increment target filenames to avoid overwriting. Defaults to True. |
True
|
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
Path to the output video. |
Source code in musicalgestures/_utils.py
1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 | |
extract_wav ¶
extract_wav(filename, target_name=None, overwrite=True)
Extracts audio from video into a .wav file via ffmpeg.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
filename
|
str
|
Path to the video file from which the audio track shall be extracted. |
required |
target_name
|
str
|
The name of the output video. Defaults to None (which assumes that the input filename should be used). |
None
|
overwrite
|
bool
|
Whether to allow overwriting existing files or to automatically increment target filename to avoid overwriting. Defaults to True. |
True
|
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
The path to the output audio file. |
Source code in musicalgestures/_utils.py
1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 | |
ffprobe ¶
ffprobe(filename)
Returns info about video/audio file using FFprobe.
The result is cached per file (keyed by path + modification time + size), so repeated probes of an unchanged file don't spawn a new subprocess each time.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
filename
|
str
|
Path to the video file to measure. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
decoded FFprobe output (stdout) as one string. |
Source code in musicalgestures/_utils.py
1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 | |
get_widthheight ¶
get_widthheight(filename)
Gets the width and height of a video using FFprobe.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
filename
|
str
|
Path to the video file to measure. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
int |
int
|
The width of the input video file. |
int |
int
|
The height of the input video file. |
Source code in musicalgestures/_utils.py
1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 | |
has_audio ¶
has_audio(filename)
Checks if video has audio track using FFprobe.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
filename
|
str
|
Path to the video file to check. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
bool |
bool
|
True if |
Source code in musicalgestures/_utils.py
1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 | |
get_rotation ¶
get_rotation(filename)
Returns the display rotation (degrees) stored in a video's metadata.
Phone/portrait videos often store landscape pixels plus a rotation flag (display matrix). FFmpeg's frame pipe applies this automatically while OpenCV's VideoCapture does not, which can leave some processes rotated. This reads the flag so the orientation can be normalised.
Returns:
| Name | Type | Description |
|---|---|---|
int |
int
|
rotation in degrees (e.g. 0, 90, 180, 270), or 0 if none/unknown. |
Source code in musicalgestures/_utils.py
1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 | |
normalize_rotation ¶
normalize_rotation(filename, overwrite=True)
If a video carries a display-rotation flag (e.g. a phone portrait recording with landscape pixels), re-encode it so the rotation is baked into the pixels and the flag removed. This makes every downstream reader (FFmpeg pipe, OpenCV, filters) agree on the orientation, preventing some processes from coming out rotated.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
filename
|
str
|
Path to the video file. |
required |
overwrite
|
bool
|
Overwrite the "_oriented" output if it exists. Defaults to True. |
True
|
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
Path to an upright video — the original if it had no rotation, otherwise a new "_oriented" copy. |
Source code in musicalgestures/_utils.py
1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 | |
get_length ¶
get_length(filename)
Gets the length (in seconds) of a video using FFprobe.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
filename
|
str
|
Path to the video file to measure. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
float |
float
|
The length of the input video file in seconds. |
Source code in musicalgestures/_utils.py
1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 | |
get_samplerate ¶
get_samplerate(filename)
Gets the sampling rate (in Hz) of a file's audio track using FFprobe.
This exists because librosa cannot be asked. Until version 1.0 librosa fell back
to audioread (and so to ffmpeg) for containers libsndfile cannot open; 1.0 removed
that fallback, so librosa.get_samplerate on a video raises
soundfile.LibsndfileError: Format not recognised. FFprobe reads the container
header without decoding it, which is what a constructor should be doing anyway.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
filename
|
str
|
Path to the video or audio file to measure. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
int |
int
|
The sampling rate of the file's audio track, in Hz. |
Raises:
| Type | Description |
|---|---|
NoStreamError
|
If the file has no audio track, or ffprobe reports no rate for it. |
Source code in musicalgestures/_utils.py
1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 | |
audio_source ¶
audio_source(filename)
Returns a path that libsndfile can open, extracting the audio track if it cannot.
librosa reads audio through soundfile, which is libsndfile, which knows audio
containers and not video ones. Passing it a .avi raises Format not recognised.
This is the same try-then-convert shape MgAudioProcessor already uses in
_colored.py, lifted out so every librosa call site can share it -- and cached,
because a waveform, a spectrogram and a descriptor pass over one video would
otherwise each re-extract the same track.
The extracted file sits beside the source as <name>.wav, which is where
extract_wav and convert already put such things.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
filename
|
str
|
Path to the audio or video file. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
|
Source code in musicalgestures/_utils.py
1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 | |
get_framecount ¶
get_framecount(filename, fast=True)
Returns the number of frames in a video using FFprobe.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
filename
|
str
|
Path to the video file to measure. |
required |
fast
|
bool
|
If True (default), count demuxed video packets
( |
True
|
Returns:
| Name | Type | Description |
|---|---|---|
int |
int
|
The number of frames in the input video file. |
Source code in musicalgestures/_utils.py
1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 | |
get_fps ¶
get_fps(filename)
Gets the FPS (frames per second) value of a video using FFprobe.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
filename
|
str
|
Path to the video file to measure. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
float |
float
|
The FPS value of the input video file. |
Source code in musicalgestures/_utils.py
1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 | |
get_first_frame_as_image ¶
get_first_frame_as_image(filename, target_name=None, pict_format='.png', overwrite=True)
Extracts the first frame of a video and saves it as an image using ffmpeg.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
filename
|
str
|
Path to the input video file. |
required |
target_name
|
str
|
The name for the output image. Defaults to None (which assumes that the input filename should be used). |
None
|
pict_format
|
str
|
The format to use for the output image. Defaults to '.png'. |
'.png'
|
overwrite
|
bool
|
Whether to allow overwriting existing files or to automatically increment target filename to avoid overwriting. Defaults to True. |
True
|
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
Path to the output image file. |
Source code in musicalgestures/_utils.py
1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 | |
get_box_video_ratio ¶
get_box_video_ratio(filename, box_width=800, box_height=600)
Gets the box-to-video ratio between an arbitrarily defind box and the video dimensions. Useful to fit windows into a certain area.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
filename
|
str
|
Path to the input video file. |
required |
box_width
|
int
|
The width of the box to fit the video into. |
800
|
box_height
|
int
|
The height of the box to fit the video into. |
600
|
Returns:
| Name | Type | Description |
|---|---|---|
int |
float
|
The smallest ratio (ie. the one to use for scaling the video window to fit into the box). |
Source code in musicalgestures/_utils.py
1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 | |
quality_metrics ¶
quality_metrics(original, processed, metric=None)
Compute video quality metrics between two video files for comparing the quality of video codecs or measuring the efficacy of encoding configuration. Possible to compute three major video quality metrics used for objective evaluation, namely:
- PSNR: It is the most commonly used video quality metric. But it has the lowest predictive value, so the results are inconsistent. Used by major platforms like Netflix and Facebook to compare different codecs and for similar use cases. Overall usage is declining.
- SSIM: Mostly used by technical experts like codec researchers and compression engineers. Usage is declining steadily. However, it has a higher predictive value than PSNR.
- VMAF: Introduced first by Netflix but then converted into an open-source asset. VMAF is easily accessible and widely used. Designed specifically for evaluating the video quality of streams encoded for multiple-resolution rungs.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
original
|
str
|
Path to the original/reference video file. |
required |
processed
|
str
|
Path to the processed/distorted video file. |
required |
metric
|
str
|
Type of quality metric to compute ('vmaf', 'ssim', or 'psnr'). Defaults to None (which computes all the metrics). |
None
|
Source code in musicalgestures/_utils.py
1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 | |
audio_dilate ¶
audio_dilate(filename, dilation_ratio=1, target_name=None, overwrite=True)
Time-stretches or -shrinks (dilates) an audio file using ffmpeg.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
filename
|
str
|
Path to the audio file to dilate. |
required |
dilation_ratio
|
float
|
The source file's length divided by the resulting file's length. Defaults to 1. |
1
|
target_name
|
str
|
The name of the output video. Defaults to None (which assumes that the input filename with the suffix "_dilated" should be used). |
None
|
overwrite
|
bool
|
Whether to allow overwriting existing files or to automatically increment target filename to avoid overwriting. Defaults to True. |
True
|
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
The path to the output audio file. |
Source code in musicalgestures/_utils.py
1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 | |
embed_audio_in_video ¶
embed_audio_in_video(source_audio, destination_video, dilation_ratio=1)
Embeds an audio file as the audio channel of a video file using ffmpeg.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
source_audio
|
str
|
Path to the audio file to embed. |
required |
destination_video
|
str
|
Path to the video file to embed the audio file in. |
required |
dilation_ratio
|
float
|
The source file's length divided by the resulting file's length. Defaults to 1. |
1
|
Source code in musicalgestures/_utils.py
1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 | |
ffmpeg_cmd ¶
ffmpeg_cmd(command, total_time, pb_prefix='Progress', print_cmd=False, stream=True, pipe=None)
Run an ffmpeg command in a subprocess and show progress using an MgProgressbar.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
command
|
list
|
The ffmpeg command to execute as a list. Eg. ['ffmpeg', '-y', '-i', 'myVid.mp4', 'myVid.mov'] |
required |
total_time
|
float
|
The length of the output. Needed mainly for the progress bar. |
required |
pb_prefix
|
str
|
The prefix for the progress bar. Defaults to 'Progress'. |
'Progress'
|
print_cmd
|
bool
|
Whether to print the full ffmpeg command to the console before executing it. Good for debugging. Defaults to False. |
False
|
stream
|
bool
|
Whether to have a continuous output stream or just (the last) one. Defaults to True (continuous stream). |
True
|
pipe
|
str
|
Whether to pipe video frames from FFmpeg to numpy array. Possible to read the video frame by frame with pipe='read', to load video in memory with pipe='load', or to write the frames of a numpy array to a video file with pipe='write'. Defaults to None. |
None
|
Raises:
| Type | Description |
|---|---|
KeyboardInterrupt
|
If the user stops the process. |
FFmpegError
|
If the ffmpeg process was unsuccessful. |
Source code in musicalgestures/_utils.py
1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 | |
str2sec ¶
str2sec(time_string)
Converts a time code string into seconds.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
time_string
|
str
|
The time code to convert. Eg. '01:33:42'. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
float |
float
|
The time code converted to seconds. |
Source code in musicalgestures/_utils.py
1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 | |
wrap_str ¶
wrap_str(string, matchers=[' ', '(', ')'])
Wraps a string in double quotes if it contains any of matchers - by default: space or parentheses.
Useful when working with shell commands.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
string
|
str
|
The string to inspect. |
required |
matchers
|
list
|
The list of characters to look for in the string. Defaults to [" ", "(", ")"]. |
[' ', '(', ')']
|
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
The (wrapped) string. |
Source code in musicalgestures/_utils.py
1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 | |
unwrap_str ¶
unwrap_str(string)
Unwraps a string from quotes.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
string
|
str
|
The string to inspect. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
The (unwrapped) string. |
Source code in musicalgestures/_utils.py
1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 | |
get_cuda_device_count ¶
get_cuda_device_count()
Returns the number of CUDA-capable GPU devices visible to OpenCV.
Returns:
| Name | Type | Description |
|---|---|---|
int |
int
|
Number of available CUDA devices, or 0 if the OpenCV CUDA module is unavailable or no devices are detected. |
Source code in musicalgestures/_utils.py
1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 | |
cuda_build_available ¶
cuda_build_available()
Returns whether the installed OpenCV was compiled with CUDA support.
Returns:
| Name | Type | Description |
|---|---|---|
bool |
bool
|
True if OpenCV's build information reports CUDA support, else False. |
Source code in musicalgestures/_utils.py
1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 | |
cuda_unavailable_reason ¶
cuda_unavailable_reason()
Returns a short, actionable explanation of why the OpenCV CUDA backend is unavailable.
Distinguishes the common case (the pip OpenCV wheels are built without CUDA) from the case where OpenCV has CUDA but no GPU/driver is detected.
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
A human-readable explanation. |
Source code in musicalgestures/_utils.py
1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 | |
in_colab ¶
in_colab()
Check's if the environment is a Google Colab document.
Returns:
| Name | Type | Description |
|---|---|---|
bool |
bool
|
True if the environment is a Colab document, otherwise False. |
Source code in musicalgestures/_utils.py
2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 | |
in_ipynb ¶
in_ipynb()
Check if the environment is a Jupyter notebook. Taken from https://stackoverflow.com/questions/15411967/how-can-i-check-if-code-is-executed-in-the-ipython-notebook.
Returns:
| Name | Type | Description |
|---|---|---|
bool |
bool
|
True if the environment is a Jupyter notebook, otherwise False. |
Source code in musicalgestures/_utils.py
2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 | |
merge_videos ¶
merge_videos(media_paths, target_name=None, overwrite=False, print_cmd=False)
Merges a list of video files into a single video file using ffmpeg.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
media_paths
|
list
|
List of paths to the video files to merge. |
required |
target_name
|
str
|
The name of the output video. Defaults to None (which assumes that the input filename with the suffix "_merged" should be used). |
None
|
overwrite
|
bool
|
Whether to allow overwriting existing files or to automatically increment target filename to avoid overwriting. Defaults to True. |
False
|
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
Path to the output video. |
Source code in musicalgestures/_utils.py
2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 | |