AW: Video saved using mp4mux is not playable in android default media player

chakra wire.chakri at gmail.com
Wed May 8 06:30:10 UTC 2019


Yes even I am facing same issue. But for my use case the .mp4 file does not
play out on Chrome browser via HTML5 <video> tag. 

If I ffprobe the mp4 file the output shows as below,

 *ffprobe -i 10__467118902.mp4 -v quiet -print_format json -show_format
-show_streams -hide_banner*

/{
    "streams": [
        {
            "index": 0,
            "codec_name": "h264",
            "codec_long_name": "H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10",
            "profile": "Baseline",
            "codec_type": "video",
            "codec_time_base": "1001/30000",
            "codec_tag_string": "avc1",
            "codec_tag": "0x31637661",
            "width": 3840,
            "height": 2160,
            "coded_width": 3840,
            "coded_height": 2160,
            "has_b_frames": 0,
            "sample_aspect_ratio": "1:1",
            "display_aspect_ratio": "16:9",
            "pix_fmt": "yuvj420p",
            "level": 51,
            "color_range": "pc",
            "color_space": "bt709",
            "color_transfer": "bt709",
            "color_primaries": "bt709",
            "chroma_location": "left",
            "refs": 1,
            "is_avc": "1",
            "nal_length_size": "4",
            "r_frame_rate": "30000/2002",
            "avg_frame_rate": "80802120/5392049",
            "time_base": "1/1498",
            *"start_pts": -226,
            "start_time": "-0.150868",*
            "duration_ts": 5392049,
            "duration": "3599.498665",
            "bit_rate": "3067876",
            "bits_per_raw_sample": "8",
            "nb_frames": "53940",
            "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": {
                "creation_time": "2019-05-06 15:02:06",
                "language": "und",
                "handler_name": "VideoHandler"
            }
        }
    ],
    "format": {
        "filename":
"13162491-8246-4f51-a37a-32fd56a87b91__9a0ad778-f8d5-4ae8-b74d-735609784cb7__HD_CAM-10__467118902.mp4",
        "nb_streams": 1,
        "nb_programs": 0,
        "format_name": "mov,mp4,m4a,3gp,3g2,mj2",
        "format_long_name": "QuickTime / MOV",
        "start_time": "-0.150868",
        "duration": "3599.498665",
        "size": "1416353518",
        "bit_rate": "3147890",
        "probe_score": 100,
        "tags": {
            "major_brand": "mp42",
            "minor_version": "0",
            "compatible_brands": "mp42mp41isomiso2",
            "creation_time": "2019-05-06 15:02:06"
        }
    }
}/

And I tried to fix the file by moving the start time with command as below,

*ffmpeg -i 10__467118902.mp4 -vcodec copy -ss -0.08 10__467118902_fixed.mp4*

And now the generated/fixed mp4 has ffprobe summary as,

/{
    "streams": [
        {
            "index": 0,
            "codec_name": "h264",
            "codec_long_name": "H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10",
            "profile": "Baseline",
            "codec_type": "video",
            "codec_time_base": "1001/30000",
            "codec_tag_string": "avc1",
            "codec_tag": "0x31637661",
            "width": 3840,
            "height": 2160,
            "coded_width": 3840,
            "coded_height": 2160,
            "has_b_frames": 1,
            "sample_aspect_ratio": "1:1",
            "display_aspect_ratio": "16:9",
            "pix_fmt": "yuvj420p",
            "level": 51,
            "color_range": "pc",
            "color_space": "bt709",
            "color_transfer": "bt709",
            "color_primaries": "bt709",
            "chroma_location": "left",
            "refs": 1,
            "is_avc": "1",
            "nal_length_size": "4",
            "r_frame_rate": "15000/1001",
            "avg_frame_rate": "10100265/674006",
            "time_base": "1/11984",
           * "start_pts": 959,
            "start_time": "0.080023",*
            "duration_ts": 43136384,
            "duration": "3599.497997",
            "bit_rate": "3067876",
            "bits_per_raw_sample": "8",
            "nb_frames": "53940",
            "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": "und",
                "handler_name": "VideoHandler"
            }
        }
    ],
    "format": {
        "filename":
"13162491-8246-4f51-a37a-32fd56a87b91__9a0ad778-f8d5-4ae8-b74d-735609784cb7__HD_CAM-10__467118902_fixed.mp4",
        "nb_streams": 1,
        "nb_programs": 0,
        "format_name": "mov,mp4,m4a,3gp,3g2,mj2",
        "format_long_name": "QuickTime / MOV",
        "start_time": "0.080023",
        "duration": "3599.498000",
        "size": "1381447545",
        "bit_rate": "3070311",
        "probe_score": 100,
        "tags": {
            "major_brand": "isom",
            "minor_version": "512",
            "compatible_brands": "isomiso2avc1mp41",
            "encoder": "Lavf56.40.101"
        }
    }
}
/
And its perfectly playable now on Chrome browser. 

But I am looking for a stable fix by source at GStreamer muxer itself rather
than employing another library/ffmpeg as post processing step to handle this 

I have seen an issue on Chrome in regard to this,
https://bugs.chromium.org/p/chromium/issues/detail?id=715398

But its commented that issue is with mp4mux and has to be fixed on source
while recording by muxer itself.

Chrome logs error as below,

*[6448:20468:0408/123832.116:VERBOSE1:network_delegate.cc(32)]
NetworkDelegate::NotifyBeforeURLRequest:
http://127.0.0.1:8445/10__467118902.mp4
[10356:8540:0408/123832.215:ERROR:render_media_log.cc(30)] MediaEvent:
MEDIA_ERROR_LOG_ENTRY {"error":"FFmpegDemuxer: unfixable negative
timestamp."}
[10356:8540:0408/123832.215:ERROR:render_media_log.cc(30)] MediaEvent:
MEDIA_ERROR_LOG_ENTRY {"error":"FFmpegDemuxer: demuxer error: 13"}
[10356:5076:0408/123832.215:ERROR:render_media_log.cc(30)] MediaEvent:
PIPELINE_ERROR DEMUXER_ERROR_COULD_NOT_PARSE*

Any help/suggestions in highly appreciated

Thanks



--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/


More information about the gstreamer-devel mailing list