Newest 'ffmpeg' Questions - Stack Overflow

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

Les articles publiés sur le site

  • ffmpeg disconnects with different audio sample rate

    11 juillet 2017, par HRG

    Am using ffmpeg transcoder tool to convert a streaming audio input to another format.The raw audio data comes from a input device in wav format (.wmv) which can be accessed via server port (ex.8080) . The audio format is in wav with 16bits/sample and sample rate of 6000 hz. When I use ffmpeg to read this audio input with above specs and convert to another format it works fine.

    Ex. ffmpeg -f s16le -ar 6000 -ac 1 -i http://local:8080/sampleaudio.wmv -f webm out.webm

    But if i use fmmpeg to read the audio input at sample rate of 4000hz (other than the actual rate) ,it disconnects from the server always .

    Ex. ffmpeg -f s16le -ar 4000 -ac 1 -i http://local:8080/sampleaudio.wmv -f webm out.webm

    The error in the ffmpeg console is "Stream ends prematurely at 194604, should be 4800044"

    I know the input rate at which ffmpeg is reading and the actual audio output is different .But am curious to know

    why ffmpeg is disconnecting from the server ,what is happening behind the scene.

    Also how to enable logs for network connections(http,sockets..)

    Thanks

  • Streaming rtsp data to local mp4 file

    11 juillet 2017, par Pankhuri Agarwal

    How can I save live streaming data from a local camera transported by rtsp to my local memory in a .mp4 format.

    I am using Ubuntu 16.04 LTS and tried using ffmpeg 3.3 but nothing seemed to work properly.

    The goal will be to provide live feed by mp4 by html5 and perform some modification on mp4 data.

    Can anyone suggest how to make ffmpeg work or any other way?

  • IllegalStateException while compressing video at "dequeueOutputBuffer()" [on hold]

    11 juillet 2017, par Mr Narendra

    I've also checked a few or more similar posted questions, but none of them was having any satisfying response.

    My requirement is to compress videos in approx. 1-2 minutes. The video size restriction in my app is 500 MB and the duration limit is 4 minutes.

    The commands, I have tried -

    -i /storage/sdcard0/Videos/Lat_test.mp4 -r 20 -vcodec mpeg4 -preset ultrafast -c:a copy -tune fastdecode -strict -2 -b:v 150k /storage/sdcard0/Videos/output.mp4

    -y -i /storage/sdcard0/Videos/test3.mp4 -crf 24 -vcodec mpeg4 -preset ultrafast -c:a copy -me_method zero -tune fastdecode -tune zerolatency -strict -2 -b:v 1000k -pix_fmt yuv420p /storage/sdcard0/Videos/output.mp4

    and a few more mentioned here

    1) https://github.com/Tourenathan-G5organisation/SiliCompressor (the one using MediaCodec, instead of FFMPEG).

    2) https://github.com/lalongooo/VideoCompressor

    When tried with Samsung Galaxy Grand GT-i9082, version 5.0.1 (rooted), it failed with the below error -

    > java.lang.IllegalStateException
    > at android.media.MediaCodec.native_dequeueOutputBuffer(Native Method)
    > at android.media.MediaCodec.dequeueOutputBuffer(MediaCodec.java:1033)
    > at com.iceteck.silicompressorr.videocompression.MediaController.convertVideo(MediaController.java:491)
    > at com.iceteck.silicompressorr.SiliCompressor.compressVideo(SiliCompressor.java:300)
    > at com.iceteck.silicompressor.SelectPictureActivity$VideoCompressAsyncTask.doInBackground(SelectPictureActivity.java:379)
    > at com.iceteck.silicompressor.SelectPictureActivity$VideoCompressAsyncTask.doInBackground(SelectPictureActivity.java:358)
    > at android.os.AsyncTask$2.call(AsyncTask.java:288)
    > at java.util.concurrent.FutureTask.run(FutureTask.java:237)
    > at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:231)
    > at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
    > at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
    > at java.lang.Thread.run(Thread.java:818)
    

    Please suggest how to resolve this issue.

    Or please suggest any other better video compressing approach / sample / reference, if possible

    I have tried various samples of video compression using FFMPEG, as well as MediaCodec, but none of them are working well. A few are very very slow. and rest gets failed in a few devices.

  • FFMPEG : what is the limit of parameter using for text to video ?

    11 juillet 2017, par Bunker Boy

    i am using ffmpeg for text to video conversion and everything working fine just only can not decide how much fontsize can accepted there and height & width limit for video as well as how many characters can allow? the command i am using

    ffmpeg -f lavfi -i color=c=0x000000:s=1600x1600 -vf "drawtext=fontfile=PATHOFFONTS/DejaVuSans.ttf:fontsize=96:fontcolor=0xffffff:y=(h-line_h)/2:x=-(4*n)+W:text='text text text long text long text long text'" -r 24 -t 1140 PATHTOSAVE/video.mp4

    here text moving from right to left.

    -t 1140 // is the time i have calculated separately

    s=1600x1600 then video mime type got corrupted and video is not working well.

    can anybody let me know what is the minimum and maximum range i can pass for fontsize, height, width and text ?

  • IOS html5 audio API can not play m4a converted by ffmpeg

    11 juillet 2017, par Cheng Jeiry

    I'm using Html5 audio api play m4a on IOS I converted mp3 to m4a by ffmpeg. here is the script

    ffmpeg -ss 0 -i ./Uploads/" + str(current) + ".mp3 -t 15 -c:a aac -b:a 64k ./Uploads/" + str(current) + "_lite.m4a
    

    then I play the m4a by audio api on IOS. and I got the error

    undefined:1 Uncaught (in promise) DOMException: Failed to load because no supported source was found.
    

    then a try mp3 mp4 format, works fine.

    Is there a solution to resolve this error? Thank you very much!