mediacms-io / mediacms

MediaCMS is a modern, fully featured open source video and media CMS, written in Python/Django and React, featuring a REST API.
https://mediacms.io
GNU Affero General Public License v3.0
2.67k stars 495 forks source link

[Bug] webm video fail in transcoding #48

Closed gharsallahmoez closed 1 year ago

gharsallahmoez commented 3 years ago

I'm trying to upload video with webm format, I get the following result. webm

is webm video format is supported by mediacms?

mgogoulos commented 3 years ago

Hello, I now tried with a webm file and it gets encoded - https://demo.mediacms.io/view?m=7e0VCAWL4 Can you upload the file to demo.mediacms.io or here?

mgogoulos commented 3 years ago

Btw error logs will be exposed to admin at some point, so that it won't be necessary to look on the logs to see why something didn't encode correctly!

gharsallahmoez commented 3 years ago

@mgogoulos I upload it with the same issue : https://demo.mediacms.io/view?m=klsDYVRqy

mgogoulos commented 3 years ago

the file has issues as far as I can tell and this is why encoding fails, does not seem related with the .webm format necessaryly... Thanks for uploading though, will do some more testing and perhaps there's a place where the mechanism can be improved to bypass any errors...

swiftugandan commented 3 years ago

This could be the issue with the file: https://stackoverflow.com/questions/34118013/how-to-determine-webm-duration-using-ffprobe

The format matroska,webm is not known by mediacms, and the file also lacks a duration

{
    "format": {
        "filename": "/files/liveMeetingrecord6.webm",
        "nb_streams": 2,
        "nb_programs": 0,
        "format_name": "matroska,webm",
        "format_long_name": "Matroska / WebM",
        "start_time": "0.000000",
        "size": "135770798",
        "probe_score": 100,
        "tags": {
            "encoder": "Chrome"
        }
    }
}
{
    "streams": [
        {
            "index": 0,
            "codec_name": "opus",
            "codec_long_name": "Opus",
            "codec_type": "audio",
            "codec_time_base": "1/48000",
            "codec_tag_string": "[0][0][0][0]",
            "codec_tag": "0x0000",
            "sample_fmt": "fltp",
            "sample_rate": "48000",
            "channels": 2,
            "channel_layout": "stereo",
            "bits_per_sample": 0,
            "r_frame_rate": "0/0",
            "avg_frame_rate": "0/0",
            "time_base": "1/1000",
            "start_pts": 0,
            "start_time": "0.000000",
            "disposition": {
                "default": 1,
                "dub": 0,
                "original": 0,
                "comment": 0,
                "lyrics": 0,
                "karaoke": 0,
                "forced": 0,
                "hearing_impaired": 0,
                "visual_impaired": 0,
                "clean_effects": 0,
                "attached_pic": 0
            },
            "tags": {
                "language": "eng"
            }
        },
        {
            "index": 1,
            "codec_name": "h264",
            "codec_long_name": "H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10",
            "profile": "Constrained Baseline",
            "codec_type": "video",
            "codec_time_base": "1/2000",
            "codec_tag_string": "[0][0][0][0]",
            "codec_tag": "0x0000",
            "width": 1280,
            "height": 720,
            "coded_width": 1280,
            "coded_height": 720,
            "has_b_frames": 0,
            "sample_aspect_ratio": "1:1",
            "display_aspect_ratio": "16:9",
            "pix_fmt": "yuv420p",
            "level": 32,
            "chroma_location": "left",
            "refs": 1,
            "is_avc": "false",
            "nal_length_size": "0",
            "r_frame_rate": "120/1",
            "avg_frame_rate": "0/0",
            "time_base": "1/1000",
            "start_pts": 0,
            "start_time": "0.000000",
            "bits_per_raw_sample": "8",
            "disposition": {
                "default": 1,
                "dub": 0,
                "original": 0,
                "comment": 0,
                "lyrics": 0,
                "karaoke": 0,
                "forced": 0,
                "hearing_impaired": 0,
                "visual_impaired": 0,
                "clean_effects": 0,
                "attached_pic": 0
            },
            "tags": {
                "language": "eng"
            }
        }
    ],
    "format": {
        "format_name": "matroska,webm"
    }
}