Newest 'ffmpeg' Questions - Stack Overflow

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

Articles published on the website

  • ffmpeg - Invalid report file level (windows)

    24 October, by Pedro Lobito

    ffmpeg is giving me an error and I couldn't get much help googling it, besides a thread on ffmpeg mailing list dated 5 years ago which doesn't address the exact same problem.

    No matter which ffmpeg version or build for windows I use, the error is always:

    c:\>ffmpeg.exe
    Invalid report file level
    

    I've been using ffmpeg on the same computer for years and I've no idea where the problem started and how to debug it. Any help is welcome.


    Notes:

    1. No antivirus is running
    2. ffmpeg.exe is on windows path
    3. I've tried installing ffmpeg with choco install ffmpeg but it reports the same error.
  • Videos which don't play in Firefox: How to detect and how to fix?

    23 October, by Max Williams

    I have, as test cases, two mp4 videos: they seem to be encoded the same, but one works in Firefox and one doesn't:

    bad.mp4 (doesn't work) view download

    good.mp4 (does work) view download

    (NOTE - I thought that the "view" links above would open them using the browser's built-in player, but it looks like they use Dropbox's video player, which DOES work in firefox. So, to see it in firefox, download it and then drag it into Firefox or right click and choose Firefox from "open with" - thanks!)

    They both play in Chrome.

    There is a long discussion on the Mozilla bug tracking site about a related issue: https://bugzilla.mozilla.org/show_bug.cgi?id=1130450

    So, I need to answer three questions:

    1) What is the problem with bad.mp4?

    2) How can I detect, programmatically (ie at the linux command line) which videos, of a library of videos, are going to have this problem?

    3) How can I fix it, programmatically (eg with FFMPEG).

    One thing I noticed was that in the good one, the video is on stream 0 and the audio stream 1, while on the bad one it's the other way round. I tried swapping the streams but it didn't seem to help.

  • Transparency is gone while resizing (scaling) gif using ffmpeg

    23 October, by user3269550

    I am re-sizing gif images using ffmpeg. My problem is that the transparency of image is not coming while re-sizing. How can I achieve transparency while re-sizing it?

    My ffmpeg command is:

     ffmpeg -i input.gif-vf scale=320:240 output_converted_gif.gif
    
  • How to concatenate two or more videos with same width and different height in FFMpeg and to maintain the same aspect ratio?

    23 October, by Aarwil

    I have five video parts to concat all. Each five videos are in the same width and height. The second part is the hstack of another 2 videos and the third part is the hstack and vstack of another 3 videos. While concat all the five video parts the aspect ratio is not maintaining in the final video. Since I am new to ffmpeg help me to sort out the problem

    I have tried with the command in my final with filter complex and to reduce the size I used frame per second.

    "ffmpeg -i final.mp4 -vf scale=1280:480 -filter:v fps=fps=30 finalNew.mp4"

    but nothing worked. Also help me to use hstack with scaling, to maintain the aspect ratio for the second part on below command

    Command: ffmpeg -i vid1.mkv -i vid2.mkv -filter_complex "[0:v]scale=-1:480[v0];[0:v][1:v]hstack=inputs=2"vid3.mkv

    Images

    second part

    third part

    videochunks

  • FFMPEG generates an empty master playlist

    23 October, by Сергей Барахтенко

    I use the following FFMPEG command to generate playlists and a master-playlist for later insertion into a player with HLS support:

    ffmpeg/ffmpeg.exe -i input/test.mp4 
    -preset fast  
    -g 150 
    -sc_threshold 0 
    -threads 4 
    -map 0:v:0 -map 0:a:0 -map 0:v:0 -map 0:a:0 -map 0:v:0 -map 0:a:0 -map 0:v:0 -map 0:a:0 
    -filter:v:0 scale=h=240:w=-2  -minrate:v:0 75k  -maxrate:v:0 218k  -bufsize:v:0 300k -b:v:0 150k  
    -filter:v:1 scale=h=360:w=-2  -minrate:v:1 138k -maxrate:v:1 400k -bufsize:v:1 552k -b:v:1 276k 
    -filter:v:2 scale=h=480:w=-2 -minrate:v:2 375k -maxrate:v:2 1088k -bufsize:v:2 1500k -b:v:2 750k 
    -filter:v:3 scale=h=720:w=-2  -minrate:v:3 512k -maxrate:v:3 1485k -bufsize:v:3 2048k -b:v:3 1024k 
    -var_stream_map "v:0,a:0 v:1,a:1 v:2,a:2 v:3,a:3" 
    -master_pl_name master.m3u8 
    -f hls -hls_time 6 -segment_time 6 -hls_list_size 0 -segment_format mpegts 
    -hls_playlist_type vod -hls_segment_filename "output/conversion/K8eYn1X1/res-%v/segment-%d.ts"  output/conversion/K8eYn1X1/res-%v/playlist.m3u8 
    

    Based on information from various sources, this command line should do the following:

    1. take a video stream from the input file,

    2. apply filters with different settings four times,

    3. combine it into one stream,

    4. cut into TS-fragments for 6 seconds,

    5. write information about each resolution to the playlist.m3u8,

    6. create a master-playlist and write information about upcoming playlists in it

    Everything works correctly, BUT: fragments are created, playlists are created, but the master file is empty

    If you play with the command line, more precisely, leave only one filter, then everything works fine: and fragments are cut and playlists are created and a master-playlist is also created

    Also, I noticed that if I watched the folder in which all the files are stored, I noticed one thing: when using the command given above, a 7kb file is created, and then in the same second, it seems to be cleared . Why is this happening, I do not understand

    Upon completion of processing in the log, the last line:

    [hls @ 000001ff73b87200] Opening 'output/conversion/K8eYn1X1/master.m3u8' for writing
    

    Maybe I'm doing something wrong? Maybe the commands are in the wrong order? Tell me, who knows?

    Thanks