Newest 'ffmpeg' Questions - Stack Overflow

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

Les articles publiés sur le site

  • Audio decompression in Windows using ffmpeg

    25 février 2014, par user1665130

    I have an audio (abc.wav) which is in compressed state. I need to decompress it using FFMPEG tool. Is it possible? I have the code for audio compression.

    ffmpeg -i inputfile.wav -ab 128 abc.wav
    
  • getting AVFrame pts value

    25 février 2014, par Whoami
    1. I have a AVStream of Video from FormatContext. [ avstream ]
    2. Read Packet
    3. Decode packet if it is from video.
    4. Now Display the following.

      Packet DTS ->  7200.00    [ from packet ]
      Frame PTS   -> -9223372036854775808.000000
      stream time_base ->  0.000011
      Offset                    ->  0.080000    [ pts * time_base ]
      

    code:

    double pts = (double) packet.dts;
    printf (" dts of packet %f , Frame pts:  %f, timeBase %f Offset: %f ",
        pts,
        (double)pFrame->pts, 
        av_q2d (avstream->time_base) , 
        pts
    *av_q2d(avstream->time_base));
    
    1. Why is Frame pts negative ? Is it expected behavior ?
    2. Do I need to consider Frame pts from packet DTS [ ie: frame pts = packet dts ]
  • FFMPEG out put on azure blob

    25 février 2014, par user3227615

    we are developing app which takes up the input file from the azure blob storage and does the requried action and needs to put back the video file to blob storage. Its worker role

    Please find the below which i have written, its work fine on local machine, and this is basically worker role solution. challenges we have is on out put path. Input path i am giving the blob http url and its converting and placing on my local system. if i want to upload same in azure how can i do that

            string mpegpath = @"C:\ffmpeg\bin";
            string input = @"http URL of blob storage";
            string outputFile = @"D:\Shared\100.mp4";
            string Params = string.Format(" -ss 00:00:09 -i {0} -t 00:00:23 -vcodec copy -     acodec copy -y {1}", input, outputFile);
           string ffmpegPath = Path.Combine(mpegpath, "ffmpeg.exe");
           string ffmpegParams =  Params;
    
            Process ffmpeg = new Process();
            ffmpeg.StartInfo.FileName = "cmd.exe";
            ffmpeg.StartInfo.Arguments = "/k " + ffmpegPath + " " + ffmpegParams;
            ffmpeg.Start();
    
  • How to quit pexpect launched ffmpeg with key q pressed

    25 février 2014, par Shuman

    i used pexpect to call ffmpeg which is a lengthy process. it took half an hour, how can i detect user has pressed q key to stop it ? just like when you press q when using ffmpeg command line tool

    the ffmpeg command line is ffmpeg -y -i url -c copy -absf aac_adtstoasc out.mp4

    the last line of ffmpeg output is

    ...
    Stream mapping:
      Stream #0:1 -> #0:0 (copy)
      Stream #0:2 -> #0:1 (copy)
    Press [q] to stop, [?] for help
    frame=   84 fps= 77 q=-1.0 Lsize=  184626kB time=00:00:06.96 bitrate=217120.3kbits/s
    

    the code i have now is

    reo = re.compile("""\S+\s+(?P\d+)  # frame
                         \s\S+\s+(?P\d+)           # fps
                         \sq=(?P\S+)                    # q
                         \s\S+\s+(?P\S+)          # size
                         \stime=(?P

    with this code i can already get the frame info and duration info, the ultimate goal is to create a textual progress bar with another python progressbar module. but with the ability to send the 'q' pressed signal to ffmpeg child process.

  • ffmpeg concatenation of two avi files

    25 février 2014, par user1665130

    I have two avi files namely test.avi and SUNP.avi . I need to concatenate these two files into a single avi file

    I tried with this code

    ffmpeg -i concat:test.avi|SUNP.avi -c copy  new1.avi
    

    It is showing that "Atleast one output file must be specified"

    Please help

    Thanks

    Vishnu