Recherche avancée

Médias (1)

Mot : - Tags -/Rennes

Autres articles (65)

Sur d’autres sites (13936)

  • lavd/v4l2 : produce a 0 byte packet when a dequeued buffer's size is unexpected

    5 juin 2019, par Stephan Hilb
    lavd/v4l2 : produce a 0 byte packet when a dequeued buffer's size is unexpected
    

    Behave like we do for V4L2_BUF_FLAG_ERROR, implemented in commit 28f20d2ff4 .

    For some devices (probably also related to the V4L driver implementation)
    it happens that when invoking the ioctl DQBUF, the returned buffer is not
    of the expected size. Here are two examples for such occurrences :

    [video4linux2,v4l2 @ 0x258b440] Dequeued v4l2 buffer contains 609596 bytes, but 614400 were expected. Flags : 0x00000001.
    /dev/video1 : Invalid data found when processing input

    [video4linux2,v4l2 @ 0x225f440] Dequeued v4l2 buffer contains 609508 bytes, but 614400 were expected. Flags : 0x00000001.
    /dev/video1 : Invalid data found when processing input

    For the ffmpeg CLI tool this means it will stop capturing and exit.

    The described behaviour was observed at least with one OmniVision USB
    web cam and with some stk1160 devices.

    If you search the web for the error message, you will find quite a few
    instances of this problem. Some of them experienced on other devices.

    Probably fixes ticket #4795

    Signed-off-by : Alexander Strasser <eclipse7@gmx.net>

    • [DH] libavdevice/v4l2.c
  • Splitting audio tracks with incorrect length - FFMPEG

    26 mars 2018, par channae

    Version : com.writingminds:FFmpegAndroid:0.3.2

    I have an audio file with length 43 seconds. And I wrote an algorithm to split at each 10 seconds mark where a word ends (For this I used IBM Watson to get ending timestamp). So cropping duration is always around 10 seconds to 11 seconds. Of course except the 5th one. I have printed my commands so that you will understand my use-case better.

    System.out: Split Command: -y -i /storage/emulated/0/AudioClipsForSpeakerRecognition/merge.wav -ss 00:00:00.000 -codec copy -t 00:00:10.010 /storage/emulated/0/AudioClipsForSpeakerRecognition/segment_1.wav

    System.out: Split Command: -y -i /storage/emulated/0/AudioClipsForSpeakerRecognition/merge.wav -ss 00:00:10.010 -codec copy -t 00:00:21.090 /storage/emulated/0/AudioClipsForSpeakerRecognition/segment_2.wav

    System.out: Split Command: -y -i /storage/emulated/0/AudioClipsForSpeakerRecognition/merge.wav -ss 00:00:21.090 -codec copy -t 00:00:30.480 /storage/emulated/0/AudioClipsForSpeakerRecognition/segment_3.wav

    System.out: Split Command: -y -i /storage/emulated/0/AudioClipsForSpeakerRecognition/merge.wav -ss 00:00:30.480 -codec copy -t 00:00:40.120 /storage/emulated/0/AudioClipsForSpeakerRecognition/segment_4.wav

    System.out: Split Command: -y -i /storage/emulated/0/AudioClipsForSpeakerRecognition/merge.wav -ss 00:00:40.120 -codec copy -t 00:00:43.000 /storage/emulated/0/AudioClipsForSpeakerRecognition/segment_5.wav

    However when playing all cropped audio files I noticed segment_1 is about 10 seconds and segment_2 is about 20 seconds etc. Therefore some of the audio parts belong to segment_1 also available in segment 2 etc etc. Why is this happening ?

    Appreciate your response.

  • Gujarati text properly not show on output video using FFmpeg Library in Android

    15 mars 2024, par sanjay dangar

    Gujarati text overly on video using FFmpeg Library on Android

    &#xA;

    below my code in Gujarati text twin word proper does not show

    &#xA;

    I am Enter this text ="વડાપ્રધાનશ્રી નરેન્દ્રભાઇ મોદી." but output video in proper not show

    &#xA;

     fun addFrame2VideoEditFun(&#xA;        videoPath: String,&#xA;        fontPath: String,&#xA;        outputPath: String&#xA;    ): Array<string> {&#xA;        val inputs: ArrayList<string> = ArrayList()&#xA;     var textFile = "વડાપ્રધાનશ્રી નરેન્દ્રભાઇ મોદી."&#xA;        inputs.apply {&#xA;            add("-i")&#xA;            add(videoPath)&#xA;            add("-vf")&#xA;            add("drawtext=fontfile=$fontPath:text=$textFile:fontsize=24:fontcolor=white:x=(w-text_w)/2:y=h-line_h")&#xA;            add("-c:a")&#xA;            add("copy")&#xA;            add(outputPath)&#xA;        }&#xA;        return inputs.toArray(arrayOfNulls(inputs.size))&#xA;    }&#xA;</string></string>

    &#xA;

    my output video in below text show

    &#xA;

    my output video in show this text

    &#xA;

    Gujarati text properly does not show on output video using FFmpeg Library.

    &#xA;