<div dir="auto"><div><br><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Le mer. 8 mai 2019 06 h 55, chakra <<a href="mailto:wire.chakri@gmail.com">wire.chakri@gmail.com</a>> a écrit :<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Yes even I am facing same issue. But for my use case the .mp4 file does not<br>
play out on Chrome browser via HTML5 <video> tag. <br>
<br>
If I ffprobe the mp4 file the output shows as below,<br>
<br>
 *ffprobe -i 10__467118902.mp4 -v quiet -print_format json -show_format<br>
-show_streams -hide_banner*<br>
<br>
/{<br>
    "streams": [<br>
        {<br>
            "index": 0,<br>
            "codec_name": "h264",<br>
            "codec_long_name": "H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10",<br>
            "profile": "Baseline",<br>
            "codec_type": "video",<br>
            "codec_time_base": "1001/30000",<br>
            "codec_tag_string": "avc1",<br>
            "codec_tag": "0x31637661",<br>
            "width": 3840,<br>
            "height": 2160,<br>
            "coded_width": 3840,<br>
            "coded_height": 2160,<br>
            "has_b_frames": 0,<br>
            "sample_aspect_ratio": "1:1",<br>
            "display_aspect_ratio": "16:9",<br>
            "pix_fmt": "yuvj420p",<br>
            "level": 51,<br>
            "color_range": "pc",<br>
            "color_space": "bt709",<br>
            "color_transfer": "bt709",<br>
            "color_primaries": "bt709",<br>
            "chroma_location": "left",<br>
            "refs": 1,<br>
            "is_avc": "1",<br>
            "nal_length_size": "4",<br>
            "r_frame_rate": "30000/2002",<br>
            "avg_frame_rate": "80802120/5392049",<br>
            "time_base": "1/1498",<br>
            *"start_pts": -226,<br>
            "start_time": "-0.150868",*<br></blockquote></div></div><div dir="auto"><br></div><div dir="auto">Just a guess, but have you considered adding an rtpjitterbuffer in your receiver. One of its roles is to fix the timestamps. That being said, RTP CTS (PTS / DTS delta) are not accurate, so I'd recommend not using b-frames.</div><div dir="auto"><br></div><div dir="auto"><br></div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
            "duration_ts": 5392049,<br>
            "duration": "3599.498665",<br>
            "bit_rate": "3067876",<br>
            "bits_per_raw_sample": "8",<br>
            "nb_frames": "53940",<br>
            "disposition": {<br>
                "default": 1,<br>
                "dub": 0,<br>
                "original": 0,<br>
                "comment": 0,<br>
                "lyrics": 0,<br>
                "karaoke": 0,<br>
                "forced": 0,<br>
                "hearing_impaired": 0,<br>
                "visual_impaired": 0,<br>
                "clean_effects": 0,<br>
                "attached_pic": 0<br>
            },<br>
            "tags": {<br>
                "creation_time": "2019-05-06 15:02:06",<br>
                "language": "und",<br>
                "handler_name": "VideoHandler"<br>
            }<br>
        }<br>
    ],<br>
    "format": {<br>
        "filename":<br>
"13162491-8246-4f51-a37a-32fd56a87b91__9a0ad778-f8d5-4ae8-b74d-735609784cb7__HD_CAM-10__467118902.mp4",<br>
        "nb_streams": 1,<br>
        "nb_programs": 0,<br>
        "format_name": "mov,mp4,m4a,3gp,3g2,mj2",<br>
        "format_long_name": "QuickTime / MOV",<br>
        "start_time": "-0.150868",<br>
        "duration": "3599.498665",<br>
        "size": "1416353518",<br>
        "bit_rate": "3147890",<br>
        "probe_score": 100,<br>
        "tags": {<br>
            "major_brand": "mp42",<br>
            "minor_version": "0",<br>
            "compatible_brands": "mp42mp41isomiso2",<br>
            "creation_time": "2019-05-06 15:02:06"<br>
        }<br>
    }<br>
}/<br>
<br>
And I tried to fix the file by moving the start time with command as below,<br>
<br>
*ffmpeg -i 10__467118902.mp4 -vcodec copy -ss -0.08 10__467118902_fixed.mp4*<br>
<br>
And now the generated/fixed mp4 has ffprobe summary as,<br>
<br>
/{<br>
    "streams": [<br>
        {<br>
            "index": 0,<br>
            "codec_name": "h264",<br>
            "codec_long_name": "H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10",<br>
            "profile": "Baseline",<br>
            "codec_type": "video",<br>
            "codec_time_base": "1001/30000",<br>
            "codec_tag_string": "avc1",<br>
            "codec_tag": "0x31637661",<br>
            "width": 3840,<br>
            "height": 2160,<br>
            "coded_width": 3840,<br>
            "coded_height": 2160,<br>
            "has_b_frames": 1,<br>
            "sample_aspect_ratio": "1:1",<br>
            "display_aspect_ratio": "16:9",<br>
            "pix_fmt": "yuvj420p",<br>
            "level": 51,<br>
            "color_range": "pc",<br>
            "color_space": "bt709",<br>
            "color_transfer": "bt709",<br>
            "color_primaries": "bt709",<br>
            "chroma_location": "left",<br>
            "refs": 1,<br>
            "is_avc": "1",<br>
            "nal_length_size": "4",<br>
            "r_frame_rate": "15000/1001",<br>
            "avg_frame_rate": "10100265/674006",<br>
            "time_base": "1/11984",<br>
           * "start_pts": 959,<br>
            "start_time": "0.080023",*<br>
            "duration_ts": 43136384,<br>
            "duration": "3599.497997",<br>
            "bit_rate": "3067876",<br>
            "bits_per_raw_sample": "8",<br>
            "nb_frames": "53940",<br>
            "disposition": {<br>
                "default": 1,<br>
                "dub": 0,<br>
                "original": 0,<br>
                "comment": 0,<br>
                "lyrics": 0,<br>
                "karaoke": 0,<br>
                "forced": 0,<br>
                "hearing_impaired": 0,<br>
                "visual_impaired": 0,<br>
                "clean_effects": 0,<br>
                "attached_pic": 0<br>
            },<br>
            "tags": {<br>
                "language": "und",<br>
                "handler_name": "VideoHandler"<br>
            }<br>
        }<br>
    ],<br>
    "format": {<br>
        "filename":<br>
"13162491-8246-4f51-a37a-32fd56a87b91__9a0ad778-f8d5-4ae8-b74d-735609784cb7__HD_CAM-10__467118902_fixed.mp4",<br>
        "nb_streams": 1,<br>
        "nb_programs": 0,<br>
        "format_name": "mov,mp4,m4a,3gp,3g2,mj2",<br>
        "format_long_name": "QuickTime / MOV",<br>
        "start_time": "0.080023",<br>
        "duration": "3599.498000",<br>
        "size": "1381447545",<br>
        "bit_rate": "3070311",<br>
        "probe_score": 100,<br>
        "tags": {<br>
            "major_brand": "isom",<br>
            "minor_version": "512",<br>
            "compatible_brands": "isomiso2avc1mp41",<br>
            "encoder": "Lavf56.40.101"<br>
        }<br>
    }<br>
}<br>
/<br>
And its perfectly playable now on Chrome browser. <br>
<br>
But I am looking for a stable fix by source at GStreamer muxer itself rather<br>
than employing another library/ffmpeg as post processing step to handle this <br>
<br>
I have seen an issue on Chrome in regard to this,<br>
<a href="https://bugs.chromium.org/p/chromium/issues/detail?id=715398" rel="noreferrer noreferrer" target="_blank">https://bugs.chromium.org/p/chromium/issues/detail?id=715398</a><br>
<br>
But its commented that issue is with mp4mux and has to be fixed on source<br>
while recording by muxer itself.<br>
<br>
Chrome logs error as below,<br>
<br>
*[6448:20468:0408/123832.116:VERBOSE1:network_delegate.cc(32)]<br>
NetworkDelegate::NotifyBeforeURLRequest:<br>
<a href="http://127.0.0.1:8445/10__467118902.mp4" rel="noreferrer noreferrer" target="_blank">http://127.0.0.1:8445/10__467118902.mp4</a><br>
[10356:8540:0408/123832.215:ERROR:render_media_log.cc(30)] MediaEvent:<br>
MEDIA_ERROR_LOG_ENTRY {"error":"FFmpegDemuxer: unfixable negative<br>
timestamp."}<br>
[10356:8540:0408/123832.215:ERROR:render_media_log.cc(30)] MediaEvent:<br>
MEDIA_ERROR_LOG_ENTRY {"error":"FFmpegDemuxer: demuxer error: 13"}<br>
[10356:5076:0408/123832.215:ERROR:render_media_log.cc(30)] MediaEvent:<br>
PIPELINE_ERROR DEMUXER_ERROR_COULD_NOT_PARSE*<br>
<br>
Any help/suggestions in highly appreciated<br>
<br>
Thanks<br>
<br>
<br>
<br>
--<br>
Sent from: <a href="http://gstreamer-devel.966125.n4.nabble.com/" rel="noreferrer noreferrer" target="_blank">http://gstreamer-devel.966125.n4.nabble.com/</a><br>
_______________________________________________<br>
gstreamer-devel mailing list<br>
<a href="mailto:gstreamer-devel@lists.freedesktop.org" target="_blank" rel="noreferrer">gstreamer-devel@lists.freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" rel="noreferrer noreferrer" target="_blank">https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a></blockquote></div></div></div>