Difference between revisions of "SA SYNC"

From Wiki4Intranet
Jump to: navigation, search
(Исходники .-.)
(План .-.)
Line 67: Line 67:
 
     rankdir=LR;
 
     rankdir=LR;
 
                        
 
                        
"../sources/cam1/source.py.avs" [style=filled fillcolor=lightgrey]
+
"source.py.avs" [style=filled fillcolor=lightgrey]
"../sources/cam1/video.avs" -> "../sources/cam1/source.py.avs" [label="includes" style=dashed color=lightblue ]
+
"sa-test4sync-keyboard.avi" [style=filled fillcolor=yellow]
"2012-08-08-test.uncut.mkv" [style=filled fillcolor=lightgrey]
+
"source.py.avs" -> "sa-test4sync-keyboard.avi" [label="includes" style=dashed color=lightblue ]
"2012-08-08-test.uncut.mkv" -> "2012-08-08-test.uncut" [label="parent" style=solid color=darkblue ]
+
"source.py.avs" [style=filled fillcolor=lightgrey]
"../sources/screen1/video.avs$vbitrate=800.avi" [style=filled fillcolor=lightgrey]
+
"source.py.avs" -> "source.py" [label="parent" style=solid color=darkblue ]
"../sources/screen1/video.avs$vbitrate=800.avi" -> "../sources/screen1/video.avs" [label="parent" style=solid color=darkblue ]
+
"source.py.avs" [style=filled fillcolor=lightgrey]
"../sources/cam1/video.avs$vbitrate=700.avi" [style=filled fillcolor=lightgrey]
+
"audio.avs" -> "source.py.avs" [label="includes" style=dashed color=lightblue ]
"../sources/cam1/video.avs$vbitrate=700.avi" -> "../sources/cam1/video.avs" [label="parent" style=solid color=darkblue ]
+
"sa-test4sync-keyboard.avi.meta" [style=filled fillcolor=lightgrey]
"../sources/cam1/video.avs" -> "../sources/cam1/videofilters.avs" [label="includes" style=dashed color=lightblue ]
+
"sa-test4sync-keyboard.avi" [style=filled fillcolor=yellow]
"../sources/cam1/source.py.avs" [style=filled fillcolor=lightgrey]
+
"sa-test4sync-keyboard.avi.meta" -> "sa-test4sync-keyboard.avi" [label="parent" style=solid color=darkblue ]
"../sources/cam1/sa-sample-camera.avi" [style=filled fillcolor=yellow]
+
"start_time.py.avs" [style=filled fillcolor=lightgrey]
"../sources/cam1/source.py.avs" -> "../sources/cam1/sa-sample-camera.avi" [label="includes" style=dashed color=lightblue ]
+
"audio.avs" -> "start_time.py.avs" [label="includes" style=dashed color=lightblue ]
"../sources/screen1/common.avs" -> "../lib/lib.avs" [label="includes" style=dashed color=lightblue ]
+
"audio.avs$mode=trailer,ss=300,len=300.wav" [style=filled fillcolor=lightgrey]
"../lib/lib.avs" -> "../lib/debugmode.avs" [label="includes" style=dashed color=lightblue ]
+
"audio.avs$mode=trailer,ss=300,len=300.wav" -> "audio.avs" [label="parent" style=solid color=darkblue ]
"../sources/screen1/start_time.py.avs" [style=filled fillcolor=lightgrey]
+
"../../lib/lib.avs" -> "../../lib/debugmode.avs" [label="includes" style=dashed color=lightblue ]
"../sources/screen1/start_time.py.avs" -> "../sources/screen1/start_time.py" [label="parent" style=solid color=darkblue ]
+
"sa-test4sync-keyboard.avi.meta" [style=filled fillcolor=lightgrey]
"../sources/screen1/source.py.avs" [style=filled fillcolor=lightgrey]
+
"source.py" -> "sa-test4sync-keyboard.avi.meta" [label="includes" style=dashed color=lightblue ]
"../sources/screen1/source.py.avs" -> "../sources/screen1/common.avs" [label="includes" style=dashed color=lightblue ]
+
"../../lib/lib.avs" -> "../../lib/cachemode.avs" [label="includes" style=dashed color=lightblue ]
"../sources/cam1/start_time.py.avs" [style=filled fillcolor=lightgrey]
+
"audio.avs" -> "common.avs" [label="includes" style=dashed color=lightblue ]
"../sources/cam1/start_time.py.avs" -> "../sources/cam1/start_time.py" [label="parent" style=solid color=darkblue ]
+
"common.avs" -> "../../lib/lib.avs" [label="includes" style=dashed color=lightblue ]
"../sources/cam1/video.avs" -> "../sources/cam1/common.avs" [label="includes" style=dashed color=lightblue ]
+
"start_time.py.avs" [style=filled fillcolor=lightgrey]
"../sources/cam1/start_time.py.avs" [style=filled fillcolor=lightgrey]
+
"start_time.py.avs" -> "start_time.py" [label="parent" style=solid color=darkblue ]
"../sources/cam1/video.avs" -> "../sources/cam1/start_time.py.avs" [label="includes" style=dashed color=lightblue ]
+
"source.py.avs" [style=filled fillcolor=lightgrey]
"../sources/screen1/source.py.avs" [style=filled fillcolor=lightgrey]
+
"source.py.avs" -> "common.avs" [label="includes" style=dashed color=lightblue ]
"../sources/screen1/video.avs" -> "../sources/screen1/source.py.avs" [label="includes" style=dashed color=lightblue ]
+
"../sources/cam1/source.py.avs" [style=filled fillcolor=lightgrey]
+
"../sources/cam1/source.py.avs" -> "../sources/cam1/source.py" [label="parent" style=solid color=darkblue ]
+
"../lib/lib.avs" -> "../lib/cachemode.avs" [label="includes" style=dashed color=lightblue ]
+
"../sources/cam1/sa-sample-camera.avi.meta" [style=filled fillcolor=lightgrey]
+
"../sources/cam1/sa-sample-camera.avi" [style=filled fillcolor=yellow]
+
"../sources/cam1/sa-sample-camera.avi.meta" -> "../sources/cam1/sa-sample-camera.avi" [label="parent" style=solid color=darkblue ]
+
"../sources/cam1/source.py.avs" [style=filled fillcolor=lightgrey]
+
"../sources/cam1/source.py.avs" -> "../sources/cam1/common.avs" [label="includes" style=dashed color=lightblue ]
+
"../sources/screen1/start_time.py.avs" [style=filled fillcolor=lightgrey]
+
"../sources/screen1/video.avs" -> "../sources/screen1/start_time.py.avs" [label="includes" style=dashed color=lightblue ]
+
"../sources/screen1/video.avs" -> "../sources/screen1/common.avs" [label="includes" style=dashed color=lightblue ]
+
"../sources/cam1/common.avs" -> "../lib/lib.avs" [label="includes" style=dashed color=lightblue ]
+
"../sources/cam1/sa-sample-camera.avi.meta" [style=filled fillcolor=lightgrey]
+
"../sources/cam1/source.py" -> "../sources/cam1/sa-sample-camera.avi.meta" [label="includes" style=dashed color=lightblue ]
+
"../sources/screen1/video.avs$vbitrate=800.avi" [style=filled fillcolor=lightgrey]
+
"2012-08-08-test.uncut" -> "../sources/screen1/video.avs$vbitrate=800.avi" [label="includes" style=dashed color=lightblue ]
+
"../sources/screen1/sa-sample-screencast.avi.meta" [style=filled fillcolor=lightgrey]
+
"../sources/screen1/sa-sample-screencast.avi" [style=filled fillcolor=yellow]
+
"../sources/screen1/sa-sample-screencast.avi.meta" -> "../sources/screen1/sa-sample-screencast.avi" [label="parent" style=solid color=darkblue ]
+
"../sources/screen1/sa-sample-screencast.avi.meta" [style=filled fillcolor=lightgrey]
+
"../sources/screen1/source.py" -> "../sources/screen1/sa-sample-screencast.avi.meta" [label="includes" style=dashed color=lightblue ]
+
"../sources/screen1/source.py.avs" [style=filled fillcolor=lightgrey]
+
"../sources/screen1/source.py.avs" -> "../sources/screen1/source.py" [label="parent" style=solid color=darkblue ]
+
"../sources/screen1/source.py.avs" [style=filled fillcolor=lightgrey]
+
"../sources/screen1/sa-sample-screencast.avi" [style=filled fillcolor=yellow]
+
"../sources/screen1/source.py.avs" -> "../sources/screen1/sa-sample-screencast.avi" [label="includes" style=dashed color=lightblue ]
+
"../sources/cam1/video.avs$vbitrate=700.avi" [style=filled fillcolor=lightgrey]
+
"2012-08-08-test.uncut" -> "../sources/cam1/video.avs$vbitrate=700.avi" [label="includes" style=dashed color=lightblue ]
+
 
}
 
}
 
