Newest 'ffmpeg' Questions - Stack Overflow

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

Les articles publiés sur le site

  • Not able to change the program number for the video

    17 mai 2018, par C.B. Akshay Kumar

    I have been trying to change the program number of a particular .ts file using FFmpeg without any success. I saw the documentation and it mentions to use the -program option. But, I am not able to add the streams as I desire. Here's the program information for the stream that I possess currently:

    Input #0, mpegts, from 'output_2_without_pgm_num.ts':
      Duration: 00:01:49.92, start: 1.400000, bitrate: 1816 kb/s
      Program 1
        Metadata:
      service_name    : Service01
      service_provider: FFmpeg
    Stream #0:0[0x100]: Video: mpeg2video (Main) ([2][0][0][0] / 0x0002), yuv420p(tv, progressive), 720x576 [SAR 64:45 DAR 16:9], 25 fps, 25 tbr, 90k tbn, 50 tbc
    Stream #0:1[0x101](ger): Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, fltp, 384 kb/s (clean effects)
    Stream #0:2[0x102](eng): Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, fltp, 384 kb/s (clean effects)
    Stream #0:3[0x103](ger): Subtitle: dvb_teletext ([6][0][0][0] / 0x0006)
    

    Now, I want to change the program number from 1 to 22. Any idea how I could do that? I have tried using -program option, but I can't add streams 2 and 3 to the newly created .ts file.

    Thanks in advance!

  • Determine if video stream is a live stream

    17 mai 2018, par David

    Is there a way to use ffprobe or ffmpeg to determine if a given stream (for instance http://server/stream or rtmp://server/stream...) is an on-going live stream or is fixed stream (i.e. recorded in the path with no live updates)?

  • C# Bitmap Change Pixel color by doing XOR

    17 mai 2018, par Edward

    I try to change RGB color using XOR of RGB.
    example:
    => if value of R on some pixel is 5 = 101
    //Color pcolor = image.GetPixel(j, k);

    => then doing XOR with some byte 101 ^ 11111111 = 11111010
    //R[x, w] = (byte) (R[x, w] ^ mykey[0]);

    => and replace R with result R=11111010=250
    //image.SetPixel(y, z, Color.FromArgb(A[y, z], R[y, z], G[y, z], B[y, z]));

    but the problem is if i read again that result frame, R value that i was change before are not 250.

    using Accord.Video.FFMPEG;
    

    VideoFileReader reader = new VideoFileReader();
    reader.Open(@"E:\Video\Sample.MP4");
    VideoFileWriter writer = new VideoFileWriter();
    writer.Open(@"E:\Video\Result.MP4", reader.Width, reader.Height, reader.FrameRate, VideoCodec.MPEG4);
    MyFunc(reader, writer)
    

    public static void Myfunc(VideoFileReader reader, VideoFileWriter writer)
        {
        byte[] mykey = { 0xff, 0x55, 0x00 };
        Bitmap image = new Bitmap(reader.Width, reader.Height, PixelFormat.Format24bppRgb);
        for (int i = 0; icode>
  • Correcting color cast with ffmpeg

    16 mai 2018, par Henry H

    I have two videos that have a pretty significant blue cast to them. I took some stills at the same time and I'm happy enough with the colors on those and I'd like to re-encode the videos, adjusting the colors to something similar to the stills.

    I understand I could either create a large collection of jpg images from the video and color correct them before reassembling them into a new video or I could use ffmpeg's color level's filter to do it directly. What I don't know is how to get the numbers to pass to the filter. I'm assuming I want to do something like this:

    ffmpeg -i video.mov -vf "colorlevels=rimin=##/255:gimin=##/255:bimin=#/255:rimax=###/255:gimax=###/255:bimax=###/255, eq=gamma=#.##" -y out.mov
    

    How do I get the values to use for each of the r, g, and b min and max settings and gamma to use in place of the ###s? Assuming this is the right approach, of course.

    Update: Perhaps this question would be better asked in a forum for gimp or photoshop. But I know how to adjust the color in those. What I need to know is how I translate those changes to what ffmpeg is expecting.

  • Start .bat after files get download in torrent client qBittorrent

    16 mai 2018, par AniEncoder

    I tried to start a .bat file which is located in a particular folder but it doesn't start even if I write the file location.

    The files get downloaded

    C:\Users\Dhrubo\Desktop\torrent.bat
    

    TorrentScreenshot