Newest 'ffmpeg' Questions - Stack Overflow

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

Les articles publiés sur le site

  • How to clip video and resize without lost frames using ffmpeg

    28 novembre 2016, par Mryoun

    I want clip my video time from some seconds to other seconds with crop it. so i tried command like this:

    ffmpeg -y -ss 0.648 -i girl.mp4 -t 20.0 -acodec copy -filter:v crop=262:ih:252:0 girl_den.mp4 
    

    but compare the result with the playing command:

    ffplay -ss 0.648 girl.mp4 -t 20.0 -vf "crop=262:ih:252:0" 
    

    it's seems some frame that in front was lost. need help

  • FFmpeg open codec error when using "MobileVLCKit-prod" pod Swift

    28 novembre 2016, par OuSS

    I want to use VLCMediaPlayer into my project to live stream

    I'm using pod 'MobileVLCKit-prod'

    and this is my code

    class CameraViewController: UIViewController,VLCMediaPlayerDelegate{
    
      var mediaPlayer = VLCMediaPlayer()
    
      override func viewDidLoad() {
          super.viewDidLoad()
    
          mediaPlayer.delegate = self
          mediaPlayer.drawable = playerView
          let url = NSURL(string: "URL HERE")
          mediaPlayer.media = VLCMedia(URL: url!)
          mediaPlayer.play()
      }
    }
    

    When i run my app i got ffmpeg open codec error : Screenshot of Codec Error

  • FFMPEG on Linux (Mono)

    28 novembre 2016, par Paulo Anjos

    I'm creating a Discord Bot and I'm using Dot.Net. So I downloaded the necessary libs (ffmpeg and opus [for Discord]) and I'm running the .exe with Mono.

    I'm downloading a video file (mp4) and using FFMPEG to adjust the audio (16-bit, 48000Hz, PCM, 2 channels) and send it to the Discord Channel.

    It works fine on Windows but it refuses to on Linux (Ubuntu 14.04). It justs hangs and doesn't do anything else like this image shows.

    Same .exe but in Windows now (to compare if needed): image link

    I thought it was something with my Virtual Private Server but the same problem occured with my local Ubuntu 14.04 virtual machine.

    Code to send the song to Discord (Dot.Net):

    async public void playAudio(Music m)
    {
        string path = "mp4" + Path.DirectorySeparatorChar + m.videoid + ".mp4";
        Process mProcess = Process.Start(new ProcessStartInfo
        {
            FileName = "ffmpeg",
            Arguments = //"-loglevel quiet " +
            "-i " + (char)34 + path + (char)34 + " " +
            "-f s16le -ar 48000 -ac 2 pipe:1",
            UseShellExecute = false,
            CreateNoWindow = false,
            RedirectStandardOutput = true, //stdout of the process
            RedirectStandardError = false,
            Verb = "runas"
        });
        while (!Utils.isRunning(mProcess)) { await Task.Delay(500); }
    
        while (true)
        {
            int blockSize = 3840;
            byte[] buffer = new byte[blockSize];
            int byteCount;
            byteCount = mProcess.StandardOutput.BaseStream.Read(buffer, 0, blockSize);
            if (byteCount == 0)
                break;
            if (stop_music)
                break;
            bot_audio.Send(buffer, 0, byteCount); //Send to Discord
        }
        ...
    }
    

    I find a little odd the libavresample 3. 1. 0 / 3. 1. 0 at the image (missing lib maybe?).

    Any thoughts?

  • Convert video in background

    27 novembre 2016, par RoiEX

    I found this question which is the same question I have, but with the small but important difference, that I'm using Windows so cronjobs are no thing.
    I basically want to convert a video in PHP, but don't want the PHP script to hang up until the conversion is finished and instead return immediately.

    My current code:

    if ($videoext !== "mp4") {
        exec ( "./ffmpeg.exe -i " . $inputFile. " " . $outputFile/*without extension*/ . ".mp4" );//convert to useable format
        if (! in_array ( $videoext, $GLOBALS ['fileextensions'] )) {//Unsupported extension
            unlink ( $inputFile);//delete if not useful
        }
    }
    

    I'm using PHP7 with XAMPP for windows Any help is appreciated

    EDIT: I know that pthreads exist, but I'm not sure if they do what I'd expect them to do and too stupid to get them working on my XAMPP installation

  • How to Extract motion vectors using FFMPEG on HADOOP from a mp4 video

    27 novembre 2016, par MEHDI SAOUDI

    I want to manipulate videos stored in HDFS with the FFMPEG libraries and store the text file results on HDFS or on Hbase.

    to clarify : I want to extract the motion vectors from a mp4 video with FFMPEG, I can do this locally but I want to do this on my hadoop cluster. locally The command is:

    ffmpeg -flags2 +export_mvs -i input.mp4 -vf codecview=mv=pf+bf+bb output.mp4
    

    And then I modify the vf_codecview.c file to have the motion vector on a text file. For the moment my goal is to turn the command on hadoop on one video and then on my database of videos.

    thanks for your help