Newest 'ffmpeg' Questions - Stack Overflow

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

Les articles publiés sur le site

  • Streaming Kinect RGB and Depth Camera to ffserver

    25 avril 2017, par Dove Devic

    I am wanting to stream Kinect RGB and Depth camera data up to a AWS Server which is running ffserver and ffmpeg. I have the Kinect hooked up to a Windows machine, so this would preferably need to be done in .NET; either C# or C++.

    My question:

    Its pretty trivial to gather the stream of the RGB Camera, and I don't think it will too hard to send this up to the server, but getting the stream of the Depth Camera(the "greyscale" camera) is something I am having trouble with.

    I have looked around, and found this source on github, as well as this one, also on github, but I don't think it is exactly what I need.

    Has anyone done this before, or knows how to even start about this? Thanks!

    It seems that there are solutions, but not very clear ones.

  • Probabilistic-Volumetric-3D-Reconstruction-master [on hold]

    25 avril 2017, par 董学强

    when i make the code of Probabilistic-Volumetric-3D-Reconstruction-master i meet with this error as following :[ 35%] Linking CXX executable ../../../bin/vidl_transcode_video ../../../lib/libvidl.a(vidl_ffmpeg_istream.cxx.o): In function vidl_ffmpeg_istream::open(std::string const&)': vidl_ffmpeg_istream.cxx:(.text+0x3d5): undefined reference toav_frame_alloc' ../../../lib/libvidl.a(vidl_ffmpeg_ostream.cxx.o): In function vidl_ffmpeg_ostream::close()': vidl_ffmpeg_ostream.cxx:(.text+0x124f): undefined reference toav_packet_unref' ../../../lib/libvidl.a(vidl_ffmpeg_ostream.cxx.o): In function vidl_ffmpeg_ostream::write_frame(vil_smart_ptr const&)': vidl_ffmpeg_ostream.cxx:(.text+0x16f5): undefined reference toav_frame_alloc' vidl_ffmpeg_ostream.cxx:(.text+0x1b3b): undefined reference to `av_packet_unref' collect2: error: ld returned 1 exit status make[2]: * [bin/vidl_transcode_video] Error 1 make[1]: * [core/vidl/examples/CMakeFiles/vidl_transcode_video.dir/all] Error 2 make: *** [all] Error 2 I don't know what's wrong I have got .Anyone can help me ?

  • Saving stream video on event FFMPEG CCTV RTSP ://

    25 avril 2017, par Josh

    I have a problem that I'm hoping some of the great minds here could help me with.

    I have a CCTV system that provides 4 RTSP streams (one from each camera) that will be covering a short 60 second event (roughly, so I can't predefine a duration). The issue I have is I need FFMPEG to take clips from the stream triggered from a JSON feed. There are two commands or states, Door Open - Stop Recording and Door Closed - Begin Recording.

    Now getting FFMPEG to start recording on the door close is pretty simple in batch as I'm currently experimenting HOWEVER I can't seem to find a way to get FFMPEG to start recording and then stop recording on demand. In batch it's pretty straight forward using Ctrl+C to have FFMPEG commit the recording to file. The question is, how do I get FFMPEG PHP to send a command to an already closed handle to stop the recording and commit to file?

    Many Thanks, Josh

  • ffmpeg on android exception

    25 avril 2017, par Yuriy Aizenberg

    I want to create project with two parts:

    1. RTSP local stream
    2. RTSP local player

    I use next library ffmpeg

    At first, initialize ffmpeg:

    private void runFFMPEG() {
        fFmpeg = FFmpeg.getInstance(this);
        try {
            fFmpeg.loadBinary(new FFmpegLoadBinaryResponseHandler() {
                @Override
                public void onFailure() {
                    new Long(1);
                }
    
                @Override
                public void onSuccess() {
                    new Long(1);
                }
    
                @Override
                public void onStart() {
                    new Long(1);
                }
    
                @Override
                public void onFinish() {
                    play();
                }
            });
        } catch (FFmpegNotSupportedException e) {
            e.printStackTrace();
        }
    

    Next call method play:

       private void play() {
        String  ip = "10.10.0.2";
        Uri parse = Uri.parse("rtsp://" + ip);
        LibVLC libVLC = new LibVLC(TheApplication.getInstance());
        MediaPlayer mediaPlayer = new MediaPlayer(libVLC);
        mediaPlayer.setMedia(new Media(libVLC, parse));
        mediaPlayer.play();
        mediaPlayer.setEventListener(new MediaPlayer.EventListener() {
            @Override
            public void onEvent(MediaPlayer.Event event) {
                new Long(1);
            }
        });
        try {
            fFmpeg.execute(new String[]{"ffmpeg -re -stream_loop -1 -i /storage/emulated/0/akgld-c8mxm.opus -acodec libopus -ac 1 -ab 96k -vn -f rtsp rtsp://" + ip + ":5545"}, new FFmpegExecuteResponseHandler() {
                @Override
                public void onSuccess(String message) {
                    new Long(1);
    
                }
    
                @Override
                public void onProgress(String message) {
                    new Long(1);
    
                }
    
                @Override
                public void onFailure(String message) {
                    new Long(1);
                }
    
                @Override
                public void onStart() {
    
    
                }
    
                @Override
                public void onFinish() {
                    new Long(1);
    
                }
            });
        } catch (FFmpegCommandAlreadyRunningException e) {
            e.printStackTrace();
        }
    }
    

    But raise onFailure with next argument

    ffmpeg version n3.0.1 Copyright (c) 2000-2016 the FFmpeg developers
      built with gcc 4.8 (GCC)
      configuration: --target-os=linux --cross-prefix=/home/vagrant/SourceCode/ffmpeg-android/toolchain-android/bin/arm-linux-androideabi- --arch=arm --cpu=cortex-a8 --enable-runtime-cpudetect --sysroot=/home/vagrant/SourceCode/ffmpeg-android/toolchain-android/sysroot --enable-pic --enable-libx264 --enable-libass --enable-libfreetype --enable-libfribidi --enable-libmp3lame --enable-fontconfig --enable-pthreads --disable-debug --disable-ffserver --enable-version3 --enable-hardcoded-tables --disable-ffplay --disable-ffprobe --enable-gpl --enable-yasm --disable-doc --disable-shared --enable-static --pkg-config=/home/vagrant/SourceCode/ffmpeg-android/ffmpeg-pkg-config --prefix=/home/vagrant/SourceCode/ffmpeg-android/build/armeabi-v7a --extra-cflags='-I/home/vagrant/SourceCode/ffmpeg-android/toolchain-android/include -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fno-strict-overflow -fstack-protector-all' --extra-ldflags='-L/home/vagrant/SourceCode/ffmpeg-android/toolchain-android/lib -Wl,-z,relro -Wl,-z,now -pie' --extra-libs='-lpng -lexpat -lm' --extra-cxxflags=
      libavutil      55. 17.103 / 55. 17.103
      libavcodec     57. 24.102 / 57. 24.102
      libavformat    57. 25.100 / 57. 25.100
      libavdevice    57.  0.101 / 57.  0.101
      libavfilter     6. 31.100 /  6. 31.100
      libswscale      4.  0.100 /  4.  0.100
      libswresample   2.  0.101 /  2.  0.101
      libpostproc    54.  0.100 / 54.  0.100
    [NULL @ 0xf741a000] Unable to find a suitable output format for 'ffmpeg -re -stream_loop -1 -i /storage/emulated/0/akgld-c8mxm.opus -acodec libopus -ac 1 -ab 96k -vn -f rtsp rtsp://10.10.0.2:5545'
    ffmpeg -re -stream_loop -1 -i /storage/emulated/0/akgld-c8mxm.opus -acodec libopus -ac 1 -ab 96k -vn -f rtsp rtsp://10.10.0.2:5545: Invalid argument
    

    What im doing wrong? Maybe exists more easier ways to resolve this task? Thanks.

  • Recursively convert files in nested folders

    25 avril 2017, par E.Owen

    I wanted to just comment on an answer to a question very similar to this but I don't have enough rep. I'm looking for a way to change this line of code:

    for i in *.mkv; do ffmpeg -i "$i" "${i%.*}.mp4"; done
    

    So that it includes .avi files and so that it can search through nested folders. I want to be able to target /Videos and have the script automatically traverse through the folder tree into /Videos/2016/January, convert all of the video files contained within that folder, then do the same for /Videos/2016/February and so on.

    Thanks in advance.

    (credit for above line of code goes to LordNeckBeard, from this post.)