</graph>
 
</graph>

Revision as of 21:29, 10 September 2012

Title

«SA SYNC»
Author
Stas Fomin
Subfooter

Stas Fomin, 19:21, 13 September 2012


SA: продвинутая синхронизация .-.

Задание «SA INIT» уже выполнено? Если нетSA INIT


Берем

  • запись с двух камер
  • скринкаст

Синхронизируем

  • по звуку
  • событию (на глаз) + по звуку

Делаем «Матрешку»

Исходники .-.

Создаем тестовый проект

sa-test4sync-cam.avi
cam1
sa-test4sync-keyboard.avi
cam2
sa-test4sync-screencast.avi
screen1

Потоки .-.

Потоки в SA. Синхронизация по звуку.svg


start_time.py .-.

REFERENCE_STREAM={}
 
#Uncomment this (and modify appropriately) if you want to time linking to other stream
#execfile(ut.get_script_dir() + '/../cam1/start_time.py', globals(), REFERENCE_STREAM)
 
diff_ms = 0
if 'START' in REFERENCE_STREAM:
   diff_ms = REFERENCE_STREAM['START']   
 
# Linking by some visible event
their_time_ms = ut.time2ms('1:23')         # Time of the event on reference stream
my_time_ms = ut.time2ms('53:45')            # Time of the event on visible stream
 
