@thunderkiller/video-clipper 1.6.0 → 1.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +21 -8
- package/dist/{cli.d.ts → app/cli/args.d.ts} +2 -2
- package/dist/app/cli/args.d.ts.map +1 -0
- package/dist/{cli.js → app/cli/args.js} +3 -3
- package/dist/app/cli/args.js.map +1 -0
- package/dist/{index.d.ts.map → app/cli/index.d.ts.map} +1 -1
- package/dist/{index.js → app/cli/index.js} +4 -4
- package/dist/app/cli/index.js.map +1 -0
- package/dist/{pipeline → app/cli/pipeline}/dumper.d.ts +1 -1
- package/dist/app/cli/pipeline/dumper.d.ts.map +1 -0
- package/dist/{pipeline → app/cli/pipeline}/dumper.js +2 -2
- package/dist/app/cli/pipeline/dumper.js.map +1 -0
- package/dist/{pipeline → app/cli/pipeline}/runner.d.ts +1 -1
- package/dist/app/cli/pipeline/runner.d.ts.map +1 -0
- package/dist/app/cli/pipeline/runner.js +248 -0
- package/dist/app/cli/pipeline/runner.js.map +1 -0
- package/dist/app/cli/pipeline/stages/audioProcessor.d.ts +17 -0
- package/dist/app/cli/pipeline/stages/audioProcessor.d.ts.map +1 -0
- package/dist/{pipeline → app/cli/pipeline}/stages/audioProcessor.js +17 -32
- package/dist/app/cli/pipeline/stages/audioProcessor.js.map +1 -0
- package/dist/app/cli/pipeline/stages/videoResolver.d.ts +4 -0
- package/dist/app/cli/pipeline/stages/videoResolver.d.ts.map +1 -0
- package/dist/{pipeline → app/cli/pipeline}/stages/videoResolver.js +6 -14
- package/dist/app/cli/pipeline/stages/videoResolver.js.map +1 -0
- package/dist/app/web/lib/activity/analysisActivity.d.ts +20 -0
- package/dist/app/web/lib/activity/analysisActivity.d.ts.map +1 -0
- package/dist/app/web/lib/activity/analysisActivity.js +194 -0
- package/dist/app/web/lib/activity/analysisActivity.js.map +1 -0
- package/dist/app/web/lib/activity/analysisLogging.d.ts +3 -0
- package/dist/app/web/lib/activity/analysisLogging.d.ts.map +1 -0
- package/dist/app/web/lib/activity/analysisLogging.js +17 -0
- package/dist/app/web/lib/activity/analysisLogging.js.map +1 -0
- package/dist/app/web/lib/analysisStream.d.ts +13 -0
- package/dist/app/web/lib/analysisStream.d.ts.map +1 -0
- package/dist/app/web/lib/analysisStream.js +83 -0
- package/dist/app/web/lib/analysisStream.js.map +1 -0
- package/dist/app/web/lib/api.d.ts +3 -0
- package/dist/app/web/lib/api.d.ts.map +1 -0
- package/dist/app/web/lib/api.js +21 -0
- package/dist/app/web/lib/api.js.map +1 -0
- package/dist/app/web/lib/configStore.d.ts +8 -0
- package/dist/app/web/lib/configStore.d.ts.map +1 -0
- package/dist/app/web/lib/configStore.js +67 -0
- package/dist/app/web/lib/configStore.js.map +1 -0
- package/dist/app/web/lib/format.d.ts +3 -0
- package/dist/app/web/lib/format.d.ts.map +1 -0
- package/dist/app/web/lib/format.js +17 -0
- package/dist/app/web/lib/format.js.map +1 -0
- package/dist/app/web/lib/index.d.ts +2 -0
- package/dist/app/web/lib/index.d.ts.map +1 -0
- package/dist/app/web/lib/index.js +2 -0
- package/dist/app/web/lib/index.js.map +1 -0
- package/dist/app/web/lib/services/analysis/analysisService.d.ts +5 -0
- package/dist/app/web/lib/services/analysis/analysisService.d.ts.map +1 -0
- package/dist/app/web/lib/services/analysis/analysisService.js +146 -0
- package/dist/app/web/lib/services/analysis/analysisService.js.map +1 -0
- package/dist/app/web/lib/services/analysis/streamEvents.d.ts +4 -0
- package/dist/app/web/lib/services/analysis/streamEvents.d.ts.map +1 -0
- package/dist/app/web/lib/services/analysis/streamEvents.js +69 -0
- package/dist/app/web/lib/services/analysis/streamEvents.js.map +1 -0
- package/dist/app/web/lib/services/analysis/transcriptService.d.ts +4 -0
- package/dist/app/web/lib/services/analysis/transcriptService.d.ts.map +1 -0
- package/dist/app/web/lib/services/analysis/transcriptService.js +34 -0
- package/dist/app/web/lib/services/analysis/transcriptService.js.map +1 -0
- package/dist/app/web/lib/services/artifacts/artifactStore.d.ts +14 -0
- package/dist/app/web/lib/services/artifacts/artifactStore.d.ts.map +1 -0
- package/dist/app/web/lib/services/artifacts/artifactStore.js +109 -0
- package/dist/app/web/lib/services/artifacts/artifactStore.js.map +1 -0
- package/dist/app/web/lib/services/clipping/clipService.d.ts +4 -0
- package/dist/app/web/lib/services/clipping/clipService.d.ts.map +1 -0
- package/dist/app/web/lib/services/clipping/clipService.js +73 -0
- package/dist/app/web/lib/services/clipping/clipService.js.map +1 -0
- package/dist/app/web/lib/services/config/webConfig.d.ts +10 -0
- package/dist/app/web/lib/services/config/webConfig.d.ts.map +1 -0
- package/dist/app/web/lib/services/config/webConfig.js +12 -0
- package/dist/app/web/lib/services/config/webConfig.js.map +1 -0
- package/dist/app/web/lib/services/http/responses.d.ts +8 -0
- package/dist/app/web/lib/services/http/responses.d.ts.map +1 -0
- package/dist/app/web/lib/services/http/responses.js +23 -0
- package/dist/app/web/lib/services/http/responses.js.map +1 -0
- package/dist/app/web/lib/services/publishing/draftService.d.ts +5 -0
- package/dist/app/web/lib/services/publishing/draftService.d.ts.map +1 -0
- package/dist/app/web/lib/services/publishing/draftService.js +70 -0
- package/dist/app/web/lib/services/publishing/draftService.js.map +1 -0
- package/dist/app/web/lib/services/publishing/metadataCache.d.ts +12 -0
- package/dist/app/web/lib/services/publishing/metadataCache.d.ts.map +1 -0
- package/dist/app/web/lib/services/publishing/metadataCache.js +44 -0
- package/dist/app/web/lib/services/publishing/metadataCache.js.map +1 -0
- package/dist/app/web/lib/services/publishing/metadataService.d.ts +5 -0
- package/dist/app/web/lib/services/publishing/metadataService.d.ts.map +1 -0
- package/dist/app/web/lib/services/publishing/metadataService.js +131 -0
- package/dist/app/web/lib/services/publishing/metadataService.js.map +1 -0
- package/dist/app/web/lib/services/publishing/uploadService.d.ts +9 -0
- package/dist/app/web/lib/services/publishing/uploadService.d.ts.map +1 -0
- package/dist/app/web/lib/services/publishing/uploadService.js +224 -0
- package/dist/app/web/lib/services/publishing/uploadService.js.map +1 -0
- package/dist/app/web/lib/services/publishing/uploadStreamEvents.d.ts +4 -0
- package/dist/app/web/lib/services/publishing/uploadStreamEvents.d.ts.map +1 -0
- package/dist/app/web/lib/services/publishing/uploadStreamEvents.js +45 -0
- package/dist/app/web/lib/services/publishing/uploadStreamEvents.js.map +1 -0
- package/dist/app/web/lib/services/youtube/authStore.d.ts +5 -0
- package/dist/app/web/lib/services/youtube/authStore.d.ts.map +1 -0
- package/dist/app/web/lib/services/youtube/authStore.js +46 -0
- package/dist/app/web/lib/services/youtube/authStore.js.map +1 -0
- package/dist/app/web/lib/services/youtube/catalogFactory.d.ts +3 -0
- package/dist/app/web/lib/services/youtube/catalogFactory.d.ts.map +1 -0
- package/dist/app/web/lib/services/youtube/catalogFactory.js +10 -0
- package/dist/app/web/lib/services/youtube/catalogFactory.js.map +1 -0
- package/dist/app/web/lib/services/youtube/uploadAuth.d.ts +14 -0
- package/dist/app/web/lib/services/youtube/uploadAuth.d.ts.map +1 -0
- package/dist/app/web/lib/services/youtube/uploadAuth.js +194 -0
- package/dist/app/web/lib/services/youtube/uploadAuth.js.map +1 -0
- package/dist/app/web/lib/toastStore.d.ts +9 -0
- package/dist/app/web/lib/toastStore.d.ts.map +1 -0
- package/dist/app/web/lib/toastStore.js +14 -0
- package/dist/app/web/lib/toastStore.js.map +1 -0
- package/dist/app/web/lib/uploadStream.d.ts +19 -0
- package/dist/app/web/lib/uploadStream.d.ts.map +1 -0
- package/dist/app/web/lib/uploadStream.js +68 -0
- package/dist/app/web/lib/uploadStream.js.map +1 -0
- package/dist/app/web/lib/videoWorkflow.d.ts +10 -0
- package/dist/app/web/lib/videoWorkflow.d.ts.map +1 -0
- package/dist/app/web/lib/videoWorkflow.js +39 -0
- package/dist/app/web/lib/videoWorkflow.js.map +1 -0
- package/dist/app/web/routes/api/analysis/transcript/+server.d.ts +3 -0
- package/dist/app/web/routes/api/analysis/transcript/+server.d.ts.map +1 -0
- package/dist/app/web/routes/api/analysis/transcript/+server.js +71 -0
- package/dist/app/web/routes/api/analysis/transcript/+server.js.map +1 -0
- package/dist/app/web/routes/api/clips/+server.d.ts +3 -0
- package/dist/app/web/routes/api/clips/+server.d.ts.map +1 -0
- package/dist/app/web/routes/api/clips/+server.js +25 -0
- package/dist/app/web/routes/api/clips/+server.js.map +1 -0
- package/dist/app/web/routes/api/config/+server.d.ts +4 -0
- package/dist/app/web/routes/api/config/+server.d.ts.map +1 -0
- package/dist/app/web/routes/api/config/+server.js +37 -0
- package/dist/app/web/routes/api/config/+server.js.map +1 -0
- package/dist/app/web/routes/api/library/analyses/+server.d.ts +3 -0
- package/dist/app/web/routes/api/library/analyses/+server.d.ts.map +1 -0
- package/dist/app/web/routes/api/library/analyses/+server.js +16 -0
- package/dist/app/web/routes/api/library/analyses/+server.js.map +1 -0
- package/dist/app/web/routes/api/library/analyses/[analysisId]/+server.d.ts +3 -0
- package/dist/app/web/routes/api/library/analyses/[analysisId]/+server.d.ts.map +1 -0
- package/dist/app/web/routes/api/library/analyses/[analysisId]/+server.js +31 -0
- package/dist/app/web/routes/api/library/analyses/[analysisId]/+server.js.map +1 -0
- package/dist/app/web/routes/api/library/clips/+server.d.ts +3 -0
- package/dist/app/web/routes/api/library/clips/+server.d.ts.map +1 -0
- package/dist/app/web/routes/api/library/clips/+server.js +29 -0
- package/dist/app/web/routes/api/library/clips/+server.js.map +1 -0
- package/dist/app/web/routes/api/publish/drafts/+server.d.ts +3 -0
- package/dist/app/web/routes/api/publish/drafts/+server.d.ts.map +1 -0
- package/dist/app/web/routes/api/publish/drafts/+server.js +23 -0
- package/dist/app/web/routes/api/publish/drafts/+server.js.map +1 -0
- package/dist/app/web/routes/api/publish/drafts/[analysisId]/+server.d.ts +3 -0
- package/dist/app/web/routes/api/publish/drafts/[analysisId]/+server.d.ts.map +1 -0
- package/dist/app/web/routes/api/publish/drafts/[analysisId]/+server.js +34 -0
- package/dist/app/web/routes/api/publish/drafts/[analysisId]/+server.js.map +1 -0
- package/dist/app/web/routes/api/publish/drafts/generate/+server.d.ts +3 -0
- package/dist/app/web/routes/api/publish/drafts/generate/+server.d.ts.map +1 -0
- package/dist/app/web/routes/api/publish/drafts/generate/+server.js +33 -0
- package/dist/app/web/routes/api/publish/drafts/generate/+server.js.map +1 -0
- package/dist/app/web/routes/api/publish/thumbnails/+server.d.ts +3 -0
- package/dist/app/web/routes/api/publish/thumbnails/+server.d.ts.map +1 -0
- package/dist/app/web/routes/api/publish/thumbnails/+server.js +53 -0
- package/dist/app/web/routes/api/publish/thumbnails/+server.js.map +1 -0
- package/dist/app/web/routes/api/youtube/auth/callback/+server.d.ts +3 -0
- package/dist/app/web/routes/api/youtube/auth/callback/+server.d.ts.map +1 -0
- package/dist/app/web/routes/api/youtube/auth/callback/+server.js +49 -0
- package/dist/app/web/routes/api/youtube/auth/callback/+server.js.map +1 -0
- package/dist/app/web/routes/api/youtube/auth/disconnect/+server.d.ts +3 -0
- package/dist/app/web/routes/api/youtube/auth/disconnect/+server.d.ts.map +1 -0
- package/dist/app/web/routes/api/youtube/auth/disconnect/+server.js +16 -0
- package/dist/app/web/routes/api/youtube/auth/disconnect/+server.js.map +1 -0
- package/dist/app/web/routes/api/youtube/auth/manual/+server.d.ts +3 -0
- package/dist/app/web/routes/api/youtube/auth/manual/+server.d.ts.map +1 -0
- package/dist/app/web/routes/api/youtube/auth/manual/+server.js +23 -0
- package/dist/app/web/routes/api/youtube/auth/manual/+server.js.map +1 -0
- package/dist/app/web/routes/api/youtube/auth/start/+server.d.ts +3 -0
- package/dist/app/web/routes/api/youtube/auth/start/+server.d.ts.map +1 -0
- package/dist/app/web/routes/api/youtube/auth/start/+server.js +43 -0
- package/dist/app/web/routes/api/youtube/auth/start/+server.js.map +1 -0
- package/dist/app/web/routes/api/youtube/auth/status/+server.d.ts +3 -0
- package/dist/app/web/routes/api/youtube/auth/status/+server.d.ts.map +1 -0
- package/dist/app/web/routes/api/youtube/auth/status/+server.js +16 -0
- package/dist/app/web/routes/api/youtube/auth/status/+server.js.map +1 -0
- package/dist/app/web/routes/api/youtube/channels/[channelId]/videos/+server.d.ts +3 -0
- package/dist/app/web/routes/api/youtube/channels/[channelId]/videos/+server.d.ts.map +1 -0
- package/dist/app/web/routes/api/youtube/channels/[channelId]/videos/+server.js +32 -0
- package/dist/app/web/routes/api/youtube/channels/[channelId]/videos/+server.js.map +1 -0
- package/dist/app/web/routes/api/youtube/channels/resolve/+server.d.ts +3 -0
- package/dist/app/web/routes/api/youtube/channels/resolve/+server.d.ts.map +1 -0
- package/dist/app/web/routes/api/youtube/channels/resolve/+server.js +27 -0
- package/dist/app/web/routes/api/youtube/channels/resolve/+server.js.map +1 -0
- package/dist/app/web/routes/api/youtube/uploads/+server.d.ts +5 -0
- package/dist/app/web/routes/api/youtube/uploads/+server.d.ts.map +1 -0
- package/dist/app/web/routes/api/youtube/uploads/+server.js +107 -0
- package/dist/app/web/routes/api/youtube/uploads/+server.js.map +1 -0
- package/dist/app/web/routes/api/youtube/videos/[videoId]/+server.d.ts +3 -0
- package/dist/app/web/routes/api/youtube/videos/[videoId]/+server.d.ts.map +1 -0
- package/dist/app/web/routes/api/youtube/videos/[videoId]/+server.js +28 -0
- package/dist/app/web/routes/api/youtube/videos/[videoId]/+server.js.map +1 -0
- package/dist/app/web/routes/api/youtube/videos/[videoId]/transcript/+server.d.ts +3 -0
- package/dist/app/web/routes/api/youtube/videos/[videoId]/transcript/+server.d.ts.map +1 -0
- package/dist/app/web/routes/api/youtube/videos/[videoId]/transcript/+server.js +27 -0
- package/dist/app/web/routes/api/youtube/videos/[videoId]/transcript/+server.js.map +1 -0
- package/dist/app/web/routes/videos/[videoId]/analysis/[analysisId]/+layout.server.d.ts +13 -0
- package/dist/app/web/routes/videos/[videoId]/analysis/[analysisId]/+layout.server.d.ts.map +1 -0
- package/dist/app/web/routes/videos/[videoId]/analysis/[analysisId]/+layout.server.js +50 -0
- package/dist/app/web/routes/videos/[videoId]/analysis/[analysisId]/+layout.server.js.map +1 -0
- package/dist/app/web/types/activity.d.ts +20 -0
- package/dist/app/web/types/activity.d.ts.map +1 -0
- package/dist/app/web/types/activity.js +2 -0
- package/dist/app/web/types/activity.js.map +1 -0
- package/dist/app/web/types/analysis.d.ts +152 -0
- package/dist/app/web/types/analysis.d.ts.map +1 -0
- package/dist/app/web/types/analysis.js +75 -0
- package/dist/app/web/types/analysis.js.map +1 -0
- package/dist/app/web/types/publish.d.ts +266 -0
- package/dist/app/web/types/publish.d.ts.map +1 -0
- package/dist/app/web/types/publish.js +126 -0
- package/dist/app/web/types/publish.js.map +1 -0
- package/dist/app/web/types/web.d.ts +9 -0
- package/dist/app/web/types/web.d.ts.map +1 -0
- package/dist/app/web/types/web.js +8 -0
- package/dist/app/web/types/web.js.map +1 -0
- package/dist/hooks.server.d.ts +3 -0
- package/dist/hooks.server.d.ts.map +1 -0
- package/dist/hooks.server.js +11 -0
- package/dist/hooks.server.js.map +1 -0
- package/dist/lib/config/env.d.ts +11 -0
- package/dist/lib/config/env.d.ts.map +1 -0
- package/dist/lib/config/env.js +81 -0
- package/dist/lib/config/env.js.map +1 -0
- package/dist/lib/config/fileStore.d.ts +5 -0
- package/dist/lib/config/fileStore.d.ts.map +1 -0
- package/dist/lib/config/fileStore.js +34 -0
- package/dist/lib/config/fileStore.js.map +1 -0
- package/dist/lib/config/index.d.ts +4 -0
- package/dist/lib/config/index.d.ts.map +1 -0
- package/dist/lib/config/index.js +3 -0
- package/dist/lib/config/index.js.map +1 -0
- package/dist/lib/config/registry.d.ts +25 -0
- package/dist/lib/config/registry.d.ts.map +1 -0
- package/dist/lib/config/registry.js +148 -0
- package/dist/lib/config/registry.js.map +1 -0
- package/dist/lib/index.d.ts +59 -0
- package/dist/lib/index.d.ts.map +1 -0
- package/dist/lib/index.js +53 -0
- package/dist/lib/index.js.map +1 -0
- package/dist/lib/pipeline/stages/clipExporter.d.ts +10 -0
- package/dist/lib/pipeline/stages/clipExporter.d.ts.map +1 -0
- package/dist/{pipeline → lib/pipeline}/stages/clipExporter.js +10 -21
- package/dist/lib/pipeline/stages/clipExporter.js.map +1 -0
- package/dist/lib/pipeline/stages/segmentAnalyzer.d.ts +5 -0
- package/dist/lib/pipeline/stages/segmentAnalyzer.d.ts.map +1 -0
- package/dist/lib/pipeline/stages/segmentAnalyzer.js +40 -0
- package/dist/lib/pipeline/stages/segmentAnalyzer.js.map +1 -0
- package/dist/lib/pipeline/stages/segmentSelector.d.ts.map +1 -0
- package/dist/{pipeline → lib/pipeline}/stages/segmentSelector.js +2 -2
- package/dist/lib/pipeline/stages/segmentSelector.js.map +1 -0
- package/dist/lib/services/analysis/index.d.ts +9 -0
- package/dist/lib/services/analysis/index.d.ts.map +1 -0
- package/dist/lib/services/analysis/index.js +7 -0
- package/dist/lib/services/analysis/index.js.map +1 -0
- package/dist/lib/services/analysis/llm/LLMAnalyzer.d.ts +18 -0
- package/dist/lib/services/analysis/llm/LLMAnalyzer.d.ts.map +1 -0
- package/dist/lib/services/analysis/llm/LLMAnalyzer.js +66 -0
- package/dist/lib/services/analysis/llm/LLMAnalyzer.js.map +1 -0
- package/dist/lib/services/analysis/llm/index.d.ts +12 -0
- package/dist/lib/services/analysis/llm/index.d.ts.map +1 -0
- package/dist/{services/llmAnalyzer → lib/services/analysis/llm}/index.js +83 -62
- package/dist/lib/services/analysis/llm/index.js.map +1 -0
- package/dist/{services/segmentRanker → lib/services/analysis/ranker}/index.d.ts +2 -2
- package/dist/lib/services/analysis/ranker/index.d.ts.map +1 -0
- package/dist/{services/segmentRanker → lib/services/analysis/ranker}/index.js +4 -5
- package/dist/lib/services/analysis/ranker/index.js.map +1 -0
- package/dist/lib/services/analysis/refiner/index.d.ts +13 -0
- package/dist/lib/services/analysis/refiner/index.d.ts.map +1 -0
- package/dist/{services/clipRefiner → lib/services/analysis/refiner}/index.js +47 -37
- package/dist/lib/services/analysis/refiner/index.js.map +1 -0
- package/dist/{services/chunkBuilder → lib/services/analysis/transcript/chunker}/index.d.ts +1 -1
- package/dist/lib/services/analysis/transcript/chunker/index.d.ts.map +1 -0
- package/dist/lib/services/analysis/transcript/chunker/index.js.map +1 -0
- package/dist/{services/transcriptDetector/index.d.ts → lib/services/analysis/transcript/detector.d.ts} +8 -5
- package/dist/lib/services/analysis/transcript/detector.d.ts.map +1 -0
- package/dist/{services/transcriptDetector/index.js → lib/services/analysis/transcript/detector.js} +12 -7
- package/dist/lib/services/analysis/transcript/detector.js.map +1 -0
- package/dist/lib/services/analysis/transcript/index.d.ts +5 -0
- package/dist/lib/services/analysis/transcript/index.d.ts.map +1 -0
- package/dist/lib/services/analysis/transcript/index.js +4 -0
- package/dist/lib/services/analysis/transcript/index.js.map +1 -0
- package/dist/{services/audioAnalyzers → lib/services/audio/analyzer}/base.d.ts +2 -2
- package/dist/lib/services/audio/analyzer/base.d.ts.map +1 -0
- package/dist/{services/audioAnalyzers → lib/services/audio/analyzer}/base.js +1 -1
- package/dist/lib/services/audio/analyzer/base.js.map +1 -0
- package/dist/{services/audioAnalyzers → lib/services/audio/analyzer}/factory.d.ts +8 -2
- package/dist/lib/services/audio/analyzer/factory.d.ts.map +1 -0
- package/dist/{services/audioAnalyzers → lib/services/audio/analyzer}/factory.js +5 -5
- package/dist/lib/services/audio/analyzer/factory.js.map +1 -0
- package/dist/{services/audioAnalyzers → lib/services/audio/analyzer}/gemini.d.ts +8 -1
- package/dist/lib/services/audio/analyzer/gemini.d.ts.map +1 -0
- package/dist/{services/audioAnalyzers → lib/services/audio/analyzer}/gemini.js +10 -6
- package/dist/lib/services/audio/analyzer/gemini.js.map +1 -0
- package/dist/{services/audioAnalyzers → lib/services/audio/analyzer}/index.d.ts +1 -0
- package/dist/lib/services/audio/analyzer/index.d.ts.map +1 -0
- package/dist/lib/services/audio/analyzer/index.js.map +1 -0
- package/dist/lib/services/audio/analyzer/whisper.d.ts +10 -0
- package/dist/lib/services/audio/analyzer/whisper.d.ts.map +1 -0
- package/dist/{services/audioAnalyzers → lib/services/audio/analyzer}/whisper.js +11 -11
- package/dist/lib/services/audio/analyzer/whisper.js.map +1 -0
- package/dist/lib/services/audio/analyzer/yamnet.d.ts +9 -0
- package/dist/lib/services/audio/analyzer/yamnet.d.ts.map +1 -0
- package/dist/{services/audioAnalyzers → lib/services/audio/analyzer}/yamnet.js +8 -10
- package/dist/lib/services/audio/analyzer/yamnet.js.map +1 -0
- package/dist/lib/services/audio/index.d.ts +9 -0
- package/dist/lib/services/audio/index.d.ts.map +1 -0
- package/dist/lib/services/audio/index.js +7 -0
- package/dist/lib/services/audio/index.js.map +1 -0
- package/dist/{services/eventDetector/index.d.ts → lib/services/audio/processor/detector.d.ts} +3 -3
- package/dist/lib/services/audio/processor/detector.d.ts.map +1 -0
- package/dist/{services/eventDetector/index.js → lib/services/audio/processor/detector.js} +2 -2
- package/dist/lib/services/audio/processor/detector.js.map +1 -0
- package/dist/lib/services/audio/processor/slicer.d.ts +6 -0
- package/dist/lib/services/audio/processor/slicer.d.ts.map +1 -0
- package/dist/{services/audioDownloader/sliceAudio.js → lib/services/audio/processor/slicer.js} +8 -9
- package/dist/lib/services/audio/processor/slicer.js.map +1 -0
- package/dist/lib/services/audio/source/index.d.ts +3 -0
- package/dist/lib/services/audio/source/index.d.ts.map +1 -0
- package/dist/lib/services/audio/source/index.js +2 -0
- package/dist/lib/services/audio/source/index.js.map +1 -0
- package/dist/lib/services/audio/source/types.d.ts +5 -0
- package/dist/lib/services/audio/source/types.d.ts.map +1 -0
- package/dist/lib/services/audio/source/types.js +2 -0
- package/dist/lib/services/audio/source/types.js.map +1 -0
- package/dist/lib/services/audio/source/youtube.d.ts +4 -0
- package/dist/lib/services/audio/source/youtube.d.ts.map +1 -0
- package/dist/{services/audioDownloader/index.js → lib/services/audio/source/youtube.js} +36 -31
- package/dist/lib/services/audio/source/youtube.js.map +1 -0
- package/dist/{services/transcriptAnalyzers → lib/services/audio/transcriber}/base.d.ts +2 -2
- package/dist/lib/services/audio/transcriber/base.d.ts.map +1 -0
- package/dist/{services/transcriptAnalyzers → lib/services/audio/transcriber}/base.js +1 -1
- package/dist/lib/services/audio/transcriber/base.js.map +1 -0
- package/dist/{services/transcriptAnalyzers → lib/services/audio/transcriber}/factory.d.ts +4 -2
- package/dist/lib/services/audio/transcriber/factory.d.ts.map +1 -0
- package/dist/{services/transcriptAnalyzers → lib/services/audio/transcriber}/factory.js +5 -5
- package/dist/lib/services/audio/transcriber/factory.js.map +1 -0
- package/dist/{services/transcriptAnalyzers → lib/services/audio/transcriber}/gemini.d.ts +1 -1
- package/dist/lib/services/audio/transcriber/gemini.d.ts.map +1 -0
- package/dist/lib/services/audio/transcriber/gemini.js.map +1 -0
- package/dist/{services/transcriptAnalyzers → lib/services/audio/transcriber}/index.d.ts +1 -0
- package/dist/lib/services/audio/transcriber/index.d.ts.map +1 -0
- package/dist/lib/services/audio/transcriber/index.js.map +1 -0
- package/dist/{services/transcriptAnalyzers → lib/services/audio/transcriber}/whisper.d.ts +3 -1
- package/dist/lib/services/audio/transcriber/whisper.d.ts.map +1 -0
- package/dist/{services/transcriptAnalyzers → lib/services/audio/transcriber}/whisper.js +8 -4
- package/dist/lib/services/audio/transcriber/whisper.js.map +1 -0
- package/dist/{services/clipGenerator → lib/services/video/clipper}/index.d.ts +21 -3
- package/dist/lib/services/video/clipper/index.d.ts.map +1 -0
- package/dist/{services/clipGenerator → lib/services/video/clipper}/index.js +96 -22
- package/dist/lib/services/video/clipper/index.js.map +1 -0
- package/dist/lib/services/video/index.d.ts +13 -0
- package/dist/lib/services/video/index.d.ts.map +1 -0
- package/dist/lib/services/video/index.js +9 -0
- package/dist/lib/services/video/index.js.map +1 -0
- package/dist/lib/services/video/source/index.d.ts +8 -0
- package/dist/lib/services/video/source/index.d.ts.map +1 -0
- package/dist/lib/services/video/source/index.js +6 -0
- package/dist/lib/services/video/source/index.js.map +1 -0
- package/dist/lib/services/video/source/types.d.ts +12 -0
- package/dist/lib/services/video/source/types.d.ts.map +1 -0
- package/dist/lib/services/video/source/types.js +2 -0
- package/dist/lib/services/video/source/types.js.map +1 -0
- package/dist/lib/services/video/source/youtube/catalog.d.ts +28 -0
- package/dist/lib/services/video/source/youtube/catalog.d.ts.map +1 -0
- package/dist/lib/services/video/source/youtube/catalog.js +177 -0
- package/dist/lib/services/video/source/youtube/catalog.js.map +1 -0
- package/dist/{services/videoDownloader/index.d.ts → lib/services/video/source/youtube/downloader.d.ts} +6 -4
- package/dist/lib/services/video/source/youtube/downloader.d.ts.map +1 -0
- package/dist/{services/videoDownloader/index.js → lib/services/video/source/youtube/downloader.js} +104 -50
- package/dist/lib/services/video/source/youtube/downloader.js.map +1 -0
- package/dist/lib/services/video/source/youtube/metadata.d.ts +14 -0
- package/dist/lib/services/video/source/youtube/metadata.d.ts.map +1 -0
- package/dist/{services/metadataExtractor/index.js → lib/services/video/source/youtube/metadata.js} +11 -15
- package/dist/lib/services/video/source/youtube/metadata.js.map +1 -0
- package/dist/{services/urlParser/index.d.ts → lib/services/video/source/youtube/parser.d.ts} +1 -1
- package/dist/lib/services/video/source/youtube/parser.d.ts.map +1 -0
- package/dist/{services/urlParser/index.js → lib/services/video/source/youtube/parser.js} +1 -1
- package/dist/lib/services/video/source/youtube/parser.js.map +1 -0
- package/dist/lib/services/video/source/youtube/subtitles.d.ts +61 -0
- package/dist/lib/services/video/source/youtube/subtitles.d.ts.map +1 -0
- package/dist/lib/services/video/source/youtube/subtitles.js +340 -0
- package/dist/lib/services/video/source/youtube/subtitles.js.map +1 -0
- package/dist/lib/types/analyzer.d.ts +32 -0
- package/dist/lib/types/analyzer.d.ts.map +1 -0
- package/dist/{types → lib/types}/analyzer.js.map +1 -1
- package/dist/{types → lib/types}/audio.d.ts +1 -1
- package/dist/lib/types/audio.d.ts.map +1 -0
- package/dist/lib/types/audio.js.map +1 -0
- package/dist/lib/types/cache.d.ts.map +1 -0
- package/dist/lib/types/cache.js.map +1 -0
- package/dist/lib/types/cli.d.ts.map +1 -0
- package/dist/lib/types/cli.js.map +1 -0
- package/dist/lib/types/config.d.ts +171 -0
- package/dist/lib/types/config.d.ts.map +1 -0
- package/dist/lib/types/config.js +462 -0
- package/dist/lib/types/config.js.map +1 -0
- package/dist/lib/types/downloader.d.ts +32 -0
- package/dist/lib/types/downloader.d.ts.map +1 -0
- package/dist/{types → lib/types}/downloader.js.map +1 -1
- package/dist/lib/types/factory.d.ts.map +1 -0
- package/dist/{types → lib/types}/factory.js.map +1 -1
- package/dist/{types → lib/types}/index.d.ts +10 -7
- package/dist/lib/types/index.d.ts.map +1 -0
- package/dist/{types → lib/types}/index.js +2 -1
- package/dist/lib/types/index.js.map +1 -0
- package/dist/{types → lib/types}/pipeline.d.ts +21 -0
- package/dist/lib/types/pipeline.d.ts.map +1 -0
- package/dist/{types → lib/types}/pipeline.js.map +1 -1
- package/dist/{types → lib/types}/segment.d.ts +1 -1
- package/dist/lib/types/segment.d.ts.map +1 -0
- package/dist/lib/types/segment.js.map +1 -0
- package/dist/lib/types/transcript.d.ts.map +1 -0
- package/dist/lib/types/transcript.js.map +1 -0
- package/dist/{types → lib/types}/video.d.ts +11 -1
- package/dist/lib/types/video.d.ts.map +1 -0
- package/dist/lib/types/video.js.map +1 -0
- package/dist/lib/types/youtube.d.ts +89 -0
- package/dist/lib/types/youtube.d.ts.map +1 -0
- package/dist/lib/types/youtube.js +43 -0
- package/dist/lib/types/youtube.js.map +1 -0
- package/dist/lib/utils/cache.d.ts.map +1 -0
- package/dist/lib/utils/cache.js.map +1 -0
- package/dist/lib/utils/cacheBackend.d.ts.map +1 -0
- package/dist/lib/utils/cacheBackend.js.map +1 -0
- package/dist/lib/utils/cacheFactory.d.ts.map +1 -0
- package/dist/lib/utils/cacheFactory.js.map +1 -0
- package/dist/lib/utils/chunker.d.ts.map +1 -0
- package/dist/lib/utils/chunker.js.map +1 -0
- package/dist/lib/utils/fileCacheBackend.d.ts.map +1 -0
- package/dist/lib/utils/fileCacheBackend.js.map +1 -0
- package/dist/lib/utils/format.d.ts.map +1 -0
- package/dist/lib/utils/format.js.map +1 -0
- package/dist/lib/utils/logger.d.ts +10 -0
- package/dist/lib/utils/logger.d.ts.map +1 -0
- package/dist/lib/utils/logger.js +54 -0
- package/dist/lib/utils/logger.js.map +1 -0
- package/dist/lib/utils/modelFactory.d.ts +9 -0
- package/dist/lib/utils/modelFactory.d.ts.map +1 -0
- package/dist/lib/utils/modelFactory.js +45 -0
- package/dist/lib/utils/modelFactory.js.map +1 -0
- package/dist/lib/utils/mongoCacheBackend.d.ts.map +1 -0
- package/dist/lib/utils/mongoCacheBackend.js.map +1 -0
- package/dist/lib/utils/paths.d.ts.map +1 -0
- package/dist/lib/utils/paths.js.map +1 -0
- package/dist/lib/utils/pythonBin.d.ts.map +1 -0
- package/dist/lib/utils/pythonBin.js.map +1 -0
- package/dist/lib/utils/retryAsync.d.ts +19 -0
- package/dist/lib/utils/retryAsync.d.ts.map +1 -0
- package/dist/lib/utils/retryAsync.js +38 -0
- package/dist/lib/utils/retryAsync.js.map +1 -0
- package/package.json +55 -16
- package/dist/cli.d.ts.map +0 -1
- package/dist/cli.js.map +0 -1
- package/dist/config/env.d.ts +0 -53
- package/dist/config/env.d.ts.map +0 -1
- package/dist/config/env.js +0 -15
- package/dist/config/env.js.map +0 -1
- package/dist/config/index.d.ts +0 -2
- package/dist/config/index.d.ts.map +0 -1
- package/dist/config/index.js +0 -2
- package/dist/config/index.js.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/lib.d.ts +0 -17
- package/dist/lib.d.ts.map +0 -1
- package/dist/lib.js +0 -17
- package/dist/lib.js.map +0 -1
- package/dist/pipeline/dumper.d.ts.map +0 -1
- package/dist/pipeline/dumper.js.map +0 -1
- package/dist/pipeline/runner.d.ts.map +0 -1
- package/dist/pipeline/runner.js +0 -132
- package/dist/pipeline/runner.js.map +0 -1
- package/dist/pipeline/stages/audioProcessor.d.ts +0 -19
- package/dist/pipeline/stages/audioProcessor.d.ts.map +0 -1
- package/dist/pipeline/stages/audioProcessor.js.map +0 -1
- package/dist/pipeline/stages/clipExporter.d.ts +0 -14
- package/dist/pipeline/stages/clipExporter.d.ts.map +0 -1
- package/dist/pipeline/stages/clipExporter.js.map +0 -1
- package/dist/pipeline/stages/segmentAnalyzer.d.ts +0 -26
- package/dist/pipeline/stages/segmentAnalyzer.d.ts.map +0 -1
- package/dist/pipeline/stages/segmentAnalyzer.js +0 -47
- package/dist/pipeline/stages/segmentAnalyzer.js.map +0 -1
- package/dist/pipeline/stages/segmentSelector.d.ts.map +0 -1
- package/dist/pipeline/stages/segmentSelector.js.map +0 -1
- package/dist/pipeline/stages/videoResolver.d.ts +0 -11
- package/dist/pipeline/stages/videoResolver.d.ts.map +0 -1
- package/dist/pipeline/stages/videoResolver.js.map +0 -1
- package/dist/services/audioAnalyzers/base.d.ts.map +0 -1
- package/dist/services/audioAnalyzers/base.js.map +0 -1
- package/dist/services/audioAnalyzers/factory.d.ts.map +0 -1
- package/dist/services/audioAnalyzers/factory.js.map +0 -1
- package/dist/services/audioAnalyzers/gemini.d.ts.map +0 -1
- package/dist/services/audioAnalyzers/gemini.js.map +0 -1
- package/dist/services/audioAnalyzers/index.d.ts.map +0 -1
- package/dist/services/audioAnalyzers/index.js.map +0 -1
- package/dist/services/audioAnalyzers/whisper.d.ts +0 -13
- package/dist/services/audioAnalyzers/whisper.d.ts.map +0 -1
- package/dist/services/audioAnalyzers/whisper.js.map +0 -1
- package/dist/services/audioAnalyzers/yamnet.d.ts +0 -13
- package/dist/services/audioAnalyzers/yamnet.d.ts.map +0 -1
- package/dist/services/audioAnalyzers/yamnet.js.map +0 -1
- package/dist/services/audioDownloader/index.d.ts +0 -2
- package/dist/services/audioDownloader/index.d.ts.map +0 -1
- package/dist/services/audioDownloader/index.js.map +0 -1
- package/dist/services/audioDownloader/sliceAudio.d.ts +0 -2
- package/dist/services/audioDownloader/sliceAudio.d.ts.map +0 -1
- package/dist/services/audioDownloader/sliceAudio.js.map +0 -1
- package/dist/services/chunkBuilder/index.d.ts.map +0 -1
- package/dist/services/chunkBuilder/index.js.map +0 -1
- package/dist/services/clipGenerator/index.d.ts.map +0 -1
- package/dist/services/clipGenerator/index.js.map +0 -1
- package/dist/services/clipRefiner/index.d.ts +0 -10
- package/dist/services/clipRefiner/index.d.ts.map +0 -1
- package/dist/services/clipRefiner/index.js.map +0 -1
- package/dist/services/eventDetector/index.d.ts.map +0 -1
- package/dist/services/eventDetector/index.js.map +0 -1
- package/dist/services/llmAnalyzer/LLMAnalyzer.d.ts +0 -41
- package/dist/services/llmAnalyzer/LLMAnalyzer.d.ts.map +0 -1
- package/dist/services/llmAnalyzer/LLMAnalyzer.js +0 -62
- package/dist/services/llmAnalyzer/LLMAnalyzer.js.map +0 -1
- package/dist/services/llmAnalyzer/index.d.ts +0 -9
- package/dist/services/llmAnalyzer/index.d.ts.map +0 -1
- package/dist/services/llmAnalyzer/index.js.map +0 -1
- package/dist/services/metadataExtractor/index.d.ts +0 -12
- package/dist/services/metadataExtractor/index.d.ts.map +0 -1
- package/dist/services/metadataExtractor/index.js.map +0 -1
- package/dist/services/segmentRanker/index.d.ts.map +0 -1
- package/dist/services/segmentRanker/index.js.map +0 -1
- package/dist/services/transcriptAnalyzers/base.d.ts.map +0 -1
- package/dist/services/transcriptAnalyzers/base.js.map +0 -1
- package/dist/services/transcriptAnalyzers/factory.d.ts.map +0 -1
- package/dist/services/transcriptAnalyzers/factory.js.map +0 -1
- package/dist/services/transcriptAnalyzers/gemini.d.ts.map +0 -1
- package/dist/services/transcriptAnalyzers/gemini.js.map +0 -1
- package/dist/services/transcriptAnalyzers/index.d.ts.map +0 -1
- package/dist/services/transcriptAnalyzers/index.js.map +0 -1
- package/dist/services/transcriptAnalyzers/whisper.d.ts.map +0 -1
- package/dist/services/transcriptAnalyzers/whisper.js.map +0 -1
- package/dist/services/transcriptAnalyzers/ytdlp.d.ts +0 -26
- package/dist/services/transcriptAnalyzers/ytdlp.d.ts.map +0 -1
- package/dist/services/transcriptAnalyzers/ytdlp.js +0 -136
- package/dist/services/transcriptAnalyzers/ytdlp.js.map +0 -1
- package/dist/services/transcriptDetector/index.d.ts.map +0 -1
- package/dist/services/transcriptDetector/index.js.map +0 -1
- package/dist/services/urlParser/index.d.ts.map +0 -1
- package/dist/services/urlParser/index.js.map +0 -1
- package/dist/services/videoDownloader/index.d.ts.map +0 -1
- package/dist/services/videoDownloader/index.js.map +0 -1
- package/dist/types/analyzer.d.ts +0 -22
- package/dist/types/analyzer.d.ts.map +0 -1
- package/dist/types/audio.d.ts.map +0 -1
- package/dist/types/audio.js.map +0 -1
- package/dist/types/cache.d.ts.map +0 -1
- package/dist/types/cache.js.map +0 -1
- package/dist/types/cli.d.ts.map +0 -1
- package/dist/types/cli.js.map +0 -1
- package/dist/types/config.d.ts +0 -94
- package/dist/types/config.d.ts.map +0 -1
- package/dist/types/config.js +0 -140
- package/dist/types/config.js.map +0 -1
- package/dist/types/downloader.d.ts +0 -11
- package/dist/types/downloader.d.ts.map +0 -1
- package/dist/types/factory.d.ts.map +0 -1
- package/dist/types/index.d.ts.map +0 -1
- package/dist/types/index.js.map +0 -1
- package/dist/types/pipeline.d.ts.map +0 -1
- package/dist/types/segment.d.ts.map +0 -1
- package/dist/types/segment.js.map +0 -1
- package/dist/types/transcript.d.ts.map +0 -1
- package/dist/types/transcript.js.map +0 -1
- package/dist/types/video.d.ts.map +0 -1
- package/dist/types/video.js.map +0 -1
- package/dist/utils/cache.d.ts.map +0 -1
- package/dist/utils/cache.js.map +0 -1
- package/dist/utils/cacheBackend.d.ts.map +0 -1
- package/dist/utils/cacheBackend.js.map +0 -1
- package/dist/utils/cacheFactory.d.ts.map +0 -1
- package/dist/utils/cacheFactory.js.map +0 -1
- package/dist/utils/chunker.d.ts.map +0 -1
- package/dist/utils/chunker.js.map +0 -1
- package/dist/utils/fileCacheBackend.d.ts.map +0 -1
- package/dist/utils/fileCacheBackend.js.map +0 -1
- package/dist/utils/format.d.ts.map +0 -1
- package/dist/utils/format.js.map +0 -1
- package/dist/utils/logger.d.ts +0 -7
- package/dist/utils/logger.d.ts.map +0 -1
- package/dist/utils/logger.js +0 -27
- package/dist/utils/logger.js.map +0 -1
- package/dist/utils/modelFactory.d.ts +0 -14
- package/dist/utils/modelFactory.d.ts.map +0 -1
- package/dist/utils/modelFactory.js +0 -61
- package/dist/utils/modelFactory.js.map +0 -1
- package/dist/utils/mongoCacheBackend.d.ts.map +0 -1
- package/dist/utils/mongoCacheBackend.js.map +0 -1
- package/dist/utils/paths.d.ts.map +0 -1
- package/dist/utils/paths.js.map +0 -1
- package/dist/utils/pythonBin.d.ts.map +0 -1
- package/dist/utils/pythonBin.js.map +0 -1
- /package/dist/{index.d.ts → app/cli/index.d.ts} +0 -0
- /package/dist/{pipeline → lib/pipeline}/stages/segmentSelector.d.ts +0 -0
- /package/dist/{services/chunkBuilder → lib/services/analysis/transcript/chunker}/index.js +0 -0
- /package/dist/{services/audioAnalyzers → lib/services/audio/analyzer}/index.js +0 -0
- /package/dist/{services/transcriptAnalyzers → lib/services/audio/transcriber}/gemini.js +0 -0
- /package/dist/{services/transcriptAnalyzers → lib/services/audio/transcriber}/index.js +0 -0
- /package/dist/{types → lib/types}/analyzer.js +0 -0
- /package/dist/{types → lib/types}/audio.js +0 -0
- /package/dist/{types → lib/types}/cache.d.ts +0 -0
- /package/dist/{types → lib/types}/cache.js +0 -0
- /package/dist/{types → lib/types}/cli.d.ts +0 -0
- /package/dist/{types → lib/types}/cli.js +0 -0
- /package/dist/{types → lib/types}/downloader.js +0 -0
- /package/dist/{types → lib/types}/factory.d.ts +0 -0
- /package/dist/{types → lib/types}/factory.js +0 -0
- /package/dist/{types → lib/types}/pipeline.js +0 -0
- /package/dist/{types → lib/types}/segment.js +0 -0
- /package/dist/{types → lib/types}/transcript.d.ts +0 -0
- /package/dist/{types → lib/types}/transcript.js +0 -0
- /package/dist/{types → lib/types}/video.js +0 -0
- /package/dist/{utils → lib/utils}/cache.d.ts +0 -0
- /package/dist/{utils → lib/utils}/cache.js +0 -0
- /package/dist/{utils → lib/utils}/cacheBackend.d.ts +0 -0
- /package/dist/{utils → lib/utils}/cacheBackend.js +0 -0
- /package/dist/{utils → lib/utils}/cacheFactory.d.ts +0 -0
- /package/dist/{utils → lib/utils}/cacheFactory.js +0 -0
- /package/dist/{utils → lib/utils}/chunker.d.ts +0 -0
- /package/dist/{utils → lib/utils}/chunker.js +0 -0
- /package/dist/{utils → lib/utils}/fileCacheBackend.d.ts +0 -0
- /package/dist/{utils → lib/utils}/fileCacheBackend.js +0 -0
- /package/dist/{utils → lib/utils}/format.d.ts +0 -0
- /package/dist/{utils → lib/utils}/format.js +0 -0
- /package/dist/{utils → lib/utils}/mongoCacheBackend.d.ts +0 -0
- /package/dist/{utils → lib/utils}/mongoCacheBackend.js +0 -0
- /package/dist/{utils → lib/utils}/paths.d.ts +0 -0
- /package/dist/{utils → lib/utils}/paths.js +0 -0
- /package/dist/{utils → lib/utils}/pythonBin.d.ts +0 -0
- /package/dist/{utils → lib/utils}/pythonBin.js +0 -0
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { TranscriptAnalyzer } from './base.js';
|
|
2
|
-
import type {
|
|
2
|
+
import type { TranscriptChainConfig } from '../../../types/downloader.js';
|
|
3
|
+
import type { TranscriptProviderName } from '../../../types/index.js';
|
|
4
|
+
export type { TranscriptChainConfig } from '../../../types/downloader.js';
|
|
3
5
|
/**
|
|
4
6
|
* Parses the TRANSCRIPT_PROVIDER config string into an ordered list of provider names.
|
|
5
7
|
*
|
|
@@ -17,5 +19,5 @@ export declare function parseTranscriptProviderChain(providerString: string): Tr
|
|
|
17
19
|
* // TRANSCRIPT_PROVIDER=ytdlp,whisper → [YtDlpTranscriptAnalyzer, WhisperTranscriptAnalyzer]
|
|
18
20
|
* const chain = createTranscriptChain(config.TRANSCRIPT_PROVIDER);
|
|
19
21
|
*/
|
|
20
|
-
export declare function createTranscriptChain(providerString: string): TranscriptAnalyzer[];
|
|
22
|
+
export declare function createTranscriptChain(providerString: string, chainConfig: TranscriptChainConfig): TranscriptAnalyzer[];
|
|
21
23
|
//# sourceMappingURL=factory.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"factory.d.ts","sourceRoot":"","sources":["../../../../../src/lib/services/audio/transcriber/factory.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAE/C,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AAGtE,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAElE,YAAY,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AAItE;;;;;GAKG;AACH,wBAAgB,4BAA4B,CAAC,cAAc,EAAE,MAAM,GAAG,sBAAsB,EAAE,CAqB7F;AAED;;;;;;;;;GASG;AACH,wBAAgB,qBAAqB,CACnC,cAAc,EAAE,MAAM,EACtB,WAAW,EAAE,qBAAqB,GACjC,kBAAkB,EAAE,CAiBtB"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { log } from '
|
|
2
|
-
import { YtDlpTranscriptAnalyzer } from '
|
|
1
|
+
import { log } from '../../../utils/logger.js';
|
|
2
|
+
import { YtDlpTranscriptAnalyzer } from '../../video/source/youtube/subtitles.js';
|
|
3
3
|
import { WhisperTranscriptAnalyzer } from './whisper.js';
|
|
4
4
|
import { GeminiTranscriptAnalyzer } from './gemini.js';
|
|
5
5
|
const KNOWN_PROVIDERS = new Set(['ytdlp', 'whisper', 'gemini']);
|
|
@@ -34,14 +34,14 @@ export function parseTranscriptProviderChain(providerString) {
|
|
|
34
34
|
* // TRANSCRIPT_PROVIDER=ytdlp,whisper → [YtDlpTranscriptAnalyzer, WhisperTranscriptAnalyzer]
|
|
35
35
|
* const chain = createTranscriptChain(config.TRANSCRIPT_PROVIDER);
|
|
36
36
|
*/
|
|
37
|
-
export function createTranscriptChain(providerString) {
|
|
37
|
+
export function createTranscriptChain(providerString, chainConfig) {
|
|
38
38
|
const names = parseTranscriptProviderChain(providerString);
|
|
39
39
|
return names.map((name) => {
|
|
40
40
|
switch (name) {
|
|
41
41
|
case 'ytdlp':
|
|
42
|
-
return new YtDlpTranscriptAnalyzer();
|
|
42
|
+
return new YtDlpTranscriptAnalyzer(chainConfig);
|
|
43
43
|
case 'whisper':
|
|
44
|
-
return new WhisperTranscriptAnalyzer();
|
|
44
|
+
return new WhisperTranscriptAnalyzer(chainConfig.whisperModel);
|
|
45
45
|
case 'gemini':
|
|
46
46
|
log.warn('[transcript] GeminiTranscriptAnalyzer is not yet implemented — ' +
|
|
47
47
|
'it will throw if reached in the chain.');
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"factory.js","sourceRoot":"","sources":["../../../../../src/lib/services/audio/transcriber/factory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,sBAAsB,CAAC;AAE3C,OAAO,EAAE,uBAAuB,EAAE,MAAM,yCAAyC,CAAC;AAElF,OAAO,EAAE,yBAAyB,EAAE,MAAM,cAAc,CAAC;AACzD,OAAO,EAAE,wBAAwB,EAAE,MAAM,aAAa,CAAC;AAKvD,MAAM,eAAe,GAAG,IAAI,GAAG,CAAyB,CAAC,OAAO,EAAE,SAAS,EAAE,QAAQ,CAAC,CAAC,CAAC;AAExF;;;;;GAKG;AACH,MAAM,UAAU,4BAA4B,CAAC,cAAsB;IACjE,MAAM,KAAK,GAAG,cAAc;SACzB,KAAK,CAAC,GAAG,CAAC;SACV,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;SAClC,MAAM,CAAC,OAAO,CAAC,CAAC;IAEnB,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACvB,MAAM,IAAI,KAAK,CACb,+EAA+E,CAChF,CAAC;IACJ,CAAC;IAED,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;QACzB,IAAI,CAAC,eAAe,CAAC,GAAG,CAAC,IAA8B,CAAC,EAAE,CAAC;YACzD,MAAM,IAAI,KAAK,CACb,gCAAgC,IAAI,sEAAsE,CAC3G,CAAC;QACJ,CAAC;IACH,CAAC;IAED,OAAO,KAAiC,CAAC;AAC3C,CAAC;AAED;;;;;;;;;GASG;AACH,MAAM,UAAU,qBAAqB,CACnC,cAAsB,EACtB,WAAkC;IAElC,MAAM,KAAK,GAAG,4BAA4B,CAAC,cAAc,CAAC,CAAC;IAE3D,OAAO,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE;QACxB,QAAQ,IAAI,EAAE,CAAC;YACb,KAAK,OAAO;gBACV,OAAO,IAAI,uBAAuB,CAAC,WAAW,CAAC,CAAC;YAClD,KAAK,SAAS;gBACZ,OAAO,IAAI,yBAAyB,CAAC,WAAW,CAAC,YAAY,CAAC,CAAC;YACjE,KAAK,QAAQ;gBACX,GAAG,CAAC,IAAI,CACN,iEAAiE;oBAC/D,wCAAwC,CAC3C,CAAC;gBACF,OAAO,IAAI,wBAAwB,EAAE,CAAC;QAC1C,CAAC;IACH,CAAC,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gemini.d.ts","sourceRoot":"","sources":["../../../../../src/lib/services/audio/transcriber/gemini.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAE/C;;;;;;;;;;GAUG;AACH,qBAAa,wBAAyB,SAAQ,kBAAkB;IAC9D,QAAQ,CAAC,MAAM,EAAG,QAAQ,CAAU;IAE9B,MAAM,CAAC,QAAQ,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,IAAI,GAAG,OAAO,CAAC,cAAc,EAAE,CAAC;CAMrF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gemini.js","sourceRoot":"","sources":["../../../../../src/lib/services/audio/transcriber/gemini.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAE/C;;;;;;;;;;GAUG;AACH,MAAM,OAAO,wBAAyB,SAAQ,kBAAkB;IACrD,MAAM,GAAG,QAAiB,CAAC;IAEpC,KAAK,CAAC,MAAM,CAAC,QAAgB,EAAE,UAAyB;QACtD,MAAM,IAAI,KAAK,CACb,mDAAmD;YACjD,uEAAuE,CAC1E,CAAC;IACJ,CAAC;CACF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/lib/services/audio/transcriber/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAC/C,OAAO,EAAE,qBAAqB,EAAE,4BAA4B,EAAE,MAAM,cAAc,CAAC;AACnF,YAAY,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/lib/services/audio/transcriber/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAC/C,OAAO,EAAE,qBAAqB,EAAE,4BAA4B,EAAE,MAAM,cAAc,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { TranscriptLine } from '
|
|
1
|
+
import type { TranscriptLine } from '../../../types/transcript.js';
|
|
2
2
|
import { TranscriptAnalyzer } from './base.js';
|
|
3
3
|
/**
|
|
4
4
|
* Generates a transcript by running OpenAI Whisper locally on the downloaded
|
|
@@ -12,7 +12,9 @@ import { TranscriptAnalyzer } from './base.js';
|
|
|
12
12
|
* array of `{text, start, duration}` objects to stdout.
|
|
13
13
|
*/
|
|
14
14
|
export declare class WhisperTranscriptAnalyzer extends TranscriptAnalyzer {
|
|
15
|
+
private readonly whisperModel;
|
|
15
16
|
readonly source: "whisper";
|
|
17
|
+
constructor(whisperModel: string);
|
|
16
18
|
detect(videoId: string, audioPath: string | null): Promise<TranscriptLine[]>;
|
|
17
19
|
}
|
|
18
20
|
//# sourceMappingURL=whisper.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"whisper.d.ts","sourceRoot":"","sources":["../../../../../src/lib/services/audio/transcriber/whisper.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAU/C;;;;;;;;;;GAUG;AACH,qBAAa,yBAA0B,SAAQ,kBAAkB;IAGnD,OAAO,CAAC,QAAQ,CAAC,YAAY;IAFzC,QAAQ,CAAC,MAAM,EAAG,SAAS,CAAU;gBAER,YAAY,EAAE,MAAM;IAI3C,MAAM,CAAC,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,IAAI,GAAG,OAAO,CAAC,cAAc,EAAE,CAAC;CAwCnF"}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { execa } from 'execa';
|
|
2
2
|
import { z } from 'zod';
|
|
3
|
-
import { config } from '../../config/index.js';
|
|
4
3
|
import { TranscriptAnalyzer } from './base.js';
|
|
5
|
-
import { getPythonBin } from '
|
|
6
|
-
import { scriptPath } from '
|
|
4
|
+
import { getPythonBin } from '../../../utils/pythonBin.js';
|
|
5
|
+
import { scriptPath } from '../../../utils/paths.js';
|
|
7
6
|
const WhisperSegmentSchema = z.object({
|
|
8
7
|
text: z.string(),
|
|
9
8
|
start: z.number(),
|
|
@@ -21,7 +20,12 @@ const WhisperSegmentSchema = z.object({
|
|
|
21
20
|
* array of `{text, start, duration}` objects to stdout.
|
|
22
21
|
*/
|
|
23
22
|
export class WhisperTranscriptAnalyzer extends TranscriptAnalyzer {
|
|
23
|
+
whisperModel;
|
|
24
24
|
source = 'whisper';
|
|
25
|
+
constructor(whisperModel) {
|
|
26
|
+
super();
|
|
27
|
+
this.whisperModel = whisperModel;
|
|
28
|
+
}
|
|
25
29
|
async detect(videoId, audioPath) {
|
|
26
30
|
if (!audioPath) {
|
|
27
31
|
throw new Error('WhisperTranscriptAnalyzer requires an audio file. ' +
|
|
@@ -33,7 +37,7 @@ export class WhisperTranscriptAnalyzer extends TranscriptAnalyzer {
|
|
|
33
37
|
const result = await execa(python, [
|
|
34
38
|
scriptPath('transcribe_whisper.py'),
|
|
35
39
|
audioPath,
|
|
36
|
-
|
|
40
|
+
this.whisperModel,
|
|
37
41
|
]);
|
|
38
42
|
stdout = result.stdout;
|
|
39
43
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"whisper.js","sourceRoot":"","sources":["../../../../../src/lib/services/audio/transcriber/whisper.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,OAAO,CAAC;AAC9B,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEjD,MAAM,oBAAoB,GAAG,CAAC,CAAC,MAAM,CAAC;IACpC,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE;IACjB,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE;CACrB,CAAC,CAAC;AAEH;;;;;;;;;;GAUG;AACH,MAAM,OAAO,yBAA0B,SAAQ,kBAAkB;IAGlC;IAFpB,MAAM,GAAG,SAAkB,CAAC;IAErC,YAA6B,YAAoB;QAC/C,KAAK,EAAE,CAAC;QADmB,iBAAY,GAAZ,YAAY,CAAQ;IAEjD,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,OAAe,EAAE,SAAwB;QACpD,IAAI,CAAC,SAAS,EAAE,CAAC;Y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F"}
|
|
@@ -1,4 +1,11 @@
|
|
|
1
|
-
import type { RankedSegment } from '
|
|
1
|
+
import type { RankedSegment } from '../../../types/segment.js';
|
|
2
|
+
export interface ClipperConfig {
|
|
3
|
+
ffmpegPath?: string;
|
|
4
|
+
ffprobePath?: string;
|
|
5
|
+
timestampOffset: number;
|
|
6
|
+
ffmpegPreset: string;
|
|
7
|
+
outputDir: string;
|
|
8
|
+
}
|
|
2
9
|
/**
|
|
3
10
|
* Generates video clips for each ranked segment using fluent-ffmpeg.
|
|
4
11
|
*
|
|
@@ -15,7 +22,7 @@ import type { RankedSegment } from '../../types/index.js';
|
|
|
15
22
|
* @returns Array of successfully written clip file paths
|
|
16
23
|
* @throws {Error} if ffmpeg is not installed
|
|
17
24
|
*/
|
|
18
|
-
export declare function generateClips(videoPath: string, segments: RankedSegment[], videoId: string, customPath?: string, concurrency?: number): Promise<string[]>;
|
|
25
|
+
export declare function generateClips(videoPath: string, segments: RankedSegment[], videoId: string, cfg: ClipperConfig, customPath?: string, concurrency?: number): Promise<string[]>;
|
|
19
26
|
/**
|
|
20
27
|
* Organizes pre-downloaded segment files from downloads/ to outputs/.
|
|
21
28
|
* Used when videos are downloaded via --download-sections segments mode.
|
|
@@ -26,5 +33,16 @@ export declare function generateClips(videoPath: string, segments: RankedSegment
|
|
|
26
33
|
* @param concurrency - Maximum number of parallel copy operations (default: 1)
|
|
27
34
|
* @returns Array of organized clip file paths in outputs/
|
|
28
35
|
*/
|
|
29
|
-
export declare function organizeClips(sourcePaths: string[], videoId: string, customPath?: string, concurrency?: number): Promise<string[]>;
|
|
36
|
+
export declare function organizeClips(sourcePaths: string[], videoId: string, cfg: ClipperConfig, customPath?: string, concurrency?: number): Promise<string[]>;
|
|
37
|
+
/**
|
|
38
|
+
* Remuxes pre-downloaded segment files to the output directory via ffmpeg stream copy.
|
|
39
|
+
* Fixes A/V sync by normalising timestamps without re-encoding (lossless).
|
|
40
|
+
*
|
|
41
|
+
* @param sourcePaths - Paths to the pre-downloaded segment files in downloads/
|
|
42
|
+
* @param videoId - Used to verify file naming
|
|
43
|
+
* @param customPath - Custom output directory (optional, overrides OUTPUT_DIR)
|
|
44
|
+
* @param concurrency - Maximum number of parallel remux operations (default: 1)
|
|
45
|
+
* @returns Array of remuxed clip file paths in outputs/
|
|
46
|
+
*/
|
|
47
|
+
export declare function remuxClips(sourcePaths: string[], videoId: string, cfg: ClipperConfig, customPath?: string, concurrency?: number): Promise<string[]>;
|
|
30
48
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/lib/services/video/clipper/index.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAE3D,MAAM,WAAW,aAAa;IAC5B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,eAAe,EAAE,MAAM,CAAC;IACxB,YAAY,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC;CACnB;AAmFD;;;;;;;;;;;;;;;GAeG;AACH,wBAAsB,aAAa,CACjC,SAAS,EAAE,MAAM,EACjB,QAAQ,EAAE,aAAa,EAAE,EACzB,OAAO,EAAE,MAAM,EACf,GAAG,EAAE,aAAa,EAClB,UAAU,CAAC,EAAE,MAAM,EACnB,WAAW,GAAE,MAAU,GACtB,OAAO,CAAC,MAAM,EAAE,CAAC,CAoDnB;AAED;;;;;;;;;GASG;AACH,wBAAsB,aAAa,CACjC,WAAW,EAAE,MAAM,EAAE,EACrB,OAAO,EAAE,MAAM,EACf,GAAG,EAAE,aAAa,EAClB,UAAU,CAAC,EAAE,MAAM,EACnB,WAAW,GAAE,MAAU,GACtB,OAAO,CAAC,MAAM,EAAE,CAAC,CAyCnB;AAED;;;;;;;;;GASG;AACH,wBAAsB,UAAU,CAC9B,WAAW,EAAE,MAAM,EAAE,EACrB,OAAO,EAAE,MAAM,EACf,GAAG,EAAE,aAAa,EAClB,UAAU,CAAC,EAAE,MAAM,EACnB,WAAW,GAAE,MAAU,GACtB,OAAO,CAAC,MAAM,EAAE,CAAC,CA+CnB"}
|
|
@@ -2,14 +2,15 @@ import ffmpeg from 'fluent-ffmpeg';
|
|
|
2
2
|
import { promises as fs } from 'fs';
|
|
3
3
|
import { join } from 'path';
|
|
4
4
|
import pLimit from 'p-limit';
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
if (
|
|
9
|
-
|
|
10
|
-
}
|
|
11
|
-
if (
|
|
12
|
-
|
|
5
|
+
import { log } from '../../../utils/logger.js';
|
|
6
|
+
import { formatSeconds } from '../../../utils/format.js';
|
|
7
|
+
function configureFfmpeg(cfg) {
|
|
8
|
+
if (cfg.ffmpegPath) {
|
|
9
|
+
ffmpeg.setFfmpegPath(cfg.ffmpegPath);
|
|
10
|
+
}
|
|
11
|
+
if (cfg.ffprobePath) {
|
|
12
|
+
ffmpeg.setFfprobePath(cfg.ffprobePath);
|
|
13
|
+
}
|
|
13
14
|
}
|
|
14
15
|
/**
|
|
15
16
|
* Cuts a single clip from a video file using fluent-ffmpeg.
|
|
@@ -18,20 +19,20 @@ if (config.FFPROBE_PATH) {
|
|
|
18
19
|
* @returns The output file path on success
|
|
19
20
|
* @throws {Error} if ffmpeg fails
|
|
20
21
|
*/
|
|
21
|
-
function cutClip(videoPath, start, end, outputPath) {
|
|
22
|
-
const adjustedStart = Math.max(0, start +
|
|
23
|
-
const adjustedEnd = Math.max(adjustedStart + 1, end +
|
|
22
|
+
function cutClip(videoPath, start, end, outputPath, cfg) {
|
|
23
|
+
const adjustedStart = Math.max(0, start + cfg.timestampOffset);
|
|
24
|
+
const adjustedEnd = Math.max(adjustedStart + 1, end + cfg.timestampOffset);
|
|
24
25
|
const duration = adjustedEnd - adjustedStart;
|
|
25
26
|
log.info(`Cutting clip: start=${adjustedStart.toFixed(2)}s, end=${adjustedEnd.toFixed(2)}s, duration=${duration.toFixed(2)}s`);
|
|
26
|
-
if (
|
|
27
|
-
log.info(` Timestamp offset applied: ${
|
|
27
|
+
if (cfg.timestampOffset !== 0) {
|
|
28
|
+
log.info(` Timestamp offset applied: ${cfg.timestampOffset}s`);
|
|
28
29
|
}
|
|
29
30
|
return new Promise((resolve, reject) => {
|
|
30
31
|
ffmpeg(videoPath)
|
|
31
32
|
.setStartTime(adjustedStart)
|
|
32
33
|
.setDuration(duration)
|
|
33
34
|
.outputOptions('-c:v', 'libx264')
|
|
34
|
-
.outputOptions('-preset',
|
|
35
|
+
.outputOptions('-preset', cfg.ffmpegPreset)
|
|
35
36
|
.outputOptions('-c:a', 'aac')
|
|
36
37
|
.output(outputPath)
|
|
37
38
|
.on('end', () => resolve(outputPath))
|
|
@@ -39,12 +40,29 @@ function cutClip(videoPath, start, end, outputPath) {
|
|
|
39
40
|
.run();
|
|
40
41
|
});
|
|
41
42
|
}
|
|
43
|
+
/**
|
|
44
|
+
* Remuxes a pre-downloaded segment file via ffmpeg stream copy.
|
|
45
|
+
* Normalises timestamps with -avoid_negative_ts make_zero to fix A/V sync
|
|
46
|
+
* without re-encoding — lossless, no quality loss.
|
|
47
|
+
*/
|
|
48
|
+
function remuxSegment(sourcePath, outputPath, cfg) {
|
|
49
|
+
return new Promise((resolve, reject) => {
|
|
50
|
+
ffmpeg(sourcePath)
|
|
51
|
+
.outputOptions('-c:v', 'copy')
|
|
52
|
+
.outputOptions('-c:a', 'copy')
|
|
53
|
+
.outputOptions('-avoid_negative_ts', 'make_zero')
|
|
54
|
+
.output(outputPath)
|
|
55
|
+
.on('end', () => resolve(outputPath))
|
|
56
|
+
.on('error', (err) => reject(err))
|
|
57
|
+
.run();
|
|
58
|
+
});
|
|
59
|
+
}
|
|
42
60
|
/**
|
|
43
61
|
* Copies a pre-downloaded segment file to the output directory.
|
|
44
62
|
* Used when videos are downloaded via --download-sections segments mode.
|
|
45
63
|
*/
|
|
46
|
-
async function copySegment(sourcePath, outputPath,
|
|
47
|
-
const outputDir =
|
|
64
|
+
async function copySegment(sourcePath, outputPath, cfg) {
|
|
65
|
+
const outputDir = cfg.outputDir;
|
|
48
66
|
const finalOutputPath = join(outputDir, outputPath.split('/').pop() || '');
|
|
49
67
|
await fs.copyFile(sourcePath, finalOutputPath);
|
|
50
68
|
return finalOutputPath;
|
|
@@ -65,8 +83,9 @@ async function copySegment(sourcePath, outputPath, customPath) {
|
|
|
65
83
|
* @returns Array of successfully written clip file paths
|
|
66
84
|
* @throws {Error} if ffmpeg is not installed
|
|
67
85
|
*/
|
|
68
|
-
export async function generateClips(videoPath, segments, videoId, customPath, concurrency = 1) {
|
|
69
|
-
const outputDir = customPath ||
|
|
86
|
+
export async function generateClips(videoPath, segments, videoId, cfg, customPath, concurrency = 1) {
|
|
87
|
+
const outputDir = customPath || cfg.outputDir;
|
|
88
|
+
configureFfmpeg(cfg);
|
|
70
89
|
await fs.mkdir(outputDir, { recursive: true });
|
|
71
90
|
if (segments.length === 0) {
|
|
72
91
|
log.warn('No segments provided to generateClips — nothing to cut.');
|
|
@@ -78,8 +97,14 @@ export async function generateClips(videoPath, segments, videoId, customPath, co
|
|
|
78
97
|
const startInt = Math.floor(segment.start);
|
|
79
98
|
const endInt = Math.ceil(segment.end);
|
|
80
99
|
const outputPath = join(outputDir, `${videoId}_${startInt}_${endInt}.mp4`);
|
|
100
|
+
try {
|
|
101
|
+
await fs.access(outputPath);
|
|
102
|
+
log.info(`Clip already exists, skipping: ${outputPath}`);
|
|
103
|
+
return outputPath;
|
|
104
|
+
}
|
|
105
|
+
catch { }
|
|
81
106
|
log.info(`Cutting clip: ${outputPath} (${formatSeconds(startInt)} – ${formatSeconds(endInt)})`);
|
|
82
|
-
return cutClip(videoPath, segment.start, segment.end, outputPath);
|
|
107
|
+
return cutClip(videoPath, segment.start, segment.end, outputPath, cfg);
|
|
83
108
|
}));
|
|
84
109
|
const results = await Promise.allSettled(jobs);
|
|
85
110
|
const paths = [];
|
|
@@ -107,12 +132,13 @@ export async function generateClips(videoPath, segments, videoId, customPath, co
|
|
|
107
132
|
* @param concurrency - Maximum number of parallel copy operations (default: 1)
|
|
108
133
|
* @returns Array of organized clip file paths in outputs/
|
|
109
134
|
*/
|
|
110
|
-
export async function organizeClips(sourcePaths, videoId, customPath, concurrency = 1) {
|
|
135
|
+
export async function organizeClips(sourcePaths, videoId, cfg, customPath, concurrency = 1) {
|
|
111
136
|
if (sourcePaths.length === 0) {
|
|
112
137
|
log.warn('No pre-downloaded segments to organize.');
|
|
113
138
|
return [];
|
|
114
139
|
}
|
|
115
|
-
const outputDir = customPath ||
|
|
140
|
+
const outputDir = customPath || cfg.outputDir;
|
|
141
|
+
configureFfmpeg(cfg);
|
|
116
142
|
await fs.mkdir(outputDir, { recursive: true });
|
|
117
143
|
const limit = pLimit(concurrency);
|
|
118
144
|
log.info(`Organizing ${sourcePaths.length} clip${sourcePaths.length !== 1 ? 's' : ''} (max ${concurrency} parallel)...`);
|
|
@@ -120,7 +146,7 @@ export async function organizeClips(sourcePaths, videoId, customPath, concurrenc
|
|
|
120
146
|
const filename = sourcePath.split('/').pop() || '';
|
|
121
147
|
const outputPath = join(outputDir, filename);
|
|
122
148
|
log.info(`Organizing clip: ${outputPath}`);
|
|
123
|
-
return copySegment(sourcePath, outputPath,
|
|
149
|
+
return copySegment(sourcePath, outputPath, cfg);
|
|
124
150
|
}));
|
|
125
151
|
const results = await Promise.allSettled(jobs);
|
|
126
152
|
const paths = [];
|
|
@@ -138,4 +164,52 @@ export async function organizeClips(sourcePaths, videoId, customPath, concurrenc
|
|
|
138
164
|
}
|
|
139
165
|
return paths;
|
|
140
166
|
}
|
|
167
|
+
/**
|
|
168
|
+
* Remuxes pre-downloaded segment files to the output directory via ffmpeg stream copy.
|
|
169
|
+
* Fixes A/V sync by normalising timestamps without re-encoding (lossless).
|
|
170
|
+
*
|
|
171
|
+
* @param sourcePaths - Paths to the pre-downloaded segment files in downloads/
|
|
172
|
+
* @param videoId - Used to verify file naming
|
|
173
|
+
* @param customPath - Custom output directory (optional, overrides OUTPUT_DIR)
|
|
174
|
+
* @param concurrency - Maximum number of parallel remux operations (default: 1)
|
|
175
|
+
* @returns Array of remuxed clip file paths in outputs/
|
|
176
|
+
*/
|
|
177
|
+
export async function remuxClips(sourcePaths, videoId, cfg, customPath, concurrency = 1) {
|
|
178
|
+
if (sourcePaths.length === 0) {
|
|
179
|
+
log.warn('No pre-downloaded segments to remux.');
|
|
180
|
+
return [];
|
|
181
|
+
}
|
|
182
|
+
const outputDir = customPath || cfg.outputDir;
|
|
183
|
+
configureFfmpeg(cfg);
|
|
184
|
+
await fs.mkdir(outputDir, { recursive: true });
|
|
185
|
+
const limit = pLimit(concurrency);
|
|
186
|
+
log.info(`Remuxing ${sourcePaths.length} clip${sourcePaths.length !== 1 ? 's' : ''} (lossless, max ${concurrency} parallel)...`);
|
|
187
|
+
const jobs = sourcePaths.map((sourcePath) => limit(async () => {
|
|
188
|
+
const filename = sourcePath.split('/').pop() || '';
|
|
189
|
+
const outputPath = join(outputDir, filename);
|
|
190
|
+
try {
|
|
191
|
+
await fs.access(outputPath);
|
|
192
|
+
log.info(`Clip already exists, skipping: ${outputPath}`);
|
|
193
|
+
return outputPath;
|
|
194
|
+
}
|
|
195
|
+
catch { }
|
|
196
|
+
log.info(`Remuxing clip: ${sourcePath} → ${outputPath}`);
|
|
197
|
+
return remuxSegment(sourcePath, outputPath, cfg);
|
|
198
|
+
}));
|
|
199
|
+
const results = await Promise.allSettled(jobs);
|
|
200
|
+
const paths = [];
|
|
201
|
+
for (let i = 0; i < results.length; i++) {
|
|
202
|
+
const result = results[i];
|
|
203
|
+
if (result.status === 'fulfilled') {
|
|
204
|
+
log.info(`Clip ready: ${result.value}`);
|
|
205
|
+
paths.push(result.value);
|
|
206
|
+
}
|
|
207
|
+
else {
|
|
208
|
+
const sourcePath = sourcePaths[i];
|
|
209
|
+
const reason = result.reason instanceof Error ? result.reason.message : String(result.reason);
|
|
210
|
+
log.warn(`Failed to remux clip ${sourcePath}: ${reason}`);
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
return paths;
|
|
214
|
+
}
|
|
141
215
|
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/lib/services/video/clipper/index.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,eAAe,CAAC;AACnC,OAAO,EAAE,QAAQ,IAAI,EAAE,EAAE,MAAM,IAAI,CAAC;AACpC,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAC5B,OAAO,MAAM,MAAM,SAAS,CAAC;AAC7B,OAAO,EAAE,GAAG,EAAE,MAAM,sBAAsB,CAAC;AAC3C,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAWrD,SAAS,eAAe,CAAC,GAAkB;IACzC,IAAI,GAAG,CAAC,UAAU,EAAE,CAAC;QACnB,MAAM,CAAC,aAAa,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;IACvC,CAAC;IACD,IAAI,GAAG,CAAC,WAAW,EAAE,CAAC;QACpB,MAAM,CAAC,cAAc,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;IACzC,CAAC;AACH,CAAC;AAED;;;;;;GAMG;AACH,SAAS,OAAO,CACd,SAAiB,EACjB,KAAa,EACb,GAAW,EACX,UAAkB,EAClB,GAAkB;IAElB,MAAM,aAAa,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,KAAK,GAAG,GAAG,CAAC,eAAe,CAAC,CAAC;IAC/D,MAAM,WAAW,GAAG,IAAI,CAAC,GAAG,CAAC,aAAa,GAAG,CAAC,EAAE,GAAG,GAAG,GAAG,CAAC,eAAe,CAAC,CAAC;IAC3E,MAAM,QAAQ,GAAG,WAAW,GAAG,aAAa,CAAC;IAE7C,GAAG,CAAC,IAAI,CACN,uBAAuB,aAAa,CAAC,OAAO,CAAC,CAAC,CAA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,EAAE,UAAU,EAAE,GAAG,CAAC,CAAC;IACnD,CAAC,CAAC,CACH,CAAC;IAEF,MAAM,OAAO,GAAG,MAAM,OAAO,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;IAE/C,MAAM,KAAK,GAAa,EAAE,CAAC;IAC3B,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;QACxC,MAAM,MAAM,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;QAC1B,IAAI,MAAM,CAAC,MAAM,KAAK,WAAW,EAAE,CAAC;YAClC,GAAG,CAAC,IAAI,CAAC,eAAe,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC;YACxC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QAC3B,CAAC;aAAM,CAAC;YACN,MAAM,UAAU,GAAG,WAAW,CAAC,CAAC,CAAC,CAAC;YAClC,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,YAAY,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;YAC9F,GAAG,CAAC,IAAI,CAAC,wBAAwB,UAAU,KAAK,MAAM,EAAE,CAAC,CAAC;QAC5D,CAAC;IACH,CAAC;IAED,OAAO,KAAK,CAAC;AACf,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export type { VideoSource } from './source/types.js';
|
|
2
|
+
export { parseUrl } from './source/youtube/parser.js';
|
|
3
|
+
export { extractMetadata } from './source/youtube/metadata.js';
|
|
4
|
+
export { downloadVideo } from './source/youtube/downloader.js';
|
|
5
|
+
export { parseVtt, YtDlpTranscriptAnalyzer } from './source/youtube/subtitles.js';
|
|
6
|
+
export { GoogleYouTubeCatalogService, parseChannelInput, parseYouTubeDuration, } from './source/youtube/catalog.js';
|
|
7
|
+
export type { YouTubeCatalogService } from './source/youtube/catalog.js';
|
|
8
|
+
export { generateClips, organizeClips } from './clipper/index.js';
|
|
9
|
+
export { VideoMetadataSchema, PipelineResultSchema } from '../../types/video.js';
|
|
10
|
+
export type { VideoMetadata, PipelineResult, DownloadMode, DownloadResultAll, DownloadResultSegments, DownloadResult, } from '../../types/video.js';
|
|
11
|
+
export { ChannelSummarySchema, VideoSummarySchema, VideoDetailsSchema, VideoPageSchema, YouTubeThumbnailSchema, } from '../../types/youtube.js';
|
|
12
|
+
export type { ChannelSummary, VideoSummary, VideoDetails, VideoPage, YouTubeThumbnail, } from '../../types/youtube.js';
|
|
13
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lib/services/video/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAC;AACtD,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAC/D,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAE,uBAAuB,EAAE,MAAM,+BAA+B,CAAC;AAClF,OAAO,EACL,2BAA2B,EAC3B,iBAAiB,EACjB,oBAAoB,GACrB,MAAM,6BAA6B,CAAC;AACrC,YAAY,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AACzE,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAClE,OAAO,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAChF,YAAY,EACV,aAAa,EACb,cAAc,EACd,YAAY,EACZ,iBAAiB,EACjB,sBAAsB,EACtB,cAAc,GACf,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,oBAAoB,EACpB,kBAAkB,EAClB,kBAAkB,EAClB,eAAe,EACf,sBAAsB,GACvB,MAAM,uBAAuB,CAAC;AAC/B,YAAY,EACV,cAAc,EACd,YAAY,EACZ,YAAY,EACZ,SAAS,EACT,gBAAgB,GACjB,MAAM,uBAAuB,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export { parseUrl } from './source/youtube/parser.js';
|
|
2
|
+
export { extractMetadata } from './source/youtube/metadata.js';
|
|
3
|
+
export { downloadVideo } from './source/youtube/downloader.js';
|
|
4
|
+
export { parseVtt, YtDlpTranscriptAnalyzer } from './source/youtube/subtitles.js';
|
|
5
|
+
export { GoogleYouTubeCatalogService, parseChannelInput, parseYouTubeDuration, } from './source/youtube/catalog.js';
|
|
6
|
+
export { generateClips, organizeClips } from './clipper/index.js';
|
|
7
|
+
export { VideoMetadataSchema, PipelineResultSchema } from '../../types/video.js';
|
|
8
|
+
export { ChannelSummarySchema, VideoSummarySchema, VideoDetailsSchema, VideoPageSchema, YouTubeThumbnailSchema, } from '../../types/youtube.js';
|
|
9
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/lib/services/video/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAC;AACtD,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAC/D,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAE,uBAAuB,EAAE,MAAM,+BAA+B,CAAC;AAClF,OAAO,EACL,2BAA2B,EAC3B,iBAAiB,EACjB,oBAAoB,GACrB,MAAM,6BAA6B,CAAC;AAErC,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAClE,OAAO,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAShF,OAAO,EACL,oBAAoB,EACpB,kBAAkB,EAClB,kBAAkB,EAClB,eAAe,EACf,sBAAsB,GACvB,MAAM,uBAAuB,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export type { VideoSource } from './types.js';
|
|
2
|
+
export { parseUrl } from './youtube/parser.js';
|
|
3
|
+
export { extractMetadata } from './youtube/metadata.js';
|
|
4
|
+
export { downloadVideo } from './youtube/downloader.js';
|
|
5
|
+
export { parseVtt, YtDlpTranscriptAnalyzer } from './youtube/subtitles.js';
|
|
6
|
+
export { GoogleYouTubeCatalogService, parseChannelInput, parseYouTubeDuration, } from './youtube/catalog.js';
|
|
7
|
+
export type { YouTubeCatalogService } from './youtube/catalog.js';
|
|
8
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/lib/services/video/source/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAC9C,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAC/C,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAE,QAAQ,EAAE,uBAAuB,EAAE,MAAM,wBAAwB,CAAC;AAC3E,OAAO,EACL,2BAA2B,EAC3B,iBAAiB,EACjB,oBAAoB,GACrB,MAAM,sBAAsB,CAAC;AAC9B,YAAY,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { parseUrl } from './youtube/parser.js';
|
|
2
|
+
export { extractMetadata } from './youtube/metadata.js';
|
|
3
|
+
export { downloadVideo } from './youtube/downloader.js';
|
|
4
|
+
export { parseVtt, YtDlpTranscriptAnalyzer } from './youtube/subtitles.js';
|
|
5
|
+
export { GoogleYouTubeCatalogService, parseChannelInput, parseYouTubeDuration, } from './youtube/catalog.js';
|
|
6
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/lib/services/video/source/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAC/C,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAE,QAAQ,EAAE,uBAAuB,EAAE,MAAM,wBAAwB,CAAC;AAC3E,OAAO,EACL,2BAA2B,EAC3B,iBAAiB,EACjB,oBAAoB,GACrB,MAAM,sBAAsB,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { VideoMetadata, DownloadResult } from '../../../types/video.js';
|
|
2
|
+
import type { TranscriptLine } from '../../../types/transcript.js';
|
|
3
|
+
export interface VideoSource {
|
|
4
|
+
readonly name: string;
|
|
5
|
+
resolve(input: string): Promise<{
|
|
6
|
+
videoId: string;
|
|
7
|
+
metadata: VideoMetadata;
|
|
8
|
+
}>;
|
|
9
|
+
downloadVideo(videoId: string, mode: 'all' | number, segments?: unknown[], customPath?: string): Promise<DownloadResult>;
|
|
10
|
+
getSubtitles(videoId: string): Promise<TranscriptLine[]>;
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/lib/services/video/source/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACzE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAE/D,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAEtB,OAAO,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,aAAa,CAAA;KAAE,CAAC,CAAC;IAE9E,aAAa,CACX,OAAO,EAAE,MAAM,EACf,IAAI,EAAE,KAAK,GAAG,MAAM,EACpB,QAAQ,CAAC,EAAE,OAAO,EAAE,EACpB,UAAU,CAAC,EAAE,MAAM,GAClB,OAAO,CAAC,cAAc,CAAC,CAAC;IAE3B,YAAY,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,EAAE,CAAC,CAAC;CAC1D"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../../src/lib/services/video/source/types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { ChannelSummary, VideoDetails, VideoPage } from '../../../../types/youtube.js';
|
|
2
|
+
export interface YouTubeCatalogService {
|
|
3
|
+
resolveChannel(input: string): Promise<ChannelSummary>;
|
|
4
|
+
listChannelVideos(channelId: string, pageToken?: string): Promise<VideoPage>;
|
|
5
|
+
getVideoDetails(videoId: string): Promise<VideoDetails>;
|
|
6
|
+
}
|
|
7
|
+
type ChannelLookup = {
|
|
8
|
+
kind: 'id';
|
|
9
|
+
value: string;
|
|
10
|
+
} | {
|
|
11
|
+
kind: 'handle';
|
|
12
|
+
value: string;
|
|
13
|
+
} | {
|
|
14
|
+
kind: 'username';
|
|
15
|
+
value: string;
|
|
16
|
+
};
|
|
17
|
+
export declare class GoogleYouTubeCatalogService implements YouTubeCatalogService {
|
|
18
|
+
private readonly client;
|
|
19
|
+
constructor(apiKey: string);
|
|
20
|
+
resolveChannel(input: string): Promise<ChannelSummary>;
|
|
21
|
+
listChannelVideos(channelId: string, pageToken?: string): Promise<VideoPage>;
|
|
22
|
+
getVideoDetails(videoId: string): Promise<VideoDetails>;
|
|
23
|
+
private getVideoSummaries;
|
|
24
|
+
}
|
|
25
|
+
export declare function parseChannelInput(input: string): ChannelLookup;
|
|
26
|
+
export declare function parseYouTubeDuration(duration: string | null | undefined): number;
|
|
27
|
+
export {};
|
|
28
|
+
//# sourceMappingURL=catalog.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"catalog.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/services/video/source/youtube/catalog.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,cAAc,EAAE,YAAY,EAAE,SAAS,EAAgB,MAAM,uBAAuB,CAAC;AAEnG,MAAM,WAAW,qBAAqB;IACpC,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,CAAC,CAAC;IACvD,iBAAiB,CAAC,SAAS,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,SAAS,CAAC,CAAC;IAC7E,eAAe,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC;CACzD;AAED,KAAK,aAAa,GACd;IAAE,IAAI,EAAE,IAAI,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,GAC7B;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,GACjC;IAAE,IAAI,EAAE,UAAU,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC;AAExC,qBAAa,2BAA4B,YAAW,qBAAqB;IACvE,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAqB;gBAEhC,MAAM,EAAE,MAAM;IAIpB,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,CAAC;IAmBtD,iBAAiB,CAAC,SAAS,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,SAAS,CAAC;IAgC5E,eAAe,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC;YAe/C,iBAAiB;CAShC;AAED,wBAAg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