Newest 'ffmpeg' Questions - Stack Overflow

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

Les articles publiés sur le site

  • Is it possible to replace a moving transparent area inside video with a image

    7 juin 2017, par somya bhargava

    Have a video with moving transparent rectangle. I want to put up a image in that area. Is it possible using ffmpeg or need to split into frames?

  • GStreamer encountered a general stream error in Qt5 raspberry pi

    7 juin 2017, par Myanju

    I'm trying to play a video using QtMediaPlayer in Raspberry pi 2 B. The source code is as follows:

    QMediaPlayer *media;
    QVideoWidget *video;
    ...
    ...
    media = new QMediaPlayer(parent);
    video = new QVideoWidget(parent);
    media->setVideoOutput(video);
    media->setMedia(QUrl::fromLocalFile("/home/pi/Desktop/test3.mp4"));
    media->play();
    

    But the result is a blank video screen and the following error:

    ** (Bus:2148): WARNING **: ffmpegcolorspace-vo: size 1105920 is not a   
    multiple of unit size 829440
    Error: "GStreamer encountered a general stream error."
    

    System Information

    Running latest raspbian Jessie OS, Installed Qt5.3, Installed gstreamer0.10-plugins-good/bad/ugly/ffmpeg and Installed Mpeg-2 License

    Here is the video test3.mp4

    I ran this code in Windows with Qt5 installed; it is working there. But it's not working in the Raspberry pi. Please tell me what I'm missing here.

    Trying Pipe from Shell

    enter image description here

  • About java.lang.UnsatisfiedLinkError:org.bytedeco.javacpp.avutil

    7 juin 2017, par Noo Li

    I try to work it out a couple days. But it didn't work.

    enter image description here

    Below is full error logs:

    02-19 09:41:31.239 17753-17753/com.superdata.cxim E/art: dlopen("/system/lib64/libdl.so", RTLD_LAZY) failed: dlopen failed: cannot locate symbol "__cxa_finalize" referenced by "/system/lib64/libdl.so"...
    02-19 09:41:31.317 17753-17753/com.superdata.cxim E/art: dlopen("/data/app/com.superdata.cxim-1/lib/arm64/libavutil.so", RTLD_LAZY) failed: dlopen failed: "/data/app/com.superdata.cxim-1/lib/arm64/libavutil.so" is 32-bit instead of 64-bit
    02-19 09:41:31.359 17753-17753/com.superdata.cxim E/InputEventReceiver: Exception dispatching input event.
    02-19 09:41:31.360 17753-17753/com.superdata.cxim E/MessageQueue-JNI: Exception in MessageQueue callback: handleReceiveCallback
    02-19 09:41:31.361 17753-17753/com.superdata.cxim E/MessageQueue-JNI: java.lang.UnsatisfiedLinkError: org.bytedeco.javacpp.avutil
        at java.lang.Class.classForName(Native Method)
        at java.lang.Class.forName(Class.java:309)
        at org.bytedeco.javacpp.Loader.load(Loader.java:390)
        at org.bytedeco.javacpp.Loader.load(Loader.java:358)
        at org.bytedeco.javacpp.avcodec$AVPacket.(avcodec.java:1407)
        at com.superdata.cxim.ui.camera.javacv.FFmpegFrameRecorder.(FFmpegFrameRecorder.java:252)
        at com.superdata.cxim.ui.camera.recorder.WXLikeVideoRecorder.initRecorder(WXLikeVideoRecorder.java:174)
        at com.superdata.cxim.ui.camera.recorder.WXLikeVideoRecorder.startRecording(WXLikeVideoRecorder.java:278)
        at com.superdata.cxim.ui.camera.main.NewRecordVideoActivity.startRecord(NewRecordVideoActivity.java:158)
        at com.superdata.cxim.ui.camera.main.NewRecordVideoActivity.onTouch(NewRecordVideoActivity.java:234)
        at android.view.View.dispatchTouchEvent(View.java:8656)
        at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2523)
        at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2114)
        at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2523)
        at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2114)
        at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2523)
        at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2114)
        at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2523)
        at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2114)
        at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2523)
        at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2114)
        at com.android.internal.policy.impl.PhoneWindow$DecorView.superDispatchTouchEvent(PhoneWindow.java:2511)
        at com.android.internal.policy.impl.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1807)
        at android.app.Activity.dispatchTouchEvent(Activity.java:2841)
        at com.android.internal.policy.impl.PhoneWindow$DecorView.dispatchTouchEvent(PhoneWindow.java:2468)
        at android.view.View.dispatchPointerEvent(View.java:8873)
        at android.view.ViewRootImpl$ViewPostImeInputStage.processPointerEvent(ViewRootImpl.java:4831)
        at android.view.ViewRootImpl$ViewPostImeInputStage.onProcess(ViewRootImpl.java:4689)
        at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:4188)
        at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:4241)
        at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:4207)
        at android.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:4344)
        at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:4215)
        at android.view.ViewRootImpl$AsyncInputStage.apply(ViewRootImpl.java:4401)
        at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:4188)
        at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:4241)
        at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:4207)
        at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:4215)
        at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:4188)
        at android.view.ViewRootImpl.deliverInputEvent(ViewRootImpl.java:6645)
        at android.view.ViewRootImpl.doProcessInputEvents(ViewRootImpl.java:6619)
        at android.view.ViewRootImpl.enqueueInputEvent(ViewRootImpl.java:6572)
        at android.view.ViewRootImpl$WindowInputEventReceiver.onInputEvent(ViewRootImpl.java:6812)
        at android.view.InputEventReceiver.dispatchInputEvent(InputEventReceiver.java:185)
        at android.os.MessageQueue.nativePollOnce(Native Method)
        at android.os.MessageQueue.next(MessageQueue.java:148)
        at android.os.Looper.loop(Looper.java:151)
    
  • Piping file contents to ffmpeg

    7 juin 2017, par parameter

    I'm currently using this ffmpeg command to generate 2 png images from the raw image fb0 file on an android device.

    ffmpeg -vcodec rawvideo -f rawvideo -pix_fmt rgb32 -s 720x1280 -i fb0 -f image2 -vcodec png image_%03d.png

    I'm pulling the fb0 file with adb pull before running this command but I'm wondering if I can just cat and pipe the output of it to the ffmpeg command rather than having to save the file locally beforehand. Is this possible, and if so how would it be done? Thanks

    edit: this post from 2010 says piping in ffmpeg can only be done with video, is this still the case?

    I tried to do this, and it does work except my image is distorted, any suggestions?

    adb shell cat /dev/graphics/fb0 | ffmpeg -vcodec rawvideo -f rawvideo -pix_fmt rgb32 -s 720x1280 -i pipe:0 -f image2 -vcodec png image_%03d.png

    it gives an "Invalid buffer size" error too.

  • ffmpeg mix 20 audio streams without making it quieter

    7 juin 2017, par kevin

    I want to mix about 20 audio streams with ffmpeg amix, however as described here, amix has a weired way of making the input streams quieter the more of them you mix together:

    "amix scales each input's volume by 1/n where n = no. of active inputs. This is evaluated for each audio frame. So when an input drops out, the volume of the remaining inputs is scaled by a smaller amount, hence their volumes increase"

    How can I get rid of this anoying behaviour? I just want the audio streams to keep the same loudness, since only one of them has actual audio in it at any give time anyway..

    At the moment I end up with a file that is about 1/20 the loudness of the original, making it effectively unusable.