Newest 'ffmpeg' Questions - Stack Overflow

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

Les articles publiés sur le site

  • FFMPEG : CPU usaged (MP3, AAC, OOG)

    22 décembre 2017, par beeb.vn

    I'm transcoding IPTV to HLS streaming, but getting issue with CPU, my VPS is too weak :D lose 10% CPU if transcode mpga layer 2 to aac. So i'm finding the best audio code that uses lowest CPU. Let's give a suggestion

    AAC/MP3/OOG

    Thanks!

  • Combine with ffmpeg two or more images that overlap

    22 décembre 2017, par Smeterlink

    Having two or more images that overlap, like in this screenshot, I want to combine/merge them into one:

    overlapping images

    The result I want is like using the"Auto-Blend Layers" command from Adobe Photoshop:

    https://helpx.adobe.com/photoshop/using/combine-images-auto-blend-layers.html

  • How to copy and transform a video device using v4l2loopback and ffmpeg (or avconv)

    22 décembre 2017, par Nico Toub

    I am using the following commands to create 2 virtual video devices:

    # add 2 virtual video devices
    modprobe v4l2loopback devices=2 exclusive_caps=1,1
    

    Then I duplicate my webcam video into those virtual devices, so I can use one in firefox, and one in chrome (in order to debug webrtc communication) :

    # duplicate webcam to virtual devices
    ffmpeg -f v4l2 -i /dev/video0 -f v4l2 /dev/video1 -f v4l2 /dev/video2
    

    This work good, but it would be even better if I could have some difference between video1 and video2.

    Is there a way to transform one of the video output (flip, rotate, greyscale...) with ffmpeg or avconv?

  • Which Android FFMpeg library ?

    21 décembre 2017, par Bz Burr

    Which Android FFmpeg library can one use to record video from the phone's camera to a file?

    I see loads of information about using FFmpeg to transcode etc but not a lot about how to record to file

    cheers Buzz

  • FFMPEG command runs forever even on using timelimit

    21 décembre 2017, par t6nand

    Mostly I use a java code to run FFMPEG bash commands for watermarking a logo on video. I am using the following FFmpeg command to overlay an image on video. I have observed that at times for some random videos, the process keeps on running even after the timelimit assigned to it expires. At times it's more than a day or couple of days until not directly killed using kill -9 pid:

    ffmpeg -timelimit 900 -y -i input_video -i logoImage -filter_complex "[0:v]scale=trunc(iw/2)*2:trunc(ih/2)*2[even];[1:v][even]scale2ref=iw*0.25:(iw*0.25)*(0.46446702)[2nd][ref];[ref][2nd]overlay=(main_w-overlay_w):(main_h-overlay_h)" -c:v libx264 -b:v 300K -crf 28 -preset slow outputVideo

    But this command never completes even on using -timelimit flag at times for some videos.

    I have observed that for such processes output from ps aux|grep ffmpeg yeilds in something like:

    ubuntu 16620 0.6 6.7 1595044 515392 ? Sl Dec20 12:05 ffmpeg -timelimit 900 -y -i input_video -i logoImage -filter_complex "[0:v]scale=trunc(iw/2)*2:trunc(ih/2)*2[even];[1:v][even]scale2ref=iw*0.25:(iw*0.25)*(0.46446702)[2nd][ref];[ref][2nd]overlay=(main_w-overlay_w):(main_h-overlay_h)" -c:v libx264 -b:v 300K -crf 28 -preset slow outputVideo

    It indicates that this process is in interruptible sleep state i.e. waiting for an event to complete. On using sudo strace -p 16620 to trace which system call is this process hung up on it results in something like:

    Process 16620 attached write(2, "frame= 4121 fps= 10 q=33.0 size="..., 99

    i.e. it's stuck writing to a file.

    What could be the reason for this problem? And is there any other way to kill FFMPEG process which overshoots desired time limit?