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

Invalid duration of youtube video reported by --dump-json #22314

Closed
wszak opened this issue Sep 5, 2019 · 2 comments
Closed

Invalid duration of youtube video reported by --dump-json #22314

wszak opened this issue Sep 5, 2019 · 2 comments

Comments

@wszak
Copy link

@wszak wszak commented Sep 5, 2019

Checklist

  • I'm reporting a broken site support issue
  • I've verified that I'm running youtube-dl version 2019.09.01
  • I've checked that all provided URLs are alive and playable in a browser
  • I've checked that all URLs and arguments with special characters are properly quoted or escaped
  • I've searched the bugtracker for similar bug reports including closed ones
  • I've read bugs section in FAQ

Verbose log

[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: [u'-j', u'-v', u'tUmWbZ2HCp4']
[debug] Encodings: locale UTF-8, fs UTF-8, out None, pref UTF-8
[debug] youtube-dl version 2019.09.01
[debug] Python version 2.7.15rc1 (CPython) - Linux-4.19.66-1-MANJARO-x86_64-with-Ubuntu-18.04-bionic
[debug] exe versions: ffmpeg 3.4.6, ffprobe 3.4.6
[debug] Proxy map: {}
[debug] Default format spec: bestvideo+bestaudio/best

{
    "_filename": "live Ashra Mjalis (Z Qazi wasim abas Multan)  04 Muhrram Thallah Syedan G14 Islamabad 2019-tUmWbZ2HCp4.mp4",
    "abr": 128,
    "acodec": "mp4a.40.2",
    "age_limit": 0,
    "album": null,
    "alt_title": null,
    "annotations": null,
    "artist": null,
    "automatic_captions": {},
    "average_rating": 4.8415842,
    "categories": [
        "People & Blogs"
    ],
    "channel_id": "UCgBWyQBWQ0Lduws9sIvr6Ig",
    "channel_url": "http://www.youtube.com/channel/UCgBWyQBWQ0Lduws9sIvr6Ig",
    "chapters": null,
    "creator": null,
    "description": "official video of http://wwvw.talagangazadari.com like http://www.facebook.com/TalagangAzadari Whatsapp +923045121476 +923349457214",
    "dislike_count": 4,
    "display_id": "tUmWbZ2HCp4",
    "duration": 1,

Description

WRITE DESCRIPTION HERE
The --dump-json reports duration=1 while the video is over 1 hour long.
Use this command:
youtube-dl -j 'https://www.youtube.com/watch?v=tUmWbZ2HCp4' > tUmWbZ2HCp4.json
Look into the json file and you'll see that duration is reported as 1.

If this is for some reason a 'nofix', then at least tell me how to determine when the duration field is invalid. Maybe youtube-dl should sum the formats/duration fields to calculate the final duration?

@remitamine
Copy link
Collaborator

@remitamine remitamine commented Sep 23, 2019

both videos report the correct duration.

youtube-dl -j tUmWbZ2HCp4 | jq .duration
4131
youtube-dl -j 3IJYHdq36io | jq .duration
145
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
@wszak @remitamine and others
You can’t perform that action at this time.