Recherche avancée

Médias (1)

Mot : - Tags -/censure

Autres articles (48)

  • Les autorisations surchargées par les plugins

    27 avril 2010, par

    Mediaspip core
    autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs

  • HTML5 audio and video support

    13 avril 2011, par

    MediaSPIP uses HTML5 video and audio tags to play multimedia files, taking advantage of the latest W3C innovations supported by modern browsers.
    The MediaSPIP player used has been created specifically for MediaSPIP and can be easily adapted to fit in with a specific theme.
    For older browsers the Flowplayer flash fallback is used.
    MediaSPIP allows for media playback on major mobile platforms with the above (...)

  • Support audio et vidéo HTML5

    10 avril 2011

    MediaSPIP utilise les balises HTML5 video et audio pour la lecture de documents multimedia en profitant des dernières innovations du W3C supportées par les navigateurs modernes.
    Pour les navigateurs plus anciens, le lecteur flash Flowplayer est utilisé.
    Le lecteur HTML5 utilisé a été spécifiquement créé pour MediaSPIP : il est complètement modifiable graphiquement pour correspondre à un thème choisi.
    Ces technologies permettent de distribuer vidéo et son à la fois sur des ordinateurs conventionnels (...)

Sur d’autres sites (9672)

  • How to use the -stats_period parameter together with FFMPEG -progress ?

    30 janvier 2021, par Thiago Franklin

    I am using -pregress to get the current frame that is being processed, leaving it in a .txt file, but I would like to use -stats_period to control the time that the file is updated. However, when adding -stats_period to the script, it presents an error message :

    


    


    Unrecognized option 'stats_period'. Error splitting the argument list :
