Newest 'ffmpeg' Questions - Stack Overflow

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

Les articles publiés sur le site

  • Decode WMA with FFMpeg to PCM

    20 décembre 2018, par erazorx

    I want to decode a WMA stream to 16 Bit PCM. Now i have a Question concerning FFMpeg- what is the output format of ..

    len = avcodec_decode_audio2(c, (int16_t *)outbuf, &outbuf_used, inbuf_ptr, size);
    

    is this the right function for this task?

    Thank you

  • Detecting user hardware through a website (server)

    20 décembre 2018, par John Kim

    I am trying to build a live-streaming web application. I am using a Java FFmpeg wrapper and using it to stream my webcam feed live to AWS MediaLive, which channels to MediaPackage to transcode and send the feed back to the website. However, while this would work locally, I will eventually have to host this application on something like AWS EC2, and detect a user's webcam and audio through the server (with FFmpeg being installed on the EC2 instance).

    How can I do this? Services like Discord ask permission for the audio device on the browser and access it. How do websites like Discord achieve this?

  • Is it possible to rotate the frame while decoding a video with ffmpeg c++ api based on the metadata info ?

    20 décembre 2018, par Will Li

    Currently, I got the rotation info by:

    av_dict_get(videoStream->metadata, "rotate", NULL, AV_DICT_MATCH_CASE);

    Now, how can I apply this rotation value while I decoding the video?

    I decode the frame with:avcodec_send_packet() and avcodec_receive_frame(), then covert the pixel format and scale the frame with sws_scale().

  • Downloading a Few Seconds of Audio from a Youtube Video with ffmpeg and youtube-dl Results in [youtube] : No such file or directory error

    20 décembre 2018, par DrJessop

    Below is the program that I wrote:

    ffmpeg -ss 60 -t 10 -i $(youtube-dl -f 140 https://www.youtube.com/watch?v=kDCk3hLIVXo) output.mp3
    

    This is supposed to get 10 seconds of audio starting at the one minute mark of the video and write it to output.mp3. If I run the youtube-dl command separately, and then the ffmpeg command with the entire video audio as input, it works. But, I do not want to download the entire video as well as create a new file with only a few seconds of audio.

    In its current state, I am getting [youtube]: No such file or directory errors. Does anyone know how I can fix this and keep it in one line?

  • ffmpeg : Is there a way to decode a video frame, given the previous frame, motion vectors, and a residual image ?

    20 décembre 2018, par aarzchan

    Assume we are given the following numpy arrays: the BGR video frame for timestep t-1, the motion vectors for timestep t, and the residual image for timestep t. Also, assume the video frame, motion vectors, and residual iamge, come from a video which was compressed using mpeg-4.

    Using these inputs, how would we use ffmpeg to decode the BGR video frame for timestep t?

    I tried manually reconstructing the t frame by: (1) creating a reference frame, which is just a copy of the t-1 frame; (2) performing motion compensation by copying 16x16 pixel blocks from the t-1 frame to the reference frame, based on the motion vectors; (3) adding the residual image to the motion-compensated reference frame.

    However, the resulting predicted t frame doesn't exactly match the actual t frame, so I feel that this might not be the right way to do it.