Newest 'ffmpeg' Questions - Stack Overflow

http://stackoverflow.com/questions/tagged/ffmpeg

Les articles publiés sur le site

  • Application performance issue with Android 5.x devices

    6 septembre 2015, par user1235389

    I am working on application which uses FFPMEG library for decoding live stream from camera:

    • It has been working perfectly fine on 4.x version.

    • But now on devices with OS 5.0.x , I am getting video loss when viewing the live stream from camera.

    • It is happening when i connect to 4 or 9 channel view mode. in that mode, after few seconds all channels loose connection and video loss happens.

    from the investigation of logs, i see that after few seconds the ffmpeg library is removed or destroyed by Android OS 5.x.

    This results in library getting destroyed and all channels loosing connection.

    1- i dont know why OS removes library after sometime. Is it due to some memory issue?

    2 - Can anyone suggest me why this happens in Android 5.x devices?

    3 - Can anyone suggest me any memory test tools to check where the memory issue is happening.

    Any support would help me understand what changes in 5.0 version for Android.

  • How to reduce the resolution of a video using ffmpeg ?

    6 septembre 2015, par testa abalez

    I want to reduce the resolution of a video from 1024*768 to 800*600. I found on the web ffmpeg, and the library swscale (I use in C.

    And I found some informations on the web, but nothing about how to reduce the resolution of a video nor about which functions to use

    How can I do ?

  • Is it possible to decode H.264 frames in python or node.js ? [on hold]

    5 septembre 2015, par Domagoj Šitum

    I'm working on some project which uses AR.Drone 2.0. Parrot. What I need to do is get Parrot's h.264 stream, display it in web browser and at the same time process it in OpenCV (in python). I've managed to display that stream in Web browser, but I'm struggling to feed it to OpenCV (in python). Here is how it all goes. node.js connects to Parrot's video stream. After that, Parrot (the drone) starts sending h.264 I- and P-frames as TCP packets with some non-h264 header data. node.js removes that header data and determines if frame is of I or P type. After that, node.js script sends that frame to client (Web browser) for decoding and displaying, and also to python (via socket) which somehow has to pass that frame to openCV.

    Now, Web browser (Javascript) uses this great h.264 decoder, Broadway, to decode single I or P frame into YUV data. And it works flawlessly! But I can't get the same functionality in python (or at least at node.js side). So, is there any way that I could decode that I- and P-frames into YUV (or RBG) images in python or in node.js? Or could I feed openCV with I- and P-frames directly? Could FFmpeg help me?

    Please don't tell me to send decoded frames from Javascript (client) back to python, because I've tried it - and it makes video decoding significantly slower and laggy (because Javascript is single-threaded language and I've obviously given it too much work to do). I've even tried to use Broadway's h.264 decoder inside node.js, but I've had no success. Any solution is welcome!

  • H.264 decoder for python or node.js

    5 septembre 2015, par Domagoj Šitum

    Is there any h.264 decoder for python (preferably) or node.js? I'm working on some project which uses AR.Drone 2.0. Parrot. What I need to do is get Parrot's h.264 stream, display it in web browser and at the same time process it in OpenCV (in python). I've managed to display that stream in Web browser, but I'm struggling to feed it to OpenCV (in python). Here is how it all goes. node.js connects to Parrot's video stream. After that, Parrot (the drone) starts sending h.264 I- and P-frames as TCP packets with some non-h264 header data. node.js removes that header data and determines if frame is of I or P type. After that, node.js script sends that frame to client (Web browser) for decoding and displaying, and also to python (via socket) which somehow has to pass that frame to openCV. Now, Web browser (Javascript) uses this great h.264 decoder, Broadway: https://github.com/mbebenita/Broadway to decode single I or P frame into YUV data. And it works flawlessly! But I can't get the same functionality in python (or at least at node.js side). So, is there any way that I could decode that I- and P-frames into YUV (or RBG) images in python or in node.js? Or could I feed openCV with I- and P-frames directly? Could FFmpeg help me? Please don't tell me to send decoded frames from Javascript (client) back to python, because I've tried it - and it makes video decoding significantly slower and laggy (because Javascript is single-threaded language and I've obviously given it too much work to do). I've even tried to use Broadway's h.264 decoder inside node.js, but I've had no success. Any solution is welcome!

  • Extracting audio of the video frame (C++) [on hold]

    5 septembre 2015, par PaulZyCZ

    Probably stu*** question, but I am looking for a way to extract sound from video frame in C++. Several days ago I had written an interface (in C) to simple DLL library which processes video in OpenCV using Qt5 framework. There is a function which takes frame ID and returns the raw picture data of the frame (so it can be played in Unity using C#). There is however no function to extract corresponding audio. So I am looking for a way to write such a function.

    I am thinking of a way to extract audio from video file (say MP4 with MPEG-4), with length of the corresponding video frame. But so far I have found only tutorials about extracting whole track (via FFMPEG) either to save or play the sound.

    Is there a way to extract only a "frame" (1/fps seconds of audio)? Or would it be better to create indexes and extract whole track?

    Thank you for answers.

    PS: Usual questions deal with whole track, not one frame-length sample specified by video frame ID. I have little knowledge of the FFMPEG and it has been several months since I used it last in uni project.

    I have frame, it's ID, but no sound to it.

    EDIT2: removed OpenCV tag to lesser the ambivalency. Maybe I am asking stu*** question, so it was put on hold (otherwise I don't get it).