New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
no video or audio representation found with timebased mpd #151
Comments
Hi @hnas66, Thanks for using livesim2. The purpose of livesim2 is to test all sorts of timing issues with live DASH streaming. It should be compatible with as many players as possible. However, it's codec support is rather limited. The following is not right. The adaptation sets and representations are detected, but no segments due to the use of SegmentTimeline with _I just realised that it is not explicit in the README file or from the error messages that the only video codec support is AVC/H.264 and the only audio codec supported is AAC. Your asset uses HEVC video and EC-3 audio, so non of the AV-representations will be detected. The minimum change would be to document this limitation and also provide better error messages._ livesim2 does some pretty advanced rewrites of segments like adapting audio segment duration to the video and (in a PR) encrypting AV segments on the fly. This means that it takes some work to add HEVC and AC-3/EC-3 support to livesim2, but it is certainly do-able (the encryption of HEVC being the most complex part). Can you provide a minimal test asset with HEVC and EC-3 that can be included in the livesim2 test-suite? Something like 2 segments should be fine. Ideally at rather low bitrate (resolution) to make the files small. It is also good if the audio is at least as long as the video, but it is not required since audio samples will be moved/dropped/repeated to make the audio segment start and stop time will follow the video. |
@hnas66 A follow up. I just made a small HEVC test asset and it could be imported (some AC-3 problem at playback, though). At a closer look, the reason that your asset is not imported at all is that it is using SegmentTimeline with Another thing that would improve your input would be to have a segment duration of 1.92s for both video and audio. |
Adding support for SegmentTimeline with |
Hi, thanks for your support. |
Sorry, this went a bit quick, so I was not correct in my observation. I saw the If you can provide me with a short test sequence I can try to debug from it? Otherwise, I'll try to generate something similar on my own, by adding a startNumber field to a Time-based SegmentTimeline asset. There may also be an effect from the addressing in your assed. The segments are put two directory levels below the manifest, which is not the usual case. Again, I need to test to see if it is supported. |
@hnas66 Turned out that it is the startNumber that causes the segments to not be detected. It has a defined meaning if Still, livesim2 could do something better from the situation like either complaining or removing it. I'll file a ticket on that. |
Hmm. Too quick a conclusion again. A startNumber attribute does not cause any harm. The real issue is that the segments are two levels below the MPD. I made such an asset and it cannot be imported. I don't know how big changes are needed to support it, but a fix is to move the segments up one level, and change the init and media URL patterns in theMPD. |
@hnas66 This starts to be embarrassing. After cleaning up the special meta-data files for fast startup, I could import an asset with representations two levels below the mpd. This means that I'm out of ideas why your asset couldn't be imported. If you don't want to make (part of) your asset public by publishing it here, feel free to send it to me directly. |
@tobbee , |
@hnas66 thanks. The video segment duration in your short asset is constant. That is the important thing. In order to have audio and video segments start as close as possible, the audio segment should vary in duration. Livesim2 will fix that if it is not the case. I just tried to load the asset and it was reported that no representation was found. However, the reason turned out that the attribute "contentType" is absent, which is not the case for your original asset. I have a fix for the missing "contentType" that I will post as a PR. I thus doubt that we have found the issue with your original asset. To get closer to that, you could try to run livesim2 in a debugger (e.g. in Visual Studio code) and add a configuration like the following to the {
"name": "livesim2 hevc_ac3",
"type": "go",
"request": "launch",
"mode": "debug",
"program": "${workspaceFolder}/cmd/livesim2",
"args": ["--vodroot", "${workspaceFolder}/cmd/livesim2/content", "--timeout", "0"]
} It became PR #154 |
@hnas66 from your initial screen dump it looks as if you have MPDs on different levels in the same tree. That is not well supported. Could you try to take your troublesome asset and put it in its own directory tree, and set "--vodroot" to one or two levels above that. An asset is supposed to be one directory with one or more MPDs. It also seems that you tried to specify "/segtimeline_1" as parameter to livesim2. There is no parameters to specify the input VoD format, but that is automatically detected, so "/segtimeline_1" is for specifying the output format. Such parameters are most easily handled using the "/urlgen" server page that livesim2 serves |
@tobbee , thanks again for your effort. I did notice before that contentType seems mandatory, during testing I did add that (not in the zip file I attached). |
All packaging is done on the fly when generating the output segments, so just add "/segtimeline_1" in the URL like
The content is scanned at startup so this output format works even if the original VoD is not using SegmentTimeline. Just play around with https://livesim2.dashif.org/urlgen or http://localhost:8888/urlgen on your local machine and press the If you check out the latest code, contentType is now deduced from the mimeType in many cases, so you don't need to add it manually. |
I got some progress but unfortunately have less time to work on it. |
OK. Would be interesting to find out what's going wrong, so I look forward to anything you find. If you can share the content in private, I may be able to help out pinpointing the issue. |
@tobbee I made some progress. After downloading the latest version, I cannot fully recreate the issue. I tested a few assets and I am able to play them on my set-top box (using /segtimeline_1). I still have to add a "contentType" to the manifest to make it work. I see the change you made in "livempd.go" for the mimeType but i did not manage to find why it does not work. |
@hnas66 Nice that you made some progress. Good that unencrypted Dolby audio works. Even encrypted may work, since the samples are fully encrypted so livesim2 does not need to do any codec specific work in contrast to video. If you play directly from http://127.0.0.1:8888/assets or wherever you put your server, you will not get "segtimeline_1/" set, but just the basic case which uses SegmentTemplate with Number. To get SegmentTimeline you need to use the "http://127.0.0.1/urlgen" page and choose the SegmentTemplate variant. The mime type must be one of "video/mp4", "audio/mp4", or "application/mp4" and set in the AdaptationSet and not in the representation, if I recall correctly. In general, you should need a powerful server, so a 500 error is probably something else. Anyway, since your problems may be more of more general interest I'd be interested in looking at them. Seems that you already sent them to me. I just tried playing them out in Safari on my Mac. |
I checked your assets a bit and the timing is not ideal for livesim2. The best is to have the presentationTime of the first segment to start at 0, which is also a CMAF recommendation. This means that the compositionTimeOffset (CTO) of the first video segments should be zero. For B-frames, it also means that some later CTO values are negative. It is also best if all video segments have the same duration. Looking at DD50, your first video segment has 249 frames and start with a composition time offset of 2. The following segments are 250 frames long and start with CTO=3. This is in contrast to DD20, where the first CTO=0 for all video segments, and all have 50 frames. If I get more time, I may add extra diagnostics to the livesim2 ingest process and warn of prohibit streams which are |
I try to serve some vod content as live content with livesim2. The setup works (I can play the included test content).
If i try to play my content I get a error "no video or audio representation found"
output:
hwtest@hwtest-XPS-15-9500:~/Downloads/livesim2/cmd/livesim2$ ./livesim2 /segtimeline_1 --vodroot=app/testdata/assets/live
time=2024-01-26T15:50:36.009+01:00 level=INFO msg="asset MPD loaded" asset=disk1/CI-E2E-360-LOOP-Timeclock/stb-dash-sd-avc-clear/ChID_voices_1920x1080p_25fps_h265_6ch_640kbps_ddp_joc mpdName=disk1/CI-E2E-360-LOOP-Timeclock/stb-dash-sd-avc-clear/ChID_voices_1920x1080p_25fps_h265_6ch_640kbps_ddp_joc/ChID_voices_1920x1080p_25fps_h265_6ch_640kbps_ddp_joc.mpd
time=2024-01-26T15:50:36.025+01:00 level=INFO msg="asset MPD loaded" asset=disk1/CI-E2E-360-LOOP-Timeclock/stb-dash-sd-avc-clear mpdName=disk1/CI-E2E-360-LOOP-Timeclock/stb-dash-sd-avc-clear/Manifest.mpd
time=2024-01-26T15:50:36.025+01:00 level=INFO msg="Asset consolidated" asset=disk1/CI-E2E-360-LOOP-Timeclock/stb-dash-sd-avc-clear loopDurMS=75560
time=2024-01-26T15:50:36.025+01:00 level=WARN msg="Asset consolidation problem. Skipping" error="setReferenceRep: no video or audio representation found"
time=2024-01-26T15:50:36.025+01:00 level=INFO msg="Vod asset found" count=1 "elapsed seconds"=0.030s
time=2024-01-26T15:50:36.025+01:00 level=INFO msg="Available MPD" assetPath=disk1/CI-E2E-360-LOOP-Timeclock/stb-dash-sd-avc-clear mpdName=Manifest.mpd
time=2024-01-26T15:50:36.025+01:00 level=INFO msg="livesim2 starting" version="v1.1.1, date: 2024-01-19" port=8888
Manifest.mpd.txt
The asset is playing okay if I play it as it is.
I cannot find the root cause of the problem.
Thanks in advance for any support you can offer.
Hans
The text was updated successfully, but these errors were encountered: