import path from 'path';

export const config = {
  port: parseInt(process.env.PORT || '3030', 10),
  videosDir: path.resolve(process.env.VIDEOS_DIR || '../storage/videos'),
  hlsDir: path.resolve(process.env.HLS_DIR || '../storage/hls'),
  framesDir: path.resolve(process.env.FRAMES_DIR || '../storage/frames'),
  thumbnailsDir: path.resolve(process.env.THUMBNAILS_DIR || '../storage/thumbnails'),
  dbPath: path.resolve(process.env.DB_PATH || '../storage/annotations.db'),
  maxUploadSize: parseInt(process.env.MAX_UPLOAD_SIZE || String(20 * 1024 * 1024 * 1024), 10),
  ffmpegPath: process.env.FFMPEG_PATH || 'ffmpeg',
  ffprobePath: process.env.FFPROBE_PATH || 'ffprobe',
  hlsSegmentTime: parseInt(process.env.HLS_SEGMENT_TIME || '6', 10),
  thumbnailInterval: parseInt(process.env.THUMBNAIL_INTERVAL || '10', 10),
};
