create account

Development Log: vimm-core Updates (February 8th 2025) by chiren

View this thread on: hive.blogpeakd.comecency.com
· @chiren ·
$4.97
Development Log: vimm-core Updates (February 8th 2025)
# Development Log: vimm-core Updates (February 8th 2025)

![image.png](https://files.peakd.com/file/peakd-hive/chiren/23u6atCBapy1gjbfZJ5AxRwxSXZtQvKRy8DygsGnm7dh4uhsVftB35mdKQFeUgTNKGmsQ.png)

## 🔧 Core Infrastructure Improvements

### Media Server Optimization
- Fixed critical issue with duplicate Node Media Server (NMS) initialization that was causing EADDRINUSE errors on ports 1935 and 8000
- Implemented singleton pattern for NMS instance management to prevent duplicate server instances and undefined session issues
- Centralized NMS instance management through new `src/server/nms-instance.js` module

### API Enhancements
1. New Endpoints:
   - Added `GET /api/streams` endpoint with comprehensive features:
     - Pagination support (`?page=X&limit=Y`)
     - Language filtering (`?language=en`)
     - Category filtering (`?category=gaming`)
     - Stream metadata including viewer counts and quality information
   - Implemented `GET /api/stream/:streamId/status` endpoint providing:
     - Basic stream metadata (title, description, category)
     - Real-time statistics (viewers, uptime)
     - Quality information (resolution, bitrate, codecs)
     - Stream health metrics

### Database Updates
- Added `streamCategory` field to StreamKey model
- Implemented corresponding database migration
- Enhanced stream filtering capabilities based on new category field

### Frontend Improvements
- Fixed ad container visibility issues on initial page load

### Bug Fixes
- Resolved "Cannot convert undefined or null to object" error in streams endpoint
- Fixed "Cannot read property of undefined" error in stream status endpoint
- Corrected require path for streamStatusRouter
- Fixed various migration-related issues

## 🔄 Migration Guide
For developers working with the codebase:
1. Run the latest migrations to add the new `streamCategory` field
2. Update any direct NMS instance references to use the new singleton pattern
3. Review and update stream-related API calls to leverage new filtering capabilities

## 🔜 Next Steps
- Continue monitoring NMS performance after singleton implementation
- Gather feedback on new stream categorization system
- Consider expanding stream metadata capabilities

[View full commit history](https://github.com/VIMM-TV/vimm-core/commits/main)

---

This development log summarizes the major updates from the recent commits to the vimm-core repository. The changes focus on improving server stability, enhancing the streaming API capabilities, and fixing critical infrastructure issues. Notable highlights include the Node Media Server optimization and the introduction of new stream management endpoints.
👍  , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , and 57 others
properties (23)
authorchiren
permlinkvimm-core-feb2025-update-node-media-server-optimization-and-streaming-api-enhancements
categorydevelopment
json_metadata"{"app":"peakd/2025.1.3","format":"markdown","description":"Updates to VIMM's core: Node Media Server optimization, new streaming API endpoints, and enhanced categorization system.","tags":["development","streaming","api","nodejs","vimm"],"users":[],"image":["https://files.peakd.com/file/peakd-hive/chiren/23u6atCBapy1gjbfZJ5AxRwxSXZtQvKRy8DygsGnm7dh4uhsVftB35mdKQFeUgTNKGmsQ.png"]}"
created2025-02-08 15:05:00
last_update2025-02-08 15:05:00
depth0
children1
last_payout2025-02-15 15:05:00
cashout_time1969-12-31 23:59:59
total_payout_value2.366 HBD
curator_payout_value2.608 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length2,651
author_reputation45,363,105,266,100
root_title"Development Log: vimm-core Updates (February 8th 2025)"
beneficiaries
0.
accountcommentrewarder
weight500
1.
accountsugarush89
weight500
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id140,647,363
net_rshares12,697,110,640,715
author_curate_reward""
vote details (121)
@commentrewarder · (edited)
@chiren, I'm refunding 0.205 HIVE and 0.065 HBD, because there are no comments to reward.
properties (22)
authorcommentrewarder
permlinkre-chiren-vimm-core-feb2025-update-node-media-server-optimiz17683
categorydevelopment
json_metadata{"app":"CommentRewarder"}
created2025-02-11 15:05:06
last_update2025-02-15 15:06:03
depth1
children0
last_payout2025-02-18 15:05:06
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length89
author_reputation54,645,101,024,448
root_title"Development Log: vimm-core Updates (February 8th 2025)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id140,718,184
net_rshares0