Skip to content
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

Some mismatches in the transcoded assets #14

Open
Wkkkkk opened this issue Jan 24, 2025 · 3 comments
Open

Some mismatches in the transcoded assets #14

Wkkkkk opened this issue Jan 24, 2025 · 3 comments

Comments

@Wkkkkk
Copy link

Wkkkkk commented Jan 24, 2025

While testing, some strange results were found.

  1. Returning raw MP4 assets despite explicit content type in header.

Command

curl -X 'GET' \
  'https://eyevinnlab-demo.eyevinn-ad-normalizer.auto.prod.osaas.io/api/v1/vast?dur=13' \
  -H 'accept: application/xml'

returns

<?xml version="1.0" encoding="utf-8"?>
<VAST version="4.0">
  <Ad id="POD_AD-ID_001" sequence="1">
    <InLine>
      <Impression id="IMPRESSION-ID_001"><![CDATA[http://eyevinnlab-adnormalizer.eyevinn-test-adserver.auto.prod.osaas.io/api/v1/sessions/1a200bb5-6970-4d42-ad85-f4cbc0decc17/tracking?adId=alvedon-10s_1&progress=vast]]></Impression>
      <AdSystem><![CDATA[Test Adserver]]></AdSystem>
      <AdTitle><![CDATA[Ad That Test-Adserver Wants Player To See #1]]></AdTitle>
      <Creatives>
        <Creative id="CRETIVE-ID_001" adId="alvedon-10s" sequence="1">
          <UniversalAdId idRegistry="test-ad-id.eyevinn" idValue="AAA%2FBBBB123%2F1"><![CDATA[AAA%2FBBBB123%2F1]]></UniversalAdId>
          <Linear>
            <TrackingEvents>
              <Tracking event="start"><![CDATA[http://eyevinnlab-adnormalizer.eyevinn-test-adserver.auto.prod.osaas.io/api/v1/sessions/1a200bb5-6970-4d42-ad85-f4cbc0decc17/tracking?adId=alvedon-10s_1&progress=0]]></Tracking>
              <Tracking event="firstQuartile"><![CDATA[http://eyevinnlab-adnormalizer.eyevinn-test-adserver.auto.prod.osaas.io/api/v1/sessions/1a200bb5-6970-4d42-ad85-f4cbc0decc17/tracking?adId=alvedon-10s_1&progress=25]]></Tracking>
              <Tracking event="midpoint"><![CDATA[http://eyevinnlab-adnormalizer.eyevinn-test-adserver.auto.prod.osaas.io/api/v1/sessions/1a200bb5-6970-4d42-ad85-f4cbc0decc17/tracking?adId=alvedon-10s_1&progress=50]]></Tracking>
              <Tracking event="thirdQuartile"><![CDATA[http://eyevinnlab-adnormalizer.eyevinn-test-adserver.auto.prod.osaas.io/api/v1/sessions/1a200bb5-6970-4d42-ad85-f4cbc0decc17/tracking?adId=alvedon-10s_1&progress=75]]></Tracking>
              <Tracking event="complete"><![CDATA[http://eyevinnlab-adnormalizer.eyevinn-test-adserver.auto.prod.osaas.io/api/v1/sessions/1a200bb5-6970-4d42-ad85-f4cbc0decc17/tracking?adId=alvedon-10s_1&progress=100]]></Tracking>
            </TrackingEvents>
            <VideoClicks>
              <ClickThrough id="Eyevinn Test AdServer"><![CDATA[https://github.com/Eyevinn/test-adserver]]></ClickThrough>
            </VideoClicks>
            <Duration><![CDATA[00:00:10]]></Duration>
            <MediaFiles>
              <MediaFile width="718" height="404" codec="H.264" delivery="progressive" type="video/mp4" bitrate="1300"><![CDATA[https://testcontent.eyevinn.technology/ads/alvedon-10s.mp4]]></MediaFile>
            </MediaFiles>
          </Linear>
        </Creative>
      </Creatives>
    </InLine>
  </Ad>
</VAST>

which includes a mp4 asset in MediaFile.

However, a duration of 30 seconds would return transcoded assets.

  1. Wrong duration from the transcoded assets.

Command

curl -X 'GET' \
  'https://eyevinnlab-demo.eyevinn-ad-normalizer.auto.prod.osaas.io/api/v1/vast?dur=20' \
  -H 'accept: application/xml'

returns

<?xml version="1.0" encoding="utf-8"?>
<VAST version="4.0">
  <Ad id="POD_AD-ID_001" sequence="1">
    <InLine>
      <Impression id="IMPRESSION-ID_001">http://eyevinnlab-adnormalizer.eyevinn-test-adserver.auto.prod.osaas.io/api/v1/sessions/499eb065-1ec8-4eb6-90f5-6d665d20b942/tracking?adId=alvedon-10s_1&amp;progress=vast</Impression>
      <AdSystem>Test Adserver</AdSystem>
      <AdTitle>Ad That Test-Adserver Wants Player To See #1</AdTitle>
      <Creatives>
        <Creative id="CRETIVE-ID_001" adId="alvedon-10s" sequence="1">
          <UniversalAdId idRegistry="test-ad-id.eyevinn" idValue="AAA%2FBBBB123%2F1">AAA%2FBBBB123%2F1</UniversalAdId>
          <Linear>
            <TrackingEvents>
              <Tracking event="start">http://eyevinnlab-adnormalizer.eyevinn-test-adserver.auto.prod.osaas.io/api/v1/sessions/499eb065-1ec8-4eb6-90f5-6d665d20b942/tracking?adId=alvedon-10s_1&amp;progress=0</Tracking>
              <Tracking event="firstQuartile">http://eyevinnlab-adnormalizer.eyevinn-test-adserver.auto.prod.osaas.io/api/v1/sessions/499eb065-1ec8-4eb6-90f5-6d665d20b942/tracking?adId=alvedon-10s_1&amp;progress=25</Tracking>
              <Tracking event="midpoint">http://eyevinnlab-adnormalizer.eyevinn-test-adserver.auto.prod.osaas.io/api/v1/sessions/499eb065-1ec8-4eb6-90f5-6d665d20b942/tracking?adId=alvedon-10s_1&amp;progress=50</Tracking>
              <Tracking event="thirdQuartile">http://eyevinnlab-adnormalizer.eyevinn-test-adserver.auto.prod.osaas.io/api/v1/sessions/499eb065-1ec8-4eb6-90f5-6d665d20b942/tracking?adId=alvedon-10s_1&amp;progress=75</Tracking>
              <Tracking event="complete">http://eyevinnlab-adnormalizer.eyevinn-test-adserver.auto.prod.osaas.io/api/v1/sessions/499eb065-1ec8-4eb6-90f5-6d665d20b942/tracking?adId=alvedon-10s_1&amp;progress=100</Tracking>
            </TrackingEvents>
            <VideoClicks>
              <ClickThrough id="Eyevinn Test AdServer">https://github.com/Eyevinn/test-adserver</ClickThrough>
            </VideoClicks>
            <Duration>00:00:10</Duration>
            <MediaFiles>
              <MediaFile width="718" height="404" codec="H.264" delivery="progressive" type="application/x-mpegURL" bitrate="1300">https:/eyevinnlab-adnormalizer.minio-minio.auto.prod.osaas.io/adassets/AAA2FBBBB1232F1/7c0bd98e-20ff-43ff-bc5a-e1cd0491d94c/index.m3u8</MediaFile>
            </MediaFiles>
          </Linear>
        </Creative>
      </Creatives>
    </InLine>
  </Ad>
  <Ad id="POD_AD-ID_002" sequence="2">
    <InLine>
      <Impression id="IMPRESSION-ID_002">http://eyevinnlab-adnormalizer.eyevinn-test-adserver.auto.prod.osaas.io/api/v1/sessions/499eb065-1ec8-4eb6-90f5-6d665d20b942/tracking?adId=alvedon-10s_2&amp;progress=vast</Impression>
      <AdSystem>Test Adserver</AdSystem>
      <AdTitle>Ad That Test-Adserver Wants Player To See #2</AdTitle>
      <Creatives>
        <Creative id="CRETIVE-ID_002" adId="alvedon-10s" sequence="2">
          <UniversalAdId idRegistry="test-ad-id.eyevinn" idValue="AAA%2FBBBB123%2F2">AAA%2FBBBB123%2F2</UniversalAdId>
          <Linear>
            <TrackingEvents>
              <Tracking event="start">http://eyevinnlab-adnormalizer.eyevinn-test-adserver.auto.prod.osaas.io/api/v1/sessions/499eb065-1ec8-4eb6-90f5-6d665d20b942/tracking?adId=alvedon-10s_2&amp;progress=0</Tracking>
              <Tracking event="firstQuartile">http://eyevinnlab-adnormalizer.eyevinn-test-adserver.auto.prod.osaas.io/api/v1/sessions/499eb065-1ec8-4eb6-90f5-6d665d20b942/tracking?adId=alvedon-10s_2&amp;progress=25</Tracking>
              <Tracking event="midpoint">http://eyevinnlab-adnormalizer.eyevinn-test-adserver.auto.prod.osaas.io/api/v1/sessions/499eb065-1ec8-4eb6-90f5-6d665d20b942/tracking?adId=alvedon-10s_2&amp;progress=50</Tracking>
              <Tracking event="thirdQuartile">http://eyevinnlab-adnormalizer.eyevinn-test-adserver.auto.prod.osaas.io/api/v1/sessions/499eb065-1ec8-4eb6-90f5-6d665d20b942/tracking?adId=alvedon-10s_2&amp;progress=75</Tracking>
              <Tracking event="complete">http://eyevinnlab-adnormalizer.eyevinn-test-adserver.auto.prod.osaas.io/api/v1/sessions/499eb065-1ec8-4eb6-90f5-6d665d20b942/tracking?adId=alvedon-10s_2&amp;progress=100</Tracking>
            </TrackingEvents>
            <VideoClicks>
              <ClickThrough id="Eyevinn Test AdServer">https://github.com/Eyevinn/test-adserver</ClickThrough>
            </VideoClicks>
            <Duration>00:00:10</Duration>
            <MediaFiles>
              <MediaFile width="718" height="404" codec="H.264" delivery="progressive" type="application/x-mpegURL" bitrate="1300">https:/eyevinnlab-adnormalizer.minio-minio.auto.prod.osaas.io/adassets/AAA2FBBBB1232F2/2c804425-7bf5-4e6f-9822-891e8118209d/index.m3u8</MediaFile>
            </MediaFiles>
          </Linear>
        </Creative>
      </Creatives>
    </InLine>
  </Ad>
</VAST>

Here the second asset is actually 2 mins instead of 10 seconds long.

@Lunkers
Copy link
Collaborator

Lunkers commented Jan 29, 2025

Thanks for pointing this out! I think the issue lies here:

parsedVAST.VAST.Ad = parsedVAST.VAST.Ad.reduce...

My guess is that this doesn't work when the response from the ad server only returns a single ad, causing the function to error out due to the function reduce not being applicable.

@birme
Copy link
Contributor

birme commented Jan 31, 2025

Perhaps related to this issue #17

@Lunkers
Copy link
Collaborator

Lunkers commented Jan 31, 2025

Yes, I think it's the same root cause. The fact that Ad can be an array sometimes, but not every time is a bit of a headache. Will look into it when I get the time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants