mltframework/mlt

Issue when saving consumer stream in file on remote server

Augadh1 opened this issue · 2 comments

Hi,
I am trying to save the output of the consumer on a remote server location. Where I provided consumer target as the remote server.
After investigation, I found that the generated mp4 video file does not contain avc1-codec identifier details in it. It contains directly H264.
Because of this video is not playing in the Chrome browser.

Is there any way to have avc1 codec identifier details generated with the output video?
I am attaching a sample xml with this. Please provide your valuable suggestions.

<?xml version="1.0" encoding="UTF-8"?>
<mlt>
    <profile description="automatic" width="1920" height="1080" progressive="1"
        sample_aspect_num="1" sample_aspect_den="1" display_aspect_num="16" display_aspect_den="9"
        frame_rate_num="3000" frame_rate_den="100" />
    <consumer
        target="https://localhost:8080/api/v1/public/media/a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11/stream.mp4/file"
        mlt_service="avformat" acodec="none" />
    <producer id="blank_producer">
        <property name="mlt_service">color</property>
        <property name="eof">continue</property>
        <property name="resource">#000000</property>
        <property name="mlt_image_format">rgba</property>
        <property name="length">2147483647</property>
    </producer>
    <producer id="transparent_producer">
        <property name="mlt_service">color</property>
        <property name="eof">continue</property>
        <property name="resource">#00000000</property>
        <property name="mlt_image_format">rgba</property>
        <property name="length">2147483647</property>
    </producer>
    <producer id="f5937a41-eb1a-46a1-9a26-75672878aa2c" hasAudio="false">
        <property name="length">00:00:13.933</property>
        <property name="resource">https://localhost:8080/public/media/a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11/uploaded_video/3423fec6-4f7c-45de-84a1-12ac58ef986d.mp4</property>
        <property name="mlt_service">timewarp</property>
        <property name="warp_speed">1</property>
    </producer>
    <playlist id="f0169f94-a2b3-4c3e-ab94-59d11701e2ed" trackIndex="1" hide="audio">
        <entry in="00:00:03.699" out="00:00:09.399" producer="f5937a41-eb1a-46a1-9a26-75672878aa2c">
        </entry>
    </playlist>
    <tractor id="d415585c-2915-4ddb-a9ee-5bbb80636c95" trackIndex="0">
        <multitrack>
            <track producer="blank_producer" in="0" out="00:00:05.700" />
            <track id="0f50158f-b8f6-4450-9891-55cdd9efc4c0"
                producer="f0169f94-a2b3-4c3e-ab94-59d11701e2ed" trackIndex="1" hide="audio" />
        </multitrack>
        <transition id="17190cdc-7eac-49db-8917-c3752b92c012" in="00:00:00.000" out="00:00:05.700">
            <property name="mlt_service">qtblend</property>
            <property name="a_track">0</property>
            <property name="b_track">1</property>
        </transition>
    </tractor>
</mlt>

This is not a bug; it is a support request. We only take bugs here, but I will tell you this much: your consumer element is way too ambiguous. How is FFmpeg supposed to understand the format and codec to use? A ".mp4" in the middle of a string is not sufficient. Learn how to specify details. It sounds like it is writing a H.264 bitstream instead of a MP4 stream.

If you do any encoding with Shotcut and look at the generated XML of the job you can see a lot more info. You can use that to prototype your encoding as well as your compositions. Also, I should have mention that I have never used ffmpeg or melt to POST a video to a web service like this to know about pitfalls with that. When you are troubleshooting stuff like this you should try using a local file to remove the special things about your system and try to understand the problem better, more closely.

I'm looking to directly export or stream rendered videos to any Cloud storage service to save time on uploading them separately.