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

Amine a month 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 a month ago

Which version of Traccar are you using exactly?

Amine a month 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 a month ago

Hi Amine ,

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

Amine a month ago

Currently testing JC181 dashcam.

paulo andre jannke a month 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 month ago

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

mazen 8 days ago

Hi Amine ,

Can you let me know how can i config dashcam to connect with my server?

Amine 8 days ago

The camara has 2 settings on:
Server 1 (gps location)
Port 5015

server,0,ip address or domain name,1015,0#

Server 2 (Video)
Port 5263

server,1,ip or domain name,5263,1#

mazen 8 days ago

Hi Amine,

i used SERVER,1,api.mydomain.com,5015,0#
SERVER,1,api.mydomain.com,5263,1#

but does not working

mazen 7 days ago

Dear Amine,

Kindly need for your support.

Amine 3 days ago

SERVER,1,api.mydomain.com,5015,0#
SERVER2,1,api.mydomain.com,5263,0#