diff_ms += int(my_time_ms - their_time_ms)
diff_ms += 1234
 
START = diff_ms
AVS = "global TRIM_START_MS  = %(diff_ms)s " % vars()

План .-.

[svg]

Синхронизация через просмотр

sources/cam1 .-.

Подгоним скринкаст под камеру!

Просмотрим файл с камерой:

sa view sa-sample-camera.avi

  • Найдите какое-нибудь событие на экране
  • Листание:
Грубое
SHIFT←→, PgUp/PgDown, таймлайн.
Точное
←→
  • CTRL-G: «Go-To Frame»
  • CTRL-A/CTRL-Cвремя в клипборд

sources/screen1 .-.

start_time.py
вписываем время из клипборда
their_time_ms = ut.time2ms('0:00')

Просмотрим скринкаст, время того же события в клипборд

sa v sa-sample-screencast.avi
start_time.py
вписываем время
 my_time_ms = ut.time2ms('0:00')

SA BUILD .-.

В папке scenes, запустить

sa b 2012-08-08-test.uncut.mkv


  • Заняться своими делами.

Когда закончит, проверить, что 2012-08-08-test.uncut.mkv — играется, и каналы синхронны.

См. http://wiki.4intra.net/Matroska4seminars-stas-fomin

ВСЕ! .-.

Этого достаточно:

  • Монтировать 95% внутрикомпанейских видео.
  • MKV-публикуется на файл-сервере.
  • Ссылки на отрывки с вики-системы.