Option not found

    


    


    And I couldn't find any examples of use, neither in the forums, nor in the ffmpeg documentation.

    


  • Problem to write video using FFMPEG from a vector of cv::Mat

    30 décembre 2022, par Alex

    I'm trying create two functions, one to read a video and store the frmes in a vector of cv::Mat, and other to get a vector of cv::Mat and write this vector in a video. The code compile and run without exception, but the video writed doesn't run, there are data inside, but VLC is not able to run the video. What am I doing wrong in function to write video ?

    


    #include <iostream>&#xA;#include <string>&#xA;#include <vector>&#xA;&#xA;#include <opencv2></opencv2>core/mat.hpp>&#xA;#include <opencv2></opencv2>imgcodecs.hpp>&#xA;&#xA;&#xA;extern "C" {&#xA;#include <libavformat></libavformat>avformat.h>&#xA;#include <libavutil></libavutil>imgutils.h>&#xA;#include <libswscale></libswscale>swscale.h>&#xA;#include <libavcodec></libavcodec>avcodec.h>&#xA;    #include <libavutil></libavutil>pixdesc.h>&#xA;#include <libavutil></libavutil>opt.h>&#xA;}&#xA;&#xA;// helper function to check for FFmpeg errors&#xA;inline void checkError(int error, const std::string &amp;message) {&#xA;    if (error &lt; 0) {&#xA;        std::cerr &lt;&lt; message &lt;&lt; ": " &lt;&lt; av_err2str(error) &lt;&lt; std::endl;&#xA;        exit(EXIT_FAILURE);&#xA;    }&#xA;}&#xA;  &#xA;&#xA;int writeVideo(const std::string&amp; video_path, std::vector&amp; frames, int width, int height, int fps) {&#xA;    // initialize FFmpeg&#xA;    av_log_set_level(AV_LOG_ERROR);&#xA;    avformat_network_init();&#xA;&#xA;    // create the output video context&#xA;    AVFormatContext *formatContext = nullptr;&#xA;    int error = avformat_alloc_output_context2(&amp;formatContext, nullptr, nullptr, video_path.c_str());&#xA;    checkError(error, "Error creating output context");&#xA;&#xA;    // create the video stream&#xA;    AVStream *videoStream = avformat_new_stream(formatContext, nullptr);&#xA;    if (!videoStream) {&#xA;        std::cerr &lt;&lt; "Error creating video stream" &lt;&lt; std::endl;&#xA;        exit(EXIT_FAILURE);&#xA;    }&#xA;&#xA;    // create the video codec context&#xA;    const AVCodec *videoCodec = avcodec_find_encoder(AV_CODEC_ID_MPEG4);&#xA;    AVCodecContext *videoCodecContext = avcodec_alloc_context3(videoCodec);&#xA;    if (!videoCodecContext) {&#xA;        std::cerr &lt;&lt; "Error allocating video codec context" &lt;&lt; std::endl;&#xA;        exit(EXIT_FAILURE);&#xA;    }&#xA;    videoCodecContext->bit_rate = 200000;&#xA;    videoCodecContext->width = width;&#xA;    videoCodecContext->height = height;&#xA;    videoCodecContext->time_base = (AVRational){ 1, fps };&#xA;    videoCodecContext->framerate = (AVRational){ fps, 1 };&#xA;    videoCodecContext->gop_size = 12;&#xA;    videoCodecContext->max_b_frames = 0;&#xA;    videoCodecContext->pix_fmt = AV_PIX_FMT_YUV420P;&#xA;    if (formatContext->oformat->flags &amp; AVFMT_GLOBALHEADER) {&#xA;        videoCodecContext->flags |= AV_CODEC_FLAG_GLOBAL_HEADER;&#xA;    }&#xA;    error = avcodec_open2(videoCodecContext, videoCodec, nullptr);&#xA;    checkError(error, "Error opening");&#xA;        error = avcodec_parameters_from_context(videoStream->codecpar, videoCodecContext);&#xA;    checkError(error, "Error setting video codec parameters");&#xA;&#xA;    // open the output file&#xA;    error = avio_open(&amp;formatContext->pb, video_path.c_str(), AVIO_FLAG_WRITE);&#xA;    checkError(error, "Error opening output file");&#xA;&#xA;    // write the video file header&#xA;    error = avformat_write_header(formatContext, nullptr);&#xA;    checkError(error, "Error writing video file header");&#xA;&#xA;&#xA;    AVPacket *packet = av_packet_alloc();&#xA;    if (!packet) {&#xA;        std::cerr &lt;&lt; "Error allocating packet" &lt;&lt; std::endl;&#xA;        exit(EXIT_FAILURE);&#xA;    }&#xA;    for (const cv::Mat &amp;frame : frames) {&#xA;        // convert the cv::Mat to an AVFrame&#xA;        AVFrame *avFrame = av_frame_alloc();&#xA;        avFrame->format = videoCodecContext->pix_fmt;&#xA;        avFrame->width = width;&#xA;        avFrame->height = height;&#xA;        error = av_frame_get_buffer(avFrame, 0);&#xA;        checkError(error, "Error allocating frame buffer");&#xA;        struct SwsContext *frameConverter = sws_getContext(width, height, AV_PIX_FMT_BGR24, width, height, videoCodecContext->pix_fmt, SWS_BICUBIC, nullptr, nullptr, nullptr);&#xA;        uint8_t *srcData[AV_NUM_DATA_POINTERS] = { frame.data };&#xA;        int srcLinesize[AV_NUM_DATA_POINTERS] = { static_cast<int>(frame.step) };&#xA;        sws_scale(frameConverter, srcData, srcLinesize, 0, height, avFrame->data, avFrame->linesize);&#xA;        sws_freeContext(frameConverter);&#xA;&#xA;        // encode the AVFrame&#xA;        avFrame->pts = packet->pts;&#xA;        error = avcodec_send_frame(videoCodecContext, avFrame);&#xA;        checkError(error, "Error sending frame to video codec");&#xA;        while (error >= 0) {&#xA;            error = avcodec_receive_packet(videoCodecContext, packet);&#xA;            if (error == AVERROR(EAGAIN) || error == AVERROR_EOF) {&#xA;                break;&#xA;            }&#xA;            checkError(error, "Error encoding video frame");&#xA;&#xA;            // write the encoded packet to the output file&#xA;            packet->stream_index = videoStream->index;&#xA;            error = av_interleaved_write_frame(formatContext, packet);&#xA;            checkError(error, "Error writing video packet");&#xA;            av_packet_unref(packet);&#xA;        }&#xA;        av_frame_free(&amp;avFrame);&#xA;    }&#xA;&#xA;    // clean up&#xA;    av_packet_free(&amp;packet);&#xA;    avcodec_free_context(&amp;videoCodecContext);&#xA;    avformat_free_context(formatContext);&#xA;    avformat_network_deinit();&#xA;&#xA;    return EXIT_SUCCESS;&#xA;}&#xA;&#xA;std::vector readVideo(const std::string video_path) {&#xA;    // initialize FFmpeg&#xA;    av_log_set_level(AV_LOG_ERROR);&#xA;    avformat_network_init();&#xA;&#xA;    AVFormatContext* formatContext = nullptr;&#xA;    int error = avformat_open_input(&amp;formatContext, video_path.c_str(), nullptr, nullptr);&#xA;    checkError(error, "Error opening input file");&#xA;&#xA;    //Read packets of a media file to get stream information.&#xA;    &#xA;    error = avformat_find_stream_info(formatContext, nullptr);&#xA;    checkError(error, "Error avformat find stream info");&#xA;    &#xA;    // find the video stream&#xA;    AVStream* videoStream = nullptr;&#xA;    for (unsigned int i = 0; i &lt; formatContext->nb_streams; i&#x2B;&#x2B;) {&#xA;        if (formatContext->streams[i]->codecpar->codec_type == AVMEDIA_TYPE_VIDEO &amp;&amp; !videoStream) {&#xA;            videoStream = formatContext->streams[i];&#xA;        }&#xA;    }&#xA;    if (!videoStream) {&#xA;        std::cerr &lt;&lt; "Error: input file does not contain a video stream" &lt;&lt; std::endl;&#xA;        exit(EXIT_FAILURE);&#xA;    }&#xA;&#xA;    // create the video codec context&#xA;    const AVCodec* videoCodec = avcodec_find_decoder(videoStream->codecpar->codec_id);&#xA;    AVCodecContext* videoCodecContext = avcodec_alloc_context3(videoCodec);&#xA;    if (!videoCodecContext) {&#xA;        std::cerr &lt;&lt; "Error allocating video codec context" &lt;&lt; std::endl;&#xA;        exit(EXIT_FAILURE);&#xA;    }&#xA;    &#xA;    std::cout &lt;&lt; "::informations::\n";&#xA;    std::cout &lt;&lt; "  bit_rate:" &lt;&lt; videoCodecContext->bit_rate &lt;&lt; "\n";&#xA;    std::cout &lt;&lt; "  width:" &lt;&lt; videoCodecContext->width &lt;&lt; "\n";&#xA;    std::cout &lt;&lt; "  height:" &lt;&lt; videoCodecContext->height &lt;&lt; "\n";&#xA;    std::cout &lt;&lt; "  gop_size:" &lt;&lt; videoCodecContext->gop_size &lt;&lt; "\n";&#xA;    std::cout &lt;&lt; "  max_b_frames:" &lt;&lt; videoCodecContext->max_b_frames &lt;&lt; "\n";&#xA;    std::cout &lt;&lt; "  pix_fmt:" &lt;&lt; videoCodecContext->pix_fmt &lt;&lt; "\n";&#xA;    &#xA;    error = avcodec_parameters_to_context(videoCodecContext, videoStream->codecpar);&#xA;    checkError(error, "Error setting video codec context parameters");&#xA;    error = avcodec_open2(videoCodecContext, videoCodec, nullptr);&#xA;    checkError(error, "Error opening video codec");&#xA;&#xA;    // create the frame scaler&#xA;    int width = videoCodecContext->width;&#xA;    int height = videoCodecContext->height;&#xA;    struct SwsContext* frameScaler = sws_getContext(width, height, videoCodecContext->pix_fmt, width, height, AV_PIX_FMT_BGR24, SWS_BICUBIC, nullptr, nullptr, nullptr);&#xA;&#xA;    // read the packets and decode the video frames&#xA;    std::vector videoFrames;&#xA;    AVPacket packet;&#xA;    while (av_read_frame(formatContext, &amp;packet) == 0) {&#xA;        if (packet.stream_index == videoStream->index) {&#xA;            // decode the video frame&#xA;            AVFrame* frame = av_frame_alloc();&#xA;            int gotFrame = 0;&#xA;            error = avcodec_send_packet(videoCodecContext, &amp;packet);&#xA;            checkError(error, "Error sending packet to video codec");&#xA;            error = avcodec_receive_frame(videoCodecContext, frame);&#xA;&#xA;            //There is not enough data for decoding the frame, have to free and get more data&#xA;            &#xA;            if (error == AVERROR(EAGAIN))&#xA;            {&#xA;                av_frame_unref(frame);&#xA;                av_freep(frame);&#xA;                continue;&#xA;            }&#xA;&#xA;            if (error == AVERROR_EOF)&#xA;            {&#xA;                std::cerr &lt;&lt; "AVERROR_EOF" &lt;&lt; std::endl;&#xA;                break;&#xA;            }&#xA;&#xA;            checkError(error, "Error receiving frame from video codec");&#xA;&#xA;&#xA;            if (error == 0) {&#xA;                gotFrame = 1;&#xA;            }&#xA;            if (gotFrame) {&#xA;                // scale the frame to the desired format&#xA;                AVFrame* scaledFrame = av_frame_alloc();&#xA;                av_image_alloc(scaledFrame->data, scaledFrame->linesize, width, height, AV_PIX_FMT_BGR24, 32);&#xA;                sws_scale(frameScaler, frame->data, frame->linesize, 0, height, scaledFrame->data, scaledFrame->linesize);&#xA;&#xA;                // copy the frame data to a cv::Mat object&#xA;                cv::Mat mat(height, width, CV_8UC3, scaledFrame->data[0], scaledFrame->linesize[0]);&#xA;&#xA;                videoFrames.push_back(mat.clone());&#xA;&#xA;                // clean up&#xA;                av_freep(&amp;scaledFrame->data[0]);&#xA;                av_frame_free(&amp;scaledFrame);&#xA;            }&#xA;            av_frame_free(&amp;frame);&#xA;        }&#xA;        av_packet_unref(&amp;packet);&#xA;    }&#xA;&#xA;&#xA;    // clean up&#xA;    sws_freeContext(frameScaler);&#xA;    avcodec_free_context(&amp;videoCodecContext);&#xA;    avformat_close_input(&amp;formatContext);&#xA;    return videoFrames;&#xA;}&#xA;&#xA;int main() {&#xA;    auto videoFrames = readVideo("input.mp4");&#xA;    cv::imwrite("test.png", videoFrames[10]);&#xA;    writeVideo("outnow.mp4", videoFrames, 512, 608, 30);&#xA;    //writeVideo("outnow.mp4", videoFrames);&#xA;    return 0;&#xA;}&#xA;</int></vector></string></iostream>

    &#xA;

  • Streaming Anki Vector's camera

    25 novembre 2023, par Brendan Goode

    I am trying to stream my robot to Remo.tv with my Vector robot. The website recognizes I am going live but does not stream what the robots camera is seeing. I have confirmed the camera works by a local application that runs the SDK. The very end of the code is what is giving issues, it appears somebody ripped code from Cozmo and attempted to paste it into a Vector file. The problem is it seems like the camera is taking pictures and we reach the point where it attempts to send photo but fails ?

    &#xA;

    # This is a dummy file to allow the automatic loading of modules without error on none.&#xA;import anki_vector&#xA;import atexit&#xA;import time&#xA;import _thread as thread&#xA;import logging&#xA;import networking&#xA;&#xA;log = logging.getLogger(&#x27;RemoTV.vector&#x27;)&#xA;vector = None&#xA;reserve_control = None&#xA;robotKey = None&#xA;volume = 100 #this is stupid, but who cares&#xA;annotated = False&#xA;&#xA;def connect():&#xA;    global vector&#xA;    global reserve_control&#xA;&#xA;    log.debug("Connecting to Vector")&#xA;    vector = anki_vector.AsyncRobot()&#xA;    vector.connect()&#xA;    #reserve_control = anki_vector.behavior.ReserveBehaviorControl()&#xA;    &#xA;    atexit.register(exit)&#xA;&#xA;    return(vector)&#xA;&#xA;def exit():&#xA;    log.debug("Vector exiting")&#xA;    vector.disconnect()&#xA;    &#xA;def setup(robot_config):&#xA;    global forward_speed&#xA;    global turn_speed&#xA;    global volume&#xA;    global vector&#xA;    global charge_high&#xA;    global charge_low&#xA;    global stay_on_dock&#xA;&#xA;    global robotKey&#xA;    global server&#xA;    global no_mic&#xA;    global no_camera&#xA;    global ffmpeg_location&#xA;    global v4l2_ctl_location&#xA;    global x_res&#xA;    global y_res&#xA;    &#xA;    robotKey = robot_config.get(&#x27;robot&#x27;, &#x27;robot_key&#x27;)&#xA;&#xA;    if robot_config.has_option(&#x27;misc&#x27;, &#x27;video_server&#x27;):&#xA;        server = robot_config.get(&#x27;misc&#x27;, &#x27;video_server&#x27;)&#xA;    else:&#xA;        server = robot_config.get(&#x27;misc&#x27;, &#x27;server&#x27;)&#xA; &#xA;    no_mic = robot_config.getboolean(&#x27;camera&#x27;, &#x27;no_mic&#x27;)&#xA;    no_camera = robot_config.getboolean(&#x27;camera&#x27;, &#x27;no_camera&#x27;)&#xA;&#xA;    ffmpeg_location = robot_config.get(&#x27;ffmpeg&#x27;, &#x27;ffmpeg_location&#x27;)&#xA;    v4l2_ctl_location = robot_config.get(&#x27;ffmpeg&#x27;, &#x27;v4l2-ctl_location&#x27;)&#xA;&#xA;    x_res = robot_config.getint(&#x27;camera&#x27;, &#x27;x_res&#x27;)&#xA;    y_res = robot_config.getint(&#x27;camera&#x27;, &#x27;y_res&#x27;)&#xA;&#xA;&#xA;    if vector == None:&#xA;        vector = connect()&#xA;&#xA;    #x  mod_utils.repeat_task(30, check_battery, coz)&#xA;&#xA;    if robot_config.has_section(&#x27;cozmo&#x27;):&#xA;        forward_speed = robot_config.getint(&#x27;cozmo&#x27;, &#x27;forward_speed&#x27;)&#xA;        turn_speed = robot_config.getint(&#x27;cozmo&#x27;, &#x27;turn_speed&#x27;)&#xA;        volume = robot_config.getint(&#x27;cozmo&#x27;, &#x27;volume&#x27;)&#xA;        charge_high = robot_config.getfloat(&#x27;cozmo&#x27;, &#x27;charge_high&#x27;)&#xA;        charge_low = robot_config.getfloat(&#x27;cozmo&#x27;, &#x27;charge_low&#x27;)&#xA;        stay_on_dock = robot_config.getboolean(&#x27;cozmo&#x27;, &#x27;stay_on_dock&#x27;)&#xA;&#xA;#    if robot_config.getboolean(&#x27;tts&#x27;, &#x27;ext_chat&#x27;): #ext_chat enabled, add motor commands&#xA;#        extended_command.add_command(&#x27;.anim&#x27;, play_anim)&#xA;#        extended_command.add_command(&#x27;.forward_speed&#x27;, set_forward_speed)&#xA;#        extended_command.add_command(&#x27;.turn_speed&#x27;, set_turn_speed)&#xA;#        extended_command.add_command(&#x27;.vol&#x27;, set_volume)&#xA;#        extended_command.add_command(&#x27;.charge&#x27;, set_charging)&#xA;#        extended_command.add_command(&#x27;.stay&#x27;, set_stay_on_dock)&#xA;&#xA;    vector.audio.set_master_volume(volume) # set volume&#xA;&#xA;    return&#xA;    &#xA;def move(args):&#xA;    global charging&#xA;    global low_battery&#xA;    command = args[&#x27;button&#x27;][&#x27;command&#x27;]&#xA;&#xA;    try:&#xA;        if vector.status.is_on_charger and not charging:&#xA;            if low_battery:&#xA;                print("Started Charging")&#xA;                charging = 1&#xA;            else:&#xA;                if not stay_on_dock:&#xA;                    vector.drive_off_charger_contacts().wait_for_completed()&#xA;&#xA;        if command == &#x27;f&#x27;:&#xA;            vector.behavior.say_text("Moving {}".format(command))&#xA;&#xA;            #causes delays #coz.drive_straight(distance_mm(10), speed_mmps(50), False, True).wait_for_completed()&#xA;            vector.motors.set_wheel_motors(forward_speed, forward_speed, forward_speed*4, forward_speed*4 )&#xA;            time.sleep(0.7)&#xA;            vector.motors.set_wheel_motors(0, 0)&#xA;        elif command == &#x27;b&#x27;:&#xA;            #causes delays #coz.drive_straight(distance_mm(-10), speed_mmps(50), False, True).wait_for_completed()&#xA;            vector.motors.set_wheel_motors(-forward_speed, -forward_speed, -forward_speed*4, -forward_speed*4 )&#xA;            time.sleep(0.7)&#xA;            vector.motors.set_wheel_motors(0, 0)&#xA;        elif command == &#x27;l&#x27;:&#xA;            #causes delays #coz.turn_in_place(degrees(15), False).wait_for_completed()&#xA;            vector.motors.set_wheel_motors(-turn_speed, turn_speed, -turn_speed*4, turn_speed*4 )&#xA;            time.sleep(0.5)&#xA;            vector.motors.set_wheel_motors(0, 0)&#xA;        elif command == &#x27;r&#x27;:&#xA;            #causes delays #coz.turn_in_place(degrees(-15), False).wait_for_completed()&#xA;            vector.motors.set_wheel_motors(turn_speed, -turn_speed, turn_speed*4, -turn_speed*4 )&#xA;            time.sleep(0.5)&#xA;            vector.motors.set_wheel_motors(0, 0)&#xA;&#xA;        #move lift&#xA;        elif command == &#x27;w&#x27;:&#xA;            vector.behavior.say_text("w")&#xA;            vector.set_lift_height(height=1).wait_for_completed()&#xA;        elif command == &#x27;s&#x27;:&#xA;            vector.behavior.say_text("s")&#xA;            vector.set_lift_height(height=0).wait_for_completed()&#xA;&#xA;        #look up down&#xA;        #-25 (down) to 44.5 degrees (up)&#xA;        elif command == &#x27;q&#x27;:&#xA;            #head_angle_action = coz.set_head_angle(degrees(0))&#xA;            #clamped_head_angle = head_angle_action.angle.degrees&#xA;            #head_angle_action.wait_for_completed()&#xA;            vector.behaviour.set_head_angle(45)&#xA;            time.sleep(0.35)&#xA;            vector.behaviour.set_head_angle(0)&#xA;        elif command == &#x27;a&#x27;:&#xA;            #head_angle_action = coz.set_head_angle(degrees(44.5))&#xA;            #clamped_head_angle = head_angle_action.angle.degrees&#xA;            #head_angle_action.wait_for_completed()&#xA;            vector.behaviour.set_head_angle(-22.0)&#xA;            time.sleep(0.35)&#xA;            vector.behaviour.set_head_angle(0)&#xA;   &#xA;        #things to say with TTS disabled&#xA;        elif command == &#x27;sayhi&#x27;:&#xA;            tts.say( "hi! I&#x27;m cozmo!" )&#xA;        elif command == &#x27;saywatch&#x27;:&#xA;            tts.say( "watch this" )&#xA;        elif command == &#x27;saylove&#x27;:&#xA;            tts.say( "i love you" )&#xA;        elif command == &#x27;saybye&#x27;:&#xA;            tts.say( "bye" )&#xA;        elif command == &#x27;sayhappy&#x27;:&#xA;            tts.say( "I&#x27;m happy" )&#xA;        elif command == &#x27;saysad&#x27;:&#xA;            tts.say( "I&#x27;m sad" )&#xA;        elif command == &#x27;sayhowru&#x27;:&#xA;            tts.say( "how are you?" )&#xA;    except:&#xA;        return(False)&#xA;    return&#xA;&#xA;def start():&#xA;    log.debug("Starting Vector Video Process")&#xA;    try:&#xA;        thread.start_new_thread(video, ())&#xA;    except KeyboardInterrupt as e:&#xA;        pass        &#xA;    return&#xA;    &#xA;def video():&#xA;    global vector&#xA;    # Turn on image receiving by the camera&#xA;    vector.camera.init_camera_feed()&#xA;&#xA;    vector.behavior.say_text("hey everyone, lets robot!")&#xA;&#xA;    while True:&#xA;        time.sleep(0.25)&#xA;&#xA;        from subprocess import Popen, PIPE&#xA;        from sys import platform&#xA;&#xA;        log.debug("ffmpeg location : {}".format(ffmpeg_location))&#xA;&#xA;#        import os&#xA;#        if not os.path.isfile(ffmpeg_location):&#xA;#        print("Error: cannot find " &#x2B; str(ffmpeg_location) &#x2B; " check ffmpeg is installed. Terminating controller")&#xA;#        thread.interrupt_main()&#xA;#        thread.exit()&#xA;&#xA;        while not networking.authenticated:&#xA;            time.sleep(1)&#xA;&#xA;        p = Popen([ffmpeg_location, &#x27;-y&#x27;, &#x27;-f&#x27;, &#x27;image2pipe&#x27;, &#x27;-vcodec&#x27;, &#x27;png&#x27;, &#x27;-r&#x27;, &#x27;25&#x27;, &#x27;-i&#x27;, &#x27;-&#x27;, &#x27;-vcodec&#x27;, &#x27;mpeg1video&#x27;, &#x27;-r&#x27;, &#x27;25&#x27;, "-f", "mpegts", "-headers", "\"Authorization: Bearer {}\"".format(robotKey), "http://{}:1567/transmit?name={}-video".format(server, networking.channel_id)], stdin=PIPE)&#xA;        #p = Popen([ffmpeg_location, &#x27;-nostats&#x27;, &#x27;-y&#x27;, &#x27;-f&#x27;, &#x27;image2pipe&#x27;, &#x27;-vcodec&#x27;, &#x27;png&#x27;, &#x27;-r&#x27;, &#x27;25&#x27;, &#x27;-i&#x27;, &#x27;-&#x27;, &#x27;-vcodec&#x27;, &#x27;mpeg1video&#x27;, &#x27;-r&#x27;, &#x27;25&#x27;,&#x27;-b:v&#x27;, &#x27;400k&#x27;, "-f","mpegts", "-headers", "\"Authorization: Bearer {}\"".format(robotKey), "http://{}/transmit?name=rbot-390ddbe0-f1cc-4710-b3f1-9f477f4875f9-video".format(server)], stdin=PIPE)&#xA;        #p = Popen([ffmpeg_location, &#x27;-y&#x27;, &#x27;-f&#x27;, &#x27;image2pipe&#x27;, &#x27;-vcodec&#x27;, &#x27;png&#x27;, &#x27;-r&#x27;, &#x27;25&#x27;, &#x27;-i&#x27;, &#x27;-&#x27;, &#x27;-vcodec&#x27;, &#x27;mpeg1video&#x27;, &#x27;-r&#x27;, &#x27;25&#x27;, "-f", "mpegts", "-headers", "\"Authorization: Bearer {}\"".format(robotKey), "http://{}/transmit?name=rbot-390ddbe0-f1cc-4710-b3f1-9f477f4875f9-video".format(server, networking.channel_id)], stdin=PIPE)&#xA;        print(vector)&#xA;        image = vector.camera.latest_image&#xA;        image.raw_image.save("test.png", &#x27;PNG&#x27;)&#xA;        try:&#xA;            while True:&#xA;                if vector:&#xA;                    image = vector.camera.latest_image&#xA;                    if image:&#xA;                        if annotated:&#xA;                            image = image.annotate_image()&#xA;                        else:&#xA;                            image = image.raw_image&#xA;                        print("attempting to write image")&#xA;                        image.save(p.stdin, &#x27;PNG&#x27;)&#xA;&#xA;                else:&#xA;                    time.sleep(.1)&#xA;            log.debug("Lost Vector object, terminating video stream")&#xA;            p.stdin.close()&#xA;            p.wait()&#xA;        except Exception as e:&#xA;            log.debug("Vector Video Exception! {}".format(e))&#xA;            p.stdin.close()&#xA;            p.wait()&#xA;            pass               &#xA;    &#xA;

    &#xA;

    Here is the error we get

    &#xA;

    [vost#0:0/mpeg1video @ 000001c7153c1cc0] Error submitting a packet to the muxer: Error number -10053 occurred&#xA;[out#0/mpegts @ 000001c713448480] Error muxing a packet&#xA;[out#0/mpegts @ 000001c713448480] Error writing trailer: Error number -10053 occurred&#xA;[http @ 000001c7134cab00] URL read error: Error number -10053 occurred&#xA;[out#0/mpegts @ 000001c713448480] Error closing file: Error number -10053 occurred&#xA;[out#0/mpegts @ 000001c713448480] video:56kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown&#xA;frame=   25 fps=0.0 q=2.0 Lsize=      53kB time=00:00:01.32 bitrate= 325.9kbits/s speed=7.05x&#xA;Conversion failed!&#xA;&#xA;attempting to write image&#xA;

    &#xA;

    You can see our attempts to fix by commented out code in the #p section at the bottom.

    &#xA;