mirror of
https://github.com/clearml/clearml
synced 2025-03-03 10:42:00 +00:00
Add audio/video reporting examples
This commit is contained in:
parent
0743fa47f7
commit
fba3d70ce8
22
examples/report_media.py
Normal file
22
examples/report_media.py
Normal file
@ -0,0 +1,22 @@
|
||||
# TRAINS - Example reporting video or audio links/file
|
||||
#
|
||||
import os
|
||||
from trains import Task, Logger
|
||||
|
||||
|
||||
task = Task.init(project_name="examples", task_name="Reporting audio and video")
|
||||
|
||||
# report an already uploaded video media (url)
|
||||
Logger.current_logger().report_media(
|
||||
'video', 'big bunny', iteration=1,
|
||||
url='https://test-videos.co.uk/vids/bigbuckbunny/mp4/h264/720/Big_Buck_Bunny_720_10s_1MB.mp4')
|
||||
|
||||
# report an already uploaded audio media (url)
|
||||
Logger.current_logger().report_media(
|
||||
'audio', 'pink panther', iteration=1,
|
||||
url='https://www2.cs.uic.edu/~i101/SoundFiles/PinkPanther30.wav')
|
||||
|
||||
# report local media file
|
||||
Logger.current_logger().report_media(
|
||||
'audio', 'tada', iteration=1,
|
||||
local_path=os.path.join('samples', 'sample.mp3'))
|
BIN
examples/samples/sample.mp3
Normal file
BIN
examples/samples/sample.mp3
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user