Newest 'ffmpeg' Questions - Stack Overflow

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

Les articles publiés sur le site

  • How can I encode audio from AudioRecord in real-time using FFmpeg in Android ?

    30 avril 2017, par Ali

    I have raw PCM bytes in byte[] buffer and I am trying to encode them in different formats using FFmpeg in real-time. Which command is used to do this? I can convert wav audio file to mp3 file using this command:

    ffmpeg -i input.wav -f mp3 output.mp3
    

    but how can I convert raw PCM bytes and save them in real-time in different formats such as mp3? I have not found the answer any where on the internet till now. Please help me.

  • How to use a framework build of Python with Anaconda

    30 avril 2017, par Addem

    I'm unable to get matplotlib animations to display on a Mac computer. I've chased down several attempts at installing ffmpeg but they've all failed and I'm starting to wonder if that isn't the wrong way to solve the problem.

    I found this page http://matplotlib.org/faq/osx_framework.html

    Since I'm running Python from the Spyder app in Anaconda, the section for this seems relevant. It says

    The default python provided in (Ana)Conda is not a framework build. However, the Conda developers have made it easy to install a framework build in both the main environment and in Conda envs. To use this install python.app conda install python.app and use pythonw rather than python

    I'm not perfectly clear on what this means, but I opened a terminal, ran conda install python.app and it seemed to work--at least there were no error messages. I could navigate to a folder that contained the file python.app.

    I'm not clear on what it means to "use pythonw" but I navigated to the animation I'm trying to compile and ran $ pythonw anim.py and it gave me an I/O error. I'm not sure if I'm supposed to use pythonw in some other way, or what. If I restart and try to run the code in Spyder I get the same error as before.

    I know that the code works, because I've run it on a Linux machine that has ffmpeg and it worked.

    Is there something else I need to do to get a framework build, whatever that means?

  • Split video in specific number of frame with ffmpeg in c#

    30 avril 2017, par Loic Bch

    I want to split a video into a specific number of image: I'm using ffmpeg/EmguCV in C#.

    I capture a video from a webcam and i need to split the video into 59 images. i'm using -i command with ffmpeg to split my video into a number of images.

    The problem is that the number of images i get at the end is different at each capture because the duration of the video is not exactly the same due to fps drop.

    So if anyone know if it's possible to specify that i want the video to be equally cut into 59 images. (Or any other idea to get what i want)

    (at the moment i'm taking the number of images i get from the cut and divide it by 59 then i'm taking one image in "the result" but i'ts not precise at all because if i get a decimal number im losing or adding images)

  • ffmpeg : Using tee with segmenter

    30 avril 2017, par Lev

    I'm trying to use a tee to output my stream into 1min segments and into a file at the same time. Here's my command:

    ffmpeg -i "rtsp://${cameraIp}:554/axis-media/media.amp?videocodec=h264&resolution=1280x720&fps=15" -c copy -map 0 \
    -f tee "[f=ssegment:segment_time=60:segment_format=mp4:reset_timestamps=1:r=15] ${rootPath}/${storeId}-${location}-%03d.mp4 \
    | /tmp/${cameraIp}.mkv"
    

    Individually (without tee) both outputs work fine. So I can either output into segmented files or into a non-segmented file. But with the tee I get this error:

    [stream_segment,ssegment @ 0x217ece0] Failed to open segment ' /etc/cida/diagnostics/vid/780801-99-000.mp4' [tee @ 0x217d820] Slave '[f=ssegment:segment_time=60:segment_format=mp4:reset_timestamps=1:r=15] /etc/cida/diagnostics/vid/780801-99-%03d.mp4': error writing header: No such file or directory

    See full command output below. Any suggestions?

    ffmpeg version 3.3 Copyright (c) 2000-2017 the FFmpeg developers
    built with gcc 4.8 (Ubuntu 4.8.4-2ubuntu1~14.04.3) configuration: --extra-libs=-ldl --prefix=/opt/ffmpeg --mandir=/usr/share/man --enable-avresample --disable-debug --enable-nonfree --enable-gpl --enable-version3 --enable-libopencore-amrnb --enable-libopencore-amrwb --disable-decoder=amrnb --disable-decoder=amrwb --enable-libpulse --enable-libfreetype --enable-gnutls --enable-libx264 --enable-libx265 --enable-libfdk-aac --enable-libvorbis --enable-libmp3lame --enable-libopus --enable-libvpx --enable-libspeex --enable-libass --enable-avisynth --enable-libsoxr --enable-libxvid --enable-libvidstab --enable-libwavpack --enable-nvenc libavutil 55. 58.100 / 55. 58.100 libavcodec 57. 89.100 / 57. 89.100 libavformat 57. 71.100 / 57. 71.100 libavdevice 57. 6.100 / 57. 6.100 libavfilter 6. 82.100 / 6. 82.100 libavresample 3. 5. 0 / 3. 5. 0 libswscale 4. 6.100 / 4. 6.100 libswresample 2. 7.100 / 2. 7.100 libpostproc 54. 5.100 / 54. 5.100 Input #0, rtsp, from 'rtsp://10.83.245.7:554/axis-media/media.amp?videocodec=h264&resolution=1280x720&fps=15': Metadata: title : Session streamed with GStreamer comment : rtsp-server Duration: N/A, start: 0.080011, bitrate: N/A Stream #0:0: Video: h264 (Main), yuvj420p(pc, bt709, progressive), 1280x720 [SAR 1:1 DAR 16:9], 25 tbr, 90k tbn, 180k tbc [stream_segment,ssegment @ 0x217ece0] Failed to open segment ' /etc/cida/diagnostics/vid/780801-99-000.mp4' [tee @ 0x217d820] Slave '[f=ssegment:segment_time=60:segment_format=mp4:reset_timestamps=1:r=15] /etc/cida/diagnostics/vid/780801-99-%03d.mp4': error writing header: No such file or directory [tee @ 0x217d820] Slave muxer #0 failed, aborting. Could not write header for output file #0 (incorrect codec parameters ?): No such file or directory Stream mapping: Stream #0:0 -> #0:0 (copy) Last message repeated 1 times

  • How to insert each segmented video name in database ffmpeg

    30 avril 2017, par A Sahra

    I am using ffmpeg to record multiple input stream in my server , the ffmeg command is running once and producing multiple segmented output,while initial running i can store name of segmented video in database but after that i can not store name of other generated segments to database because it run once.

    I am doing this in bash.How to store other segmented names in database?