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

Update videoservice.py #213

Open
wants to merge 1 commit into
base: 6.0.0
Choose a base branch
from
Open

Update videoservice.py #213

wants to merge 1 commit into from

Conversation

mss555
Copy link

@mss555 mss555 commented Jan 27, 2019

Avoid getting an AttributeError since not all streams have a codec_type. Example:
{
"index": 6,
"codec_tag_string": "[12][0][0][0]",
"codec_tag": "0x000c",
"id": "0x9d6",
"r_frame_rate": "0/0",
"avg_frame_rate": "0/0",
"time_base": "1/90000",
"start_pts": 3140393713,
"start_time": "34893.263478",
"duration_ts": 1703467413,
"duration": "18927.415700",
"disposition": {
"default": 0,
"dub": 0,
"original": 0,
"comment": 0,
"lyrics": 0,
"karaoke": 0,
"forced": 0,
"hearing_impaired": 0,
"visual_impaired": 0,
"clean_effects": 0,
"attached_pic": 0,
"timed_thumbnails": 0
}
},

Avoid getting an AttributeError since not all streams have a codec_type. Example:
        {
            "index": 6,
            "codec_tag_string": "[12][0][0][0]",
            "codec_tag": "0x000c",
            "id": "0x9d6",
            "r_frame_rate": "0/0",
            "avg_frame_rate": "0/0",
            "time_base": "1/90000",
            "start_pts": 3140393713,
            "start_time": "34893.263478",
            "duration_ts": 1703467413,
            "duration": "18927.415700",
            "disposition": {
                "default": 0,
                "dub": 0,
                "original": 0,
                "comment": 0,
                "lyrics": 0,
                "karaoke": 0,
                "forced": 0,
                "hearing_impaired": 0,
                "visual_impaired": 0,
                "clean_effects": 0,
                "attached_pic": 0,
                "timed_thumbnails": 0
            }
        },
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

Successfully merging this pull request may close these issues.

None yet

1 participant