JT1078 Live Video — Channel 1 works, Channel 2 returns 400 on HLS segments

Amine 2 days ago

Hi,

I'm using Traccar 6.x with a JT1078-compatible dashcam device. Live video streaming works perfectly on channel 1, but when I switch to channel 2, the HLS .ts segments return 400 Bad Request, even though the server logs confirm JT1078 data is arriving for channel 2.

Setup
Traccar version: 6.13 (latest)
Device protocol: JT808 + JT1078
OS: Windows / Linux

What works (Channel 1)
1- I send videoStart command with { index: 1 }
2- Server logs show: command type: videoStart sent
3- JT1078 data arrives (data type 01 = video P-frame)
4- /api/stream/{deviceId}/live.m3u8 loads successfully
5- .ts segments load → video plays in browser

What fails (Channel 2)
1- I send videoStop (for channel 1), then videoStart with { index: 2 }
2- Server logs confirm both commands are sent successfully
3-JT1078 data does arrive for channel 2 (I can see it in the logs with channel byte 02)
4- /api/stream/{deviceId}/live.m3u8 seems to load (HLS.js requests .ts segments)
5- .ts segments return 400 Bad Request

Server logs showing channel 2 data arriving:

16:30:57 INFO: [Tfc93b6e5] id: 860112070122256, command type: videoStop sent
16:30:58 INFO: [Tfc93b6e5] id: 860112070122256, command type: videoStart sent
16:30:58 INFO: [T3ef134cd] connected
16:30:59 INFO: [T3ef134cd: jt1078 < 196.225.83.100] 30316364816200004e3a0b70cf810201...
16:30:59 INFO: [T3ef134cd: jt1078 < 196.225.83.100] (data continues arriving)

Browser console errors:

GET http://localhost:8082/api/stream/17/2.ts 400 (Bad Request)
GET http://localhost:8082/api/stream/17/2.ts 400 (Bad Request)

Questions
1- Does the HLS streaming endpoint /api/stream/{deviceId}/live.m3u8 support multi-channel switching? Or is it locked to the first channel that starts streaming?
2- Is there a different URL format needed for different channels (e.g., /api/stream/{deviceId}/{channel}/live.m3u8)?
3- Do I need to wait for the previous stream session to fully clean up before starting a new channel?
4- Is this a known limitation of the current JT1078 implementation?
Thank you for the amazing work on JT1078 support!

Anton Tananaev 2 days ago

Which version of Traccar are you using exactly?

Amine 2 days ago

Solved! I was using the official v6.13.3 installer, which didn't include the per-channel video streaming endpoint (VideoStreamResource).

I cloned the server from the latest master branch on GitHub, built it with Gradle, and replaced the tracker-server.jar and lib/ folder. Both channels now work perfectly — channel 1 (front camera) and channel 2 (rear camera) stream without issues.

It seems this feature was added after the 6.13.3 release. Will it be included in the next official release?

Thanks for the amazing JT1078 support!

mazen 2 days ago

Hi Amine ,

Can you let me know which camera or dash cam you are using?

Amine 2 days ago

Currently testing JC181 dashcam.

paulo andre jannke 2 days ago

Could you explain how you changed the channel? I also use the JC181 and I can see channel 1, external, perfectly here.

Tracker a day ago

Hi mate, after starting live video there is a option to change index