Newest 'ffmpeg' Questions - Stack Overflow

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

Les articles publiés sur le site

  • javacv size is duplicated hls

    30 mars 2017, par ashraf revo

    when i use ffmpeg to convert to mp4 to hls use this line ffmpeg -i input.mp4 -strict experimental -profile:v baseline -level 3.0 -start_number 0 -hls_time 10 -hls_list_size 0 -f hls index.m3u8 when i test it with 8mb file it give me 7.7 ts files compared to 11 mb ts files generated by javacv using this function

    public static void doConversions(File videoFile) {
        FFmpegFrameGrabber frameGrabber = new FFmpegFrameGrabber(videoFile);
        try {
            String name = videoFile.getName().split("\\.")[0];
            File file = new File(Paths.get(videoFile.getParentFile().getPath(), name).toString());
            file.mkdir();
            frameGrabber.start();
            Frame grab;
            FrameRecorder recorder = new FFmpegFrameRecorder(new File(file.getPath() + "/" + name + "index" + ".m3u8"), frameGrabber.getImageWidth(), frameGrabber.getImageHeight(), frameGrabber.getAudioChannels());
            recorder.setAspectRatio(frameGrabber.getAspectRatio());
            recorder.setFrameRate(frameGrabber.getFrameRate());
            recorder.setVideoCodec(avcodec.AV_CODEC_ID_H264);
            recorder.setAudioCodec(avcodec.AV_CODEC_ID_AAC);
            recorder.setOption("vf", "setdar=16:9");
            recorder.setOption("hls_time", "3");
            recorder.setOption("start_number", "0");
            recorder.setOption("hls_list_size", "0");
            recorder.setOption("f", "hls");
            recorder.setOption("level", "3.0");
            recorder.setOption("profile:v", "baseline");
            recorder.setOption("strict", "experimental");
            recorder.start();
            while ((grab = frameGrabber.grab()) != null) {
                recorder.record(grab);
            }
            recorder.stop();
            recorder.release();
            frameGrabber.stop();
        } catch (FrameGrabber.Exception | FrameRecorder.Exception ignored) {
            System.out.println(ignored.getMessage());
        }
    }
    

    i don't know why i'm got this result size can someone help me what is wrong with my code

  • ffmpeg can't concat movies from two different devices

    29 mars 2017, par T4ng10r


    I've got bunch of movies from two different Panasonic devices. As long as I concat movies from only ONE device - final movie is smooth.
    However, when I add movie clip from second device, right after final movie ends playing movies from first device it display audio and only still images from movie clip from other device.

    ffmpeg -f concat -i mylist.txt -c copy final_movie.MP4
    

    Example ffprobe:

    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'S6810001.MP4':
      Metadata:
        major_brand     : isom
        minor_version   : 512
        compatible_brands: isomiso2avc1mp41
        encoder         : Lavf57.27.100
      Duration: 00:00:10.62, start: 0.021333, bitrate: 1131 kb/s
        Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], 998 kb/s, 25 fps, 25 tbr, 12800 tbn, 50 tbc (default)
        Metadata:
          handler_name    : VideoHandler
        Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 132 kb/s (default)
        Metadata:
          handler_name    : SoundHandle
    

    Second device movie clip:

    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'a/T00004.mp4':
      Metadata:
        major_brand     : isom
        minor_version   : 512
        compatible_brands: isomiso2avc1mp41
        encoder         : Lavf57.27.100
      Duration: 00:00:33.18, start: 0.000000, bitrate: 1190 kb/s
        Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], 929 kb/s, 25 fps, 25 tbr, 12800 tbn, 50 tbc (default)
        Metadata:
          handler_name    : VideoHandler
        Stream #0:1(und): Audio: ac3 (ac-3 / 0x332D6361), 48000 Hz, stereo, fltp, 256 kb/s (default)
        Metadata:
          handler_name    : SoundHandler
        Side data:
          audio service type: main
    

    Why movie is still? How to prepare it so it could be joined correctly?

  • ffmpeg convert videos with same quality

    29 mars 2017, par How to

    I want to convert some videos ex.

    ffmpeg -i filename.mp4 -vcodec copy -acodec copy filename.avi

    ffmpeg -i filename.avi -vcodec copy -acodec copy filename.mp4

    ffmpeg -i filename.3gp -vcodec copy -acodec copy filename.flv

    ffmpeg -i filename.flv -vcodec copy -acodec copy filename.3gp

    My question: are these commands correct?

  • How do I enable FFMPEG logging and where can I find the FFMPEG log file ?

    29 mars 2017, par undefined

    I want to be able to log FFMPEG processes because I am trying to work out how long a minute of video takes to convert to help with capacity planning of my video encoding server. How do I enable logging and where is the log file saved. I have FFMPEG installed on a CentOS LAMP machine.

  • Android : Demux MP4 into video and audio ?

    29 mars 2017, par Jason Derulo

    I need to demux an MP4 file into video and audio to do some editing on the audio. I don't want to use FFMPEG, I've already attempted to use it once and it went horribly. How would I go about demuxing? From google searches, it seems like there isn't even a way to do it. Nothing ever comes up. I was thinking of converting an MP4 into an MP3, editing that and then adding that audio onto the original MP4 using MP4Parser, how can I edit the MP3? Absolutely any help is appreciated, I have no idea where to go from here.