Recherche avancée

Médias (91)

Autres articles (46)

  • MediaSPIP v0.2

    21 juin 2013, par

    MediaSPIP 0.2 est la première version de MediaSPIP stable.
    Sa date de sortie officielle est le 21 juin 2013 et est annoncée ici.
    Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
    Comme pour la version précédente, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
    Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...)

  • Mise à disposition des fichiers

    14 avril 2011, par

    Par défaut, lors de son initialisation, MediaSPIP ne permet pas aux visiteurs de télécharger les fichiers qu’ils soient originaux ou le résultat de leur transformation ou encodage. Il permet uniquement de les visualiser.
    Cependant, il est possible et facile d’autoriser les visiteurs à avoir accès à ces documents et ce sous différentes formes.
    Tout cela se passe dans la page de configuration du squelette. Il vous faut aller dans l’espace d’administration du canal, et choisir dans la navigation (...)

  • MediaSPIP version 0.1 Beta

    16 avril 2011, par

    MediaSPIP 0.1 beta est la première version de MediaSPIP décrétée comme "utilisable".
    Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
    Pour avoir une installation fonctionnelle, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
    Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...)

Sur d’autres sites (5943)

  • My journey to Coviu

    27 octobre 2015, par silvia

    My new startup just released our MVP – this is the story of what got me here.

    I love creating new applications that let people do their work better or in a manner that wasn’t possible before.

    German building and loan socityMy first such passion was as a student intern when I built a system for a building and loan association’s monthly customer magazine. The group I worked with was managing their advertiser contacts through a set of paper cards and I wrote a dBase based system (yes, that long ago) that would manage their customer relationships. They loved it – until it got replaced by an SAP system that cost 100 times what I cost them, had really poor UX, and only gave them half the functionality. It was a corporate system with ongoing support, which made all the difference to them.

    Dr Scholz und Partner GmbHThe story repeated itself with a CRM for my Uncle’s construction company, and with a resume and quotation management system for Accenture right after Uni, both of which I left behind when I decided to go into research.

    Even as a PhD student, I never lost sight of challenges that people were facing and wanted to develop technology to overcome problems. The aim of my PhD thesis was to prepare for the oncoming onslaught of audio and video on the Internet (yes, this was 1994 !) by developing algorithms to automatically extract and locate information in such files, which would enable users to structure, index and search such content.

    Many of the use cases that we explored are now part of products or continue to be challenges : finding music that matches your preferences, identifying music or video pieces e.g. to count ads on the radio or to mark copyright infringement, or the automated creation of video summaries such as trailers.

    CSIRO

    This continued when I joined the CSIRO in Australia – I was working on segmenting speech into words or talk spurts since that would simplify captioning & subtitling, and on MPEG-7 which was a (slightly over-engineered) standard to structure metadata about audio and video.

    In 2001 I had the idea of replicating the Web for videos : i.e. creating hyperlinked and searchable video-only experiences. We called it “Annodex” for annotated and indexed video and it needed full-screen hyperlinked video in browsers – man were we ahead of our time ! It was my first step into standards, got several IETF RFCs to my name, and started my involvement with open codecs through Xiph.

    vquence logoAround the time that YouTube was founded in 2006, I founded Vquence – originally a video search company for the Web, but pivoted to a video metadata mining company. Vquence still exists and continues to sell its data to channel partners, but it lacks the user impact that has always driven my work.

    As the video element started being developed for HTML5, I had to get involved. I contributed many use cases to the W3C, became a co-editor of the HTML5 spec and focused on video captioning with WebVTT while contracting to Mozilla and later to Google. We made huge progress and today the technology exists to publish video on the Web with captions, making the Web more inclusive for everybody. I contributed code to YouTube and Google Chrome, but was keen to make a bigger impact again.

    NICTA logoThe opportunity came when a couple of former CSIRO colleagues who now worked for NICTA approached me to get me interested in addressing new use cases for video conferencing in the context of WebRTC. We worked on a kiosk-style solution to service delivery for large service organisations, particularly targeting government. The emerging WebRTC standard posed many technical challenges that we addressed by building rtc.io , by contributing to the standards, and registering bugs on the browsers.

    Fast-forward through the development of a few further custom solutions for customers in health and education and we are starting to see patterns of need emerge. The core learning that we’ve come away with is that to get things done, you have to go beyond “talking heads” in a video call. It’s not just about seeing the other person, but much more about having a shared view of the things that need to be worked on and a shared way of interacting with them. Also, we learnt that the things that are being worked on are quite varied and may include multiple input cameras, digital documents, Web pages, applications, device data, controls, forms.

    Coviu logoSo we set out to build a solution that would enable productive remote collaboration to take place. It would need to provide an excellent user experience, it would need to be simple to work with, provide for the standard use cases out of the box, yet be architected to be extensible for specialised data sharing needs that we knew some of our customers had. It would need to be usable directly on Coviu.com, but also able to integrate with specialised applications that some of our customers were already using, such as the applications that they spend most of their time in (CRMs, practice management systems, learning management systems, team chat systems). It would need to require our customers to sign up, yet their clients to join a call without sign-up.

    Collaboration is a big problem. People are continuing to get more comfortable with technology and are less and less inclined to travel distances just to get a service done. In a country as large as Australia, where 12% of the population lives in rural and remote areas, people may not even be able to travel distances, particularly to receive or provide recurring or specialised services, or to achieve work/life balance. To make the world a global village, we need to be able to work together better remotely.

    The need for collaboration is being recognised by specialised Web applications already, such as the LiveShare feature of Invision for Designers, Codassium for pair programming, or the recently announced Dropbox Paper. Few go all the way to video – WebRTC is still regarded as a complicated feature to support.

    Coviu in action

    With Coviu, we’d like to offer a collaboration feature to every Web app. We now have a Web app that provides a modern and beautifully designed collaboration interface. To enable other Web apps to integrate it, we are now developing an API. Integration may entail customisation of the data sharing part of Coviu – something Coviu has been designed for. How to replicate the data and keep it consistent when people collaborate remotely – that is where Coviu makes a difference.

    We have started our journey and have just launched free signup to the Coviu base product, which allows individuals to own their own “room” (i.e. a fixed URL) in which to collaborate with others. A huge shout out goes to everyone in the Coviu team – a pretty amazing group of people – who have turned the app from an idea to reality. You are all awesome !

    With Coviu you can share and annotate :

    • images (show your mum photos of your last holidays, or get feedback on an architecture diagram from a customer),
    • pdf files (give a presentation remotely, or walk a customer through a contract),
    • whiteboards (brainstorm with a colleague), and
    • share an application window (watch a YouTube video together, or work through your task list with your colleagues).

    All of these are regarded as “shared documents” in Coviu and thus have zooming and annotations features and are listed in a document tray for ease of navigation.

    This is just the beginning of how we want to make working together online more productive. Give it a go and let us know what you think.

    http://coviu.com/

  • FFmpeg decoded video is garbled mess with no audio. How can I fix it ? [closed]

    14 septembre 2023, par Señor Tonto

    I am trying to use FFmpeg 6.0 (which seems to have a terrible lack of documentation) to decode a .mp4/.mov file & play its audio. I am testing this on a .mov file (I tried also with a .mp4, same result) of an old animation I found. This turns out as a garbled mess that looks like an old film movie with no audio. Now, I used some old tutorials & managed to with much trial get the code I have now, which is of course half-working. I am using SDL to output the video. I'm not sure if it's a problem on the SDL end or the FFmpeg end at the moment (but I'm sure the video is a mix of the two & the audio because of SDL) I would appreciate some help as there's very little documentation I can find that isn't outdated & the deprecated list on FFmpeg hardly helps when I need to fix API-related changes. Here's my code

    


    LRESULT CALLBACK WindowProcessMessages(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) {&#xA;    OPENFILENAME ofn;&#xA;&#xA;    wchar_t g_filePath[MAX_PATH] = L"";&#xA;    char szFile[MAX_PATH] = "";&#xA;    wchar_t wFile[MAX_PATH] = L"";&#xA;    char data[MAX_PATH];&#xA;    DWORD bytesRead = 0;&#xA;    BOOL bSuccess = FALSE;&#xA;    static int iVscrollPos, cyClient, cyChar, cxChar, cxCaps, iMaxVerticalScroll = 0, iNumLines = 0;&#xA;    HDC hdc;&#xA;    TEXTMETRIC tm;&#xA;    static int tabIndex;&#xA;    std::wstring filePath;&#xA;&#xA;    //FFmpeg variables&#xA;    static AVFormatContext* format_ctx = nullptr; &#xA;    static AVCodecContext* video_codec_ctx = nullptr;&#xA;    static AVCodecContext* audio_codec_ctx = nullptr;&#xA;    static AVFrame* video_frame = nullptr;&#xA;    static AVFrame* audio_frame = nullptr;&#xA;    static AVPacket packet;&#xA;    static struct SwsContext* sws_ctx = nullptr;&#xA;    static int video_stream_idx = -1;&#xA;    static int audio_stream_idx = -1;&#xA;    static int video_width = 0;&#xA;    static int video_height = 0;&#xA;    static HWND hVideoWnd = nullptr;&#xA;    static HDC hVideoDC = nullptr;&#xA;    static HBITMAP hVideoBitmap = nullptr;&#xA;&#xA;    switch (msg) {&#xA;    case WM_CREATE:&#xA;        break;&#xA;    case WM_SIZE:&#xA;        break;&#xA;    case WM_NOTIFY:&#xA;        //code for handling tab switching &amp; creating all content inside the tabs, currently half-working, perhaps give each tab a show &amp; update win call?&#xA;        if (((LPNMHDR)lParam)->code == TCN_SELCHANGE) {&#xA;            tabIndex = TabCtrl_GetCurSel(g_hWndTabs);&#xA;            if (tabIndex == 0) {&#xA;                DestroyWindow(openFileBtn);&#xA;                DestroyWindow(saveFileBtn);&#xA;                DestroyWindow(emboldenBtn);&#xA;                DestroyWindow(italiciseBtn);&#xA;                DestroyWindow(hEditControl);&#xA;                DestroyWindow(hScrollContainer);&#xA;&#xA;                //this code reloads table data &amp; reconstructs the table whenever the &#x27;table view&#x27; tab is opened,&#xA;                std::wifstream infile("tabledata.txt");&#xA;                while (numRows > 0) {&#xA;                    numRows--;&#xA;                }&#xA;                while (true) {&#xA;                    // Read in data for a row&#xA;                    wchar_t buf1[MAX_PATH], buf2[MAX_PATH], buf3[MAX_PATH];&#xA;                    if (!(infile >> buf1 >> buf2 >> buf3)) {&#xA;                        // End of file reached, break out of loop&#xA;                        break;&#xA;                    }&#xA;&#xA;                    // Create new row window for this row of data&#xA;                    HWND hRow = CreateWindowEx(0, L"STATIC", nullptr,&#xA;                        WS_CHILD | WS_VISIBLE | WS_BORDER,&#xA;                        startX, startY &#x2B; numRows * ROW_HEIGHT,&#xA;                        3 * CELL_WIDTH, ROW_HEIGHT,&#xA;                        g_hWndMain, nullptr, g_hInstance, nullptr);&#xA;&#xA;                    // Create cell edit controls within the new row&#xA;                    HWND hCell1 = CreateWindowEx(0, L"EDIT", nullptr,&#xA;                        WS_CHILD | WS_VISIBLE | ES_AUTOHSCROLL | WS_BORDER,&#xA;                        0, 0, CELL_WIDTH, ROW_HEIGHT,&#xA;                        hRow, nullptr, g_hInstance, nullptr);&#xA;                    HWND hCell2 = CreateWindowEx(0, L"EDIT", nullptr,&#xA;                        WS_CHILD | WS_VISIBLE | ES_AUTOHSCROLL | WS_BORDER,&#xA;                        CELL_WIDTH, 0, CELL_WIDTH, ROW_HEIGHT,&#xA;                        hRow, nullptr, g_hInstance, nullptr);&#xA;                    HWND hCell3 = CreateWindowEx(0, L"EDIT", nullptr,&#xA;                        WS_CHILD | WS_VISIBLE | ES_AUTOHSCROLL | WS_BORDER,&#xA;                        2 * CELL_WIDTH, 0, CELL_WIDTH, ROW_HEIGHT,&#xA;                        hRow, nullptr, g_hInstance, nullptr);&#xA;&#xA;                    // Set the text of each cell edit control&#xA;                    SetWindowTextW(hCell1, buf1);&#xA;                    SetWindowTextW(hCell2, buf2);&#xA;                    SetWindowTextW(hCell3, buf3);&#xA;&#xA;                    // Update the row window&#xA;                    InvalidateRect(hRow, nullptr, TRUE);&#xA;                    UpdateWindow(hRow);&#xA;&#xA;                    numRows&#x2B;&#x2B;;&#xA;                }&#xA;&#xA;&#xA;&#xA;                tblHeaderOne = CreateWindow(L"STATIC", L"Header 1",&#xA;                    WS_CHILD | WS_VISIBLE | SS_CENTER | WS_BORDER,&#xA;                    0, 40, 110, 20,&#xA;                    g_hWndMain, (HMENU)CELL_1_ID, g_hInstance, NULL);&#xA;                InvalidateRect(tblHeaderOne, NULL, TRUE);&#xA;                UpdateWindow(tblHeaderOne);&#xA;&#xA;&#xA;                tblHeaderTwo = CreateWindow(L"STATIC", L"Header 2",&#xA;                    WS_CHILD | WS_VISIBLE | SS_CENTER | WS_BORDER,&#xA;                    110, 40, 110, 20,&#xA;                    g_hWndMain, (HMENU)CELL_2_ID, g_hInstance, NULL);&#xA;                InvalidateRect(tblHeaderTwo, NULL, TRUE);&#xA;                UpdateWindow(tblHeaderTwo);&#xA;&#xA;                tblHeaderThree = CreateWindow(L"STATIC", L"Header 3",&#xA;                    WS_CHILD | WS_VISIBLE | SS_CENTER | WS_BORDER,&#xA;                    220, 40, 110, 20,&#xA;                    g_hWndMain, (HMENU)CELL_3_ID, g_hInstance, NULL);&#xA;                InvalidateRect(tblHeaderThree, NULL, TRUE);&#xA;                UpdateWindow(tblHeaderThree);&#xA;&#xA;                // Create button to add new row&#xA;                addRowBtn = CreateWindow(L"BUTTON", L"Add Row",&#xA;                    WS_CHILD | WS_VISIBLE | BS_DEFPUSHBUTTON,&#xA;                    390, 40, 100, 30,&#xA;                    g_hWndMain, (HMENU)ADD_ROW_BTN, g_hInstance, NULL);&#xA;                InvalidateRect(addRowBtn, NULL, TRUE);&#xA;                UpdateWindow(addRowBtn);&#xA;&#xA;            }&#xA;            else if (tabIndex == 1) {&#xA;&#xA;                DestroyWindow(hRow);&#xA;                DestroyWindow(tableContainer);&#xA;                DestroyWindow(tblHeaderOne);&#xA;                DestroyWindow(tblHeaderTwo);&#xA;                DestroyWindow(tblHeaderThree);&#xA;                DestroyWindow(addRowBtn);&#xA;&#xA;&#xA;&#xA;                openFileBtn = CreateWindow(L"BUTTON", L"Open File",&#xA;                    WS_CHILD | WS_VISIBLE | BS_DEFPUSHBUTTON,&#xA;                    10, 40, 150, 25,&#xA;                    g_hWndMain, (HMENU)OPEN_FILE_BTN, NULL, NULL);&#xA;                InvalidateRect(openFileBtn, NULL, TRUE);&#xA;                UpdateWindow(openFileBtn);&#xA;&#xA;                saveFileBtn = CreateWindow(L"BUTTON", L"Save File",&#xA;                    WS_CHILD | WS_VISIBLE | BS_DEFPUSHBUTTON,&#xA;                    10, 80, 150, 25,&#xA;                    g_hWndMain, (HMENU)SAVE_FILE_BTN, nullptr, nullptr);&#xA;                InvalidateRect(saveFileBtn, NULL, TRUE);&#xA;                UpdateWindow(saveFileBtn);&#xA;&#xA;                hScrollContainer = CreateWindowEx(WS_EX_CLIENTEDGE, L"SCROLLBAR", NULL,&#xA;                    WS_CHILD | WS_VISIBLE | WS_VSCROLL | SBS_VERT,&#xA;                    170, 40, 600, 300,&#xA;                    g_hWndMain, (HMENU)SCROLL_CONTAINER, g_hInstance, NULL);&#xA;&#xA;&#xA;                hEditControl = CreateWindowEx(WS_EX_CLIENTEDGE, L"EDIT", NULL,&#xA;                    WS_CHILD | WS_VISIBLE | WS_VSCROLL | WS_HSCROLL | ES_MULTILINE | ES_AUTOVSCROLL | ES_AUTOHSCROLL,&#xA;                    0, 0, 600, 300,&#xA;                    hScrollContainer, (HMENU)EDIT_CONTROL, g_hInstance, NULL);&#xA;                InvalidateRect(hEditControl, NULL, TRUE);&#xA;                UpdateWindow(hEditControl);&#xA;&#xA;                SetFocus(hEditControl);&#xA;&#xA;                SetScrollRange(hScrollContainer, SB_VERT, 0, 5, TRUE);&#xA;                SetScrollPos(hScrollContainer, SB_VERT, 0, TRUE);&#xA;&#xA;                // Add embolden button&#xA;                emboldenBtn = CreateWindow(L"BUTTON", L"Embolden",&#xA;                    WS_CHILD | WS_VISIBLE | BS_PUSHBUTTON,&#xA;                    10, 120, 100, 25,&#xA;                    g_hWndMain, (HMENU)EMBOLDEN_BTN, nullptr, nullptr);&#xA;                InvalidateRect(emboldenBtn, NULL, TRUE);&#xA;                UpdateWindow(emboldenBtn);&#xA;&#xA;                // Add italicise button&#xA;                italiciseBtn = CreateWindow(L"BUTTON", L"Italicise",&#xA;                    WS_CHILD | WS_VISIBLE | BS_PUSHBUTTON,&#xA;                    10, 150, 100, 25,&#xA;                    g_hWndMain, (HMENU)ITALICISE_BTN, nullptr, nullptr);&#xA;                InvalidateRect(italiciseBtn, NULL, TRUE);&#xA;                UpdateWindow(italiciseBtn);&#xA;            }&#xA;            else if (tabIndex == 2) {&#xA;                DestroyWindow(hRow);&#xA;                DestroyWindow(tableContainer);&#xA;                DestroyWindow(tblHeaderOne);&#xA;                DestroyWindow(tblHeaderTwo);&#xA;                DestroyWindow(tblHeaderThree);&#xA;                DestroyWindow(addRowBtn);&#xA;                DestroyWindow(openFileBtn);&#xA;                DestroyWindow(saveFileBtn);&#xA;                DestroyWindow(emboldenBtn);&#xA;                DestroyWindow(italiciseBtn);&#xA;                DestroyWindow(hEditControl);&#xA;                DestroyWindow(hScrollContainer);&#xA;&#xA;                // Create container for player&#xA;                hWMPContainer = CreateWindowEx(WS_EX_CLIENTEDGE, L"STATIC", nullptr,&#xA;                    WS_CHILD | WS_VISIBLE | SS_CENTER | SS_GRAYFRAME,&#xA;                    50, 50, 700, 400,&#xA;                    g_hWndMain, nullptr, g_hInstance, nullptr);&#xA;&#xA;                // Create Open .mp4/.mov button&#xA;                OpenMp4Btn = CreateWindow(L"BUTTON", L"Open .mp4/.mov",&#xA;                    WS_CHILD | WS_VISIBLE | BS_DEFPUSHBUTTON,&#xA;                    50, 460, 150, 30,&#xA;                    g_hWndMain, (HMENU)FILEMENU_OPEN_FILE_BTN, nullptr, nullptr);&#xA;                InvalidateRect(OpenMp4Btn, nullptr, TRUE);&#xA;                UpdateWindow(OpenMp4Btn);&#xA;&#xA;&#xA;                // Create play/pause button&#xA;                hPlayBtn = CreateWindow(L"BUTTON", L"Play",&#xA;                    WS_CHILD | WS_VISIBLE | BS_PUSHBUTTON,&#xA;                    350, 460, 100, 30,&#xA;                    g_hWndMain, nullptr, g_hInstance, nullptr);&#xA;                InvalidateRect(hPlayBtn, nullptr, TRUE);&#xA;                UpdateWindow(hPlayBtn);&#xA;&#xA;            }&#xA;        }&#xA;        return DefWindowProc(hwnd, msg, wParam, lParam);&#xA;        break;&#xA;    case WM_MOUSEWHEEL:&#xA;        //also WIP, will be developed after WM_VSCROLL is established&#xA;        break;&#xA;    case WM_VSCROLL:&#xA;        //to be developed 9516555&#xA;    case WM_PAINT:&#xA;        break;&#xA;    case WM_COMMAND:&#xA;        //all commands passed to the window through buttons, menus, forms, etc.&#xA;        if (HIWORD(wParam) == BN_CLICKED) {&#xA;            if ((HWND)lParam == addRowBtn) {&#xA;                const wchar_t* ROW_CLASS_NAME = L"Row Window";&#xA;                WNDCLASS rowWc{};&#xA;                rowWc.hInstance = g_hInstance;&#xA;                rowWc.lpszClassName = ROW_CLASS_NAME;&#xA;                rowWc.hCursor = LoadCursor(nullptr, IDC_ARROW);&#xA;                rowWc.hbrBackground = (HBRUSH)COLOR_WINDOW;&#xA;                rowWc.lpfnWndProc = AddRowDlgProc;&#xA;                RegisterClass(&amp;rowWc);&#xA;&#xA;                hWnd = CreateWindow(ROW_CLASS_NAME, L"Row Window",&#xA;                    WS_OVERLAPPEDWINDOW,&#xA;                    CW_USEDEFAULT, CW_USEDEFAULT,&#xA;                    250, 200,&#xA;                    nullptr, nullptr, nullptr, nullptr);&#xA;&#xA;                // Create text box controls&#xA;                hWndCell1Label = CreateWindowW(&#xA;                    L"STATIC", L"Cell 1:",&#xA;                    WS_CHILD | WS_VISIBLE | SS_LEFT,&#xA;                    10, 10, 50, 20,&#xA;                    hWnd, NULL, g_hInstance, NULL);&#xA;&#xA;&#xA;                hWndCell1Edit = CreateWindowW(&#xA;                    L"EDIT", NULL,&#xA;                    WS_CHILD | WS_VISIBLE | WS_BORDER | ES_LEFT | ES_AUTOHSCROLL,&#xA;                    65, 10, 100, 20,&#xA;                    hWnd, NULL, g_hInstance, NULL);&#xA;&#xA;&#xA;                hWndCell2Label = CreateWindowW(&#xA;                    L"STATIC", L"Cell 2:",&#xA;                    WS_CHILD | WS_VISIBLE | SS_LEFT,&#xA;                    10, 40, 50, 20,&#xA;                    hWnd, NULL, g_hInstance, NULL);&#xA;&#xA;&#xA;                hWndCell2Edit = CreateWindowW(&#xA;                    L"EDIT", NULL,&#xA;                    WS_CHILD | WS_VISIBLE | WS_BORDER | ES_LEFT | ES_AUTOHSCROLL,&#xA;                    65, 40, 100, 20,&#xA;                    hWnd, NULL, g_hInstance, NULL);&#xA;&#xA;                hWndCell3Label = CreateWindowW(&#xA;                    L"STATIC", L"Cell 3:",&#xA;                    WS_CHILD | WS_VISIBLE | SS_LEFT,&#xA;                    10, 70, 50, 20,&#xA;                    hWnd, NULL, g_hInstance, NULL);&#xA;&#xA;&#xA;                hWndCell3Edit = CreateWindowW(&#xA;                    L"EDIT", NULL,&#xA;                    WS_CHILD | WS_VISIBLE | WS_BORDER | ES_LEFT | ES_AUTOHSCROLL,&#xA;                    65, 70, 100, 20,&#xA;                    hWnd, NULL, g_hInstance, NULL);&#xA;&#xA;&#xA;                // Create OK and Cancel button controls&#xA;                hWndOkButton = CreateWindowW(&#xA;                    L"BUTTON", L"OK",&#xA;                    WS_CHILD | WS_VISIBLE | BS_DEFPUSHBUTTON,&#xA;                    40, 110, 50, 25,&#xA;                    hWnd, (HMENU)IDOK, g_hInstance, NULL);&#xA;&#xA;&#xA;                hWndCancelButton = CreateWindowW(&#xA;                    L"BUTTON", L"Cancel",&#xA;                    WS_CHILD | WS_VISIBLE,&#xA;                    100, 110, 50, 25,&#xA;                    hWnd, (HMENU)IDCANCEL, g_hInstance, NULL);&#xA;&#xA;&#xA;                ShowWindow(hWnd, SW_SHOW);&#xA;                UpdateWindow(hWnd);&#xA;&#xA;                MSG msg{};&#xA;                while (GetMessage(&amp;msg, nullptr, 0, 0)) {&#xA;                    TranslateMessage(&amp;msg);&#xA;                    DispatchMessage(&amp;msg);&#xA;                }&#xA;&#xA;            }&#xA;            if ((HWND)lParam == openFileBtn) {&#xA;                // Open File button clicked, show open file dialoge and load the selected file into the edit control&#xA;                OPENFILENAME ofn = { };&#xA;                WCHAR szFile[MAX_PATH] = L"";&#xA;                ofn.lStructSize = sizeof(OPENFILENAME);&#xA;                ofn.hwndOwner = hWnd;&#xA;                ofn.lpstrFilter = L"Text files\0*.txt\0All files\0*.*\0";&#xA;                ofn.lpstrFile = szFile;&#xA;                ofn.nMaxFile = MAX_PATH;&#xA;                ofn.Flags = OFN_FILEMUSTEXIST | OFN_PATHMUSTEXIST;&#xA;                if (GetOpenFileName(&amp;ofn)) {&#xA;                    // Read file and set text of edit box&#xA;                    std::ifstream infile(ofn.lpstrFile, std::ios::in | std::ios::binary);&#xA;                    if (infile) {&#xA;                        std::wstring text((std::istreambuf_iterator<char>(infile)), std::istreambuf_iterator<char>());&#xA;                        SetWindowText(hEditControl, text.c_str());&#xA;                        filePath = ofn.lpstrFile;&#xA;                    }&#xA;                }&#xA;            }&#xA;            if ((HWND)lParam == saveFileBtn) {&#xA;                if (!filePath.empty()) {&#xA;                    std::wofstream outfile(filePath, std::ios::out | std::ios::binary); // use std::wofstream instead of std::ofstream&#xA;                    if (outfile) {&#xA;                        int textLength = GetWindowTextLength(hEditControl);&#xA;                        if (textLength != 0) {&#xA;                            wchar_t* textBuffer = new wchar_t[textLength &#x2B; 1];&#xA;                            GetWindowTextW(hEditControl, textBuffer, textLength &#x2B; 1);&#xA;                            outfile.write(textBuffer, textLength * sizeof(wchar_t));&#xA;                            delete[] textBuffer;&#xA;                        }&#xA;                    }&#xA;                    outfile.close();&#xA;                    MessageBox(NULL, L"File saved successfully!", L"File save", MB_OK);&#xA;                }&#xA;&#xA;            }&#xA;            //The following are not currently working due to an issue in connecting to the edit box for char type manipulation&#xA;            if ((HWND)lParam == emboldenBtn) {&#xA;&#xA;            }&#xA;            if ((HWND)lParam == italiciseBtn) {&#xA;&#xA;            }&#xA;            //cannot or failed to open video file &#xA;            if ((HWND)lParam == OpenMp4Btn) {&#xA;                OPENFILENAMEA ofn = {};&#xA;                ofn.lStructSize = sizeof(ofn);&#xA;                ofn.hwndOwner = hwnd;&#xA;                ofn.lpstrFilter = "Video Files (*.mp4;*.mov)\0*.mp4;*.mov\0All Files (*.*)\0*.*\0";&#xA;                char szFile[MAX_PATH] = {};&#xA;                ofn.lpstrFile = szFile;&#xA;                ofn.nMaxFile = MAX_PATH;&#xA;                ofn.lpstrTitle = "Open Video File";&#xA;                ofn.Flags = OFN_FILEMUSTEXIST | OFN_PATHMUSTEXIST;&#xA;                if (GetOpenFileNameA(&amp;ofn)) {&#xA;                    // Initialize SDL&#xA;                    SDL_Init(SDL_INIT_VIDEO);&#xA;&#xA;                    // Open the selected video file&#xA;                    AVFormatContext* format_ctx = nullptr;&#xA;                    if (avformat_open_input(&amp;format_ctx, szFile, nullptr, nullptr) != 0) {&#xA;                        // Error handling&#xA;                    }&#xA;&#xA;                    // Retrieve stream information&#xA;                    if (avformat_find_stream_info(format_ctx, nullptr) &lt; 0) {&#xA;                        // Error handling&#xA;                    }&#xA;&#xA;                    // Find the video and audio streams&#xA;                    int video_stream_idx = av_find_best_stream(format_ctx, AVMEDIA_TYPE_VIDEO, -1, -1, nullptr, 0);&#xA;                    int audio_stream_idx = av_find_best_stream(format_ctx, AVMEDIA_TYPE_AUDIO, -1, -1, nullptr, 0);&#xA;&#xA;                    // Open the video and audio codecs&#xA;                    AVCodecContext* video_codec_ctx = avcodec_alloc_context3(nullptr);&#xA;                    avcodec_parameters_to_context(video_codec_ctx, format_ctx->streams[video_stream_idx]->codecpar);&#xA;                    AVCodec* video_codec = const_cast(avcodec_find_decoder(video_codec_ctx->codec_id));&#xA;                    if (avcodec_open2(video_codec_ctx, video_codec, nullptr) &lt; 0) {&#xA;                        // Error handling&#xA;                    }&#xA;&#xA;                    AVCodecContext* audio_codec_ctx = avcodec_alloc_context3(nullptr);&#xA;                    avcodec_parameters_to_context(audio_codec_ctx, format_ctx->streams[audio_stream_idx]->codecpar);&#xA;                    AVCodec* audio_codec = const_cast(avcodec_find_decoder(audio_codec_ctx->codec_id));&#xA;                    if (avcodec_open2(audio_codec_ctx, audio_codec, nullptr) &lt; 0) {&#xA;                        // Error handling&#xA;                    }&#xA;                    // Allocate memory for the video and audio frames&#xA;                    AVFrame* video_frame = av_frame_alloc();&#xA;                    AVFrame* audio_frame = av_frame_alloc();&#xA;&#xA;                    // Create a window for displaying the video frames&#xA;                    SDL_Window* window = SDL_CreateWindow("Video Player", SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, video_codec_ctx->width, video_codec_ctx->height, SDL_WINDOW_SHOWN);&#xA;&#xA;                    // Create a renderer for displaying the video frames&#xA;                    SDL_Renderer* renderer = SDL_CreateRenderer(window, -1, 0);&#xA;&#xA;                    // Create a texture for displaying the video frames&#xA;                    SDL_Texture* texture = SDL_CreateTexture(renderer, SDL_PIXELFORMAT_BGR24, SDL_TEXTUREACCESS_STREAMING, video_codec_ctx->width, video_codec_ctx->height);&#xA;&#xA;                    // Create a scaling context for converting the video frames to RGB&#xA;                    SwsContext* sws_ctx = sws_getContext(video_codec_ctx->width, video_codec_ctx->height, video_codec_ctx->pix_fmt,&#xA;                        video_codec_ctx->width, video_codec_ctx->height, AV_PIX_FMT_BGR24,&#xA;                        SWS_BILINEAR, nullptr, nullptr, nullptr);&#xA;&#xA;                    // Decode and display the video frames&#xA;                    AVPacket packet;&#xA;                    while (av_read_frame(format_ctx, &amp;packet) >= 0) {&#xA;                        if (packet.stream_index == video_stream_idx) {&#xA;                            avcodec_send_packet(video_codec_ctx, &amp;packet);&#xA;                            while (avcodec_receive_frame(video_codec_ctx, video_frame) == 0) {&#xA;                                sws_scale(sws_ctx, video_frame->data, video_frame->linesize, 0, video_codec_ctx->height,&#xA;                                    video_frame->data, video_frame->linesize);&#xA;                                SDL_UpdateTexture(texture, NULL, video_frame->data[0], video_frame->linesize[0]);&#xA;                                SDL_RenderClear(renderer);&#xA;                                SDL_RenderCopy(renderer, texture, NULL, NULL);&#xA;                                SDL_RenderPresent(renderer);&#xA;                            }&#xA;                        }&#xA;                        av_packet_unref(&amp;packet);&#xA;                    }&#xA;&#xA;                    // Free the allocated memory and close the codecs&#xA;                    av_frame_free(&amp;video_frame);&#xA;                    av_frame_free(&amp;audio_frame);&#xA;                    avcodec_free_context(&amp;video_codec_ctx);&#xA;                    avcodec_free_context(&amp;audio_codec_ctx);&#xA;                    avformat_close_input(&amp;format_ctx);&#xA;&#xA;                    // Destroy the window, renderer, and texture&#xA;                    SDL_DestroyTexture(texture);&#xA;                    SDL_DestroyRenderer(renderer);&#xA;                    SDL_DestroyWindow(window);&#xA;&#xA;                    // Quit SDL&#xA;                    SDL_Quit();&#xA;                }&#xA;            }&#xA;        }&#xA;        break;&#xA;    case WM_DESTROY:&#xA;        //code that executes on window destruction&#xA;        PostQuitMessage(0);&#xA;        return 0;&#xA;    default:&#xA;        return DefWindowProc(hwnd, msg, wParam, lParam);&#xA;    }&#xA;}&#xA;</char></char>

    &#xA;

    I am doing this on MVSC2022 in a C++ win32 application if it's relevant, I will attach some images of the video : some of the videosome more of the videoA screenshot of the output screen

    &#xA;

  • Running Windows XP In 2016

    2 janvier 2016, par Multimedia Mike

    I have an interest in getting a 32-bit Windows XP machine up and running. I have a really good yet slightly dated and discarded computer that seemed like a good candidate for dedicating to this task. So the question is : Can Windows XP still be installed from scratch on a computer, activated, and used in 2016 ? I wasn’t quite sure since I have heard stories about how Microsoft has formally ended support for Windows XP as of the first half of 2014 and I wasn’t entirely sure what that meant.

    Spoiler : It’s still possible to install and activate Windows XP as of the writing of this post. It’s also possible to download and install all the updates published up until support ended.

    The Candidate Computer
    This computer was assembled either in late 2008 or early 2009. It was a beast at the time.


    New old Windows XP computer
    Click for a larger image

    It was built around the newly-released NVIDIA GTX 280 video card. The case is a Thermaltake DH-101, which is a home theater PC thing. The motherboard is an Asus P5N32-SLI Premium with a Core 2 Duo X6800 2.93 GHz CPU on board. 2 GB of RAM and a 1.5 TB hard drive are also present.

    The original owner handed it off to me because their family didn’t have much use for it anymore (too many other machines in the house). Plus it was really, obnoxiously loud. The noisy culprit was the stock blue fan that came packaged with the Intel processor (seen in the photo) whining at around 65 dB. I replaced the fan and brought the noise level way down.

    As for connectivity, the motherboard has dual gigabit NICs (of 2 different chipsets for some reason) and onboard wireless 802.11g. I couldn’t make the latter work and this project was taking place a significant distance from my wired network. Instead, I connected a USB 802.11ac dongle and antenna which is advertised to work in both Windows XP and Linux. It works great under Windows XP. Meanwhile, making the adapter work under Linux provided a retro-computing adventure in which I had to modify C code to make the driver work.

    So, score 1 for Windows XP over Linux here.

    The Simple Joy of Retro-computing
    One thing you have to watch out for when you get into retro-computing is fighting the urge to rant about the good old days of computing. Most long-time computer users have a good understanding of the frustration that computers keep getting faster by orders of magnitude and yet using them somehow feels slower and slower over successive software generations.

    This really hits home when you get old software running, especially on high-end hardware (relative to what was standard contemporary hardware). After I got this new Windows XP machine running, as usual, I was left wondering why software was so much faster a few generations ago.

    Of course, as mentioned, it helps when you get to run old software on hardware that would have been unthinkably high end at the software’s release. Apparently, the minimum WinXP specs as set by MS are a 233 MHz Pentium CPU and 64 MB of RAM, with 1.5 GB of hard drive space. This machine has more than 10x the clock speed (and 2 CPUs), 32x the RAM, and 1000x the HD space. Further, I’m pretty sure 100 Mbit ethernet was the standard consumer gear in 2001 while 802.11b wireless was gaining traction. The 802.11ac adapter makes networking quite pleasant.

    Purpose
    Retro-computing really seems to be ramping up in popularity lately. For some reason, I feel compelled to declare at this juncture that I was into it before it was cool.

    Why am I doing this ? I have a huge collection of old DOS/Windows computer games. I also have this nerdy obsession with documenting old video games in the MobyGames database. I used to do a lot of this a few years ago, tracking the effort on my gaming blog. In the intervening years, I have still collected a lot of old, unused, unloved video games, usually either free or very cheap while documenting my collection efforts on that same blog.

    So I want to work my way through some of this backlog, particularly the games that are not yet represented in the MobyGames database, and even more pressing, ones that the internet (viewed through Google at least) does not seem to know about. To that end, I thought this was a good excuse to get Windows XP on this old machine. A 32-bit Windows XP machine is capable of running any software advertised as supporting Windows XP, Windows ME, Windows 98, Windows 95, and even 16-bit Windows 3.x (I have games for all these systems). That covers a significant chunk of PC history. It can probably be made to run DOS games as well, but those are (usually) better run under DosBox. In order to get the right display feel, I even invested in a (used) monitor sporting a 4:3 aspect ratio. If I know these old games, most will be engineered and optimized for that ratio rather than the widescreen resolutions seen nowadays.

    I would also like to get back to that Xbox optical disc experimentation I was working on a few years ago. Another nice feature of this motherboard is that it still provides a 40-pin IDE/PATA adapter which makes the machine useful for continuing that old investigation (and explains why I have that long IDE cable to no where pictured hanging off the board).

    The Messy Details
    I did the entire installation process twice. The first time was a bumbling journey of discovery and copious note-taking. I still have Windows XP installation media that includes service pack 2 (SP2), along with 2 separate licenses that haven’t been activated for a long time. My plan was to install it fresh, then install the relevant drivers. Then I would investigate the Windows update and activation issues and everything should be fine.

    So what’s the deal with Windows Update for XP, and with activations ? Second item first : it IS possible to still activate Windows XP. The servers are still alive and respond quickly. However, as always, you don’t activate until you’re sure everything is working at some baseline. It took awhile to get there.

    As for whether Windows Update still works for XP, that’s a tougher question. Short answer is yes ; longer answer is that it can be difficult to kick off the update process. At least on SP2, the “Windows Update” program launches IE6 and navigates to a special microsoft.com URL which initiates the update process (starting with an ActiveX control). This URL no longer exists.

    From what I can piece together from my notes, this seems to be the route I eventually took :

    1. Install Windows XP fresh
    2. Install drivers for the hardware ; fortunately, Asus still has all the latest drivers necessary for the motherboard and its components but it’s necessary to download these from another network-connected PC since the networking probably won’t be running “out of the box”
    3. Download the .NET 3.5 runtime, which is the last one supported by Windows XP, and install it
    4. Download the latest NVIDIA drivers ; this needs to be done after the previous step because the installer requires the .NET runtime ; run the driver installer and don’t try to understand why it insists on re-downloading .NET 3.5 runtime before installation
    5. While you’re downloading stuff on other computers to be transported to this new machine, be sure to download either Chrome or Firefox per your preference ; if you try to download via IE6, you may find that their download pages aren’t compatible with IE6
    6. Somewhere along the line (I’m guessing as a side effect of the .NET 3.5 installation), the proper, non-IE6-based Windows Update program magically springs to life ; once this happens, there will be 144 updates (in my case anyway) ; installing these will probably require multiple reboots, but SP3 and all known pre-deprecation security fixes will be installed
    7. Expect that, even after installing all of these, a few more updates will appear ; eventually, you’ll be at the end of the update road
    8. Once you’re satisfied everything is working satisfactorily, take the plunge and activate your installation

    Residual Quirks
    Steam runs great on Windows XP, as do numerous games I have purchased through the service. So that opens up a whole bunch more games that I could play on this machine. Steam’s installer highlights a curious legacy problem of Windows XP– it seems there are many languages that it does not support “out of the box” :


    Steam missing languages under Windows XP

    It looks like the Chinese options and a few others that are standard now weren’t standard 15 years ago.

    Also, a little while after booting up, I’ll get a crashing error concerning a process called geoforms.scr. This appears to be NVIDIA-related. However, I don’t notice anything obviously operationally wrong with the system.

    Regarding DirectX support, DirectX 9 is the highest version officially supported by Windows XP. There are allegedly methods to get DirectX 10 running as well, but I don’t care that much. I did care, briefly, when I realized that a bunch of the demos for the NVIDIA GTX 280 required DX10 which left me wondering why it was possible to install them on Windows XP.

    Eventually, by installing enough of these old games, I fully expect to have numerous versions of .NET, DirectX, QT, and Video for Windows installed side by side.

    Out of curiosity, I tried playing a YouTube HD/1080p video. I wanted to see if the video was accelerated through my card. The video played at full speed but I noticed some tearing. Then I inspected the CPU usage and noticed that the CPU was quite loaded. So either the GTX 280 doesn’t have video acceleration, or Windows XP doesn’t provide the right APIs, or Chrome is not able to access the APIs in Windows XP, or perhaps some combination of the foregoing.

    Games are working well, though. I tried one of my favorite casual games and got sucked into that for, like, an entire night because that’s what casual games do. But then, I booted up a copy of WarCraft III that I procured sometime ago. I don’t have any experience with the WarCraft universe (RTS or MMO) but I developed a keen interest in StarCraft II over the past few years and wanted to try WarCraft III. Unfortunately, I couldn’t get WarCraft III to work correctly on several different Windows 7 installations (movies didn’t play, which left me slightly confused as to what I was supposed to do).

    Still works beautifully on the new old Windows XP machine.

    The post Running Windows XP In 2016 first appeared on Breaking Eggs And Making Omelettes.