Newest 'ffmpeg' Questions - Stack Overflow

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

Les articles publiés sur le site

  • How do I configure ffmpeg & openh264 so that the video file can be opened in Windows Media Player 12

    10 mars 2017, par Sacha Guyer

    I have successfully created h264/mp4 movie files with ffmpeg and the x264 library.

    Now I would like to change the h264 library from x264 to openH264. I could replace the x264 library with openH264, recompile ffmpeg and produce movie files, without changing my sources that produce the movie. The resulting movie opens fine in Quicktime on Mac, but on Windows, Windows Media Player 12 cannot play it.

    The documentation about Windows Media Player support for h264 is unclear. File types supported by Windows Media Player states in the table that Windows Media Player 12 supports mp4, but the text below says:

    Windows Media Player does not support the playback of the .mp4 file format.

    From what I have observed, Windows Media Player 12 IS capable of playing h264/mp4 files, but only when created with x264.

    Does anyone know how I need to adjust the configuration of the codec/context so that the movie plays in Windows Media Player? Does Windows Media Player only support certain h264 profiles?

    I noticed the warning:

    [libopenh264 @ 0x...] [OpenH264] this = 0x..., Warning:bEnableFrameSkip = 0,bitrate can't be controlled for RC_QUALITY_MODE,RC_BITRATE_MODE and RC_TIMESTAMP_MODE without enabling skip frame

    With the configuration:

    av_dict_set(&options, "allow_skip_frames", "1", 0);
    

    I could get rid of this warning, but the movie still does not play. Are there other options that need to be set so that the movie plays in Windows Media Player?

    Thank you for your help

    ffprobe output of the file that does play fine in Windows Media Player:

    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'test_x264.mp4':
      Metadata:
        major_brand     : isom
        minor_version   : 512
        compatible_brands: isomiso2avc1mp41
        title           : retina
        encoder         : Lavf57.56.100
        comment         : Creation Date: 2017-03-10 07:47:39.601
      Duration: 00:00:04.17, start: 0.000000, bitrate: 17497 kb/s
        Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661),
          yuv420p, 852x754, 17495 kb/s, 24 fps, 24 tbr, 24k tbn, 48 tbc (default)
        Metadata:
          handler_name    : VideoHandler
    

    ffprobe output of the file that does not play in Windows Media Player:

    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'test_openh264.mp4':
      Metadata:
        major_brand     : isom
        minor_version   : 512
        compatible_brands: isomiso2avc1mp41
        title           : retina
        encoder         : Lavf57.56.100
        comment         : Creation Date: 2017-03-10 07:49:27.024
      Duration: 00:00:04.17, start: 0.000000, bitrate: 17781 kb/s
        Stream #0:0(und): Video: h264 (Constrained Baseline) (avc1 / 0x31637661),
          yuv420p, 852x754, 17779 kb/s, 24 fps, 24 tbr, 24k tbn, 48k tbc (default)
        Metadata:
          handler_name    : VideoHandler
    
  • ffmpeg copy stream preserving FPS

    10 mars 2017, par James Taylor

    I have a stream that I know is outputting at a certain frame rate (30 FPS). I want to use ffmpeg to make a copy of this stream and save it to disk.

    I have the following command:

    ffmpeg -i http://input/ -c copy -map 0 \
        -f segment -strftime 1 -segment_time 900 \
        -segment_atclocktime 1 -segment_format mp4 %Y-%m-%d_%H-%M-%S.mp4
    

    But when I run the command, I see the following:

    frame=   32 fps=3.9 q=-1.0 Lsize=N/A time=00:00:01.27 bitrate=N/A
    

    Where it appears the FPS is hovers around ~4.0 FPS and time moves slower than real time.

    I tried added -re (copy the rate of the input stream) and -r 30 (manually set the rate to 30 FPS) flag specified before the input file, but it didn't seem to work.

    I also read a similar question here using -framerate 30, but that option doesn't exist in the man pages and is an Invalid option.

    Any help would be greatly appreciated!


    So I let the modified command (removing the flags -c copy -map 0) run for exactly 5 minutes. Running ffprobe yields:

    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '2017-03-10_01-09-12.mp4':
      Metadata:
        major_brand     : isom
        minor_version   : 512
        compatible_brands: isomiso2avc1mp41
        encoder         : Lavf57.2.100
      Duration: 00:00:15.43, start: 0.066016, bitrate: 13416 kb/s
        Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuvj420p(pc), 1024x768, 13414 kb/s, 30 fps, 30 tbr, 15360 tbn, 60 tbc (default)
        Metadata:
          handler_name    : VideoHandler
    

    Again, this only produces 15 seconds of video and I can't seem to get a 1:1 relationship between the input stream of 30 FPS and an output stream also in 30 FPS in real time. Playing the video yields something that's sped up.

  • MLT Framework. Insert zoomin text on video

    10 mars 2017, par user2455079

    Need to achieve effect something like that: put zoomingIn text on video background (black with some animation) between other videos. Demo: https://www.dropbox.com/s/ehqwkjgu5u5e9rp/4%20Cultivar%20Road%20Brampton%2C%20Jessi%20Sandhu.mp4?dl=0

    Trying to make is using dynamictext and affine filter:

    "1.mp4" -mix 7 -mixer luma "2.mp4" -mix 7 -mixer luma "bg.mp4" -attach-clip dynamictext in=0 out=145 "text.txt" -attach-clip affine in=0 out=145 -attach-clip affine valign=middle halign=center scale=1 fill=1 geometry="0=10%,10%:80%x80%:0%;36=0,0:100%x100%:100%;109=-10%,-10%:120%x120%:100%;145=-10%,-10%:120%x120%:0%"
    

    But i have unexpected results with infinite video and no animation at all...

  • Video files are not opening for sample applications in Info Sphere Streams

    10 mars 2017, par Pavan Kumar

    I am new to IBM Info Sphere Streams, I read an article which says IBM Info Sphere streams is capable of doing Image processing. After some research I got to know that, we have to install OpenCV and FFMpeg lybraries with its dependecies. I have installed all of them and tried sample applications. I can run applications which contains Images as input, but when it comes to processing with videos it's not working. I am unable to use x11viewer operator as well. I am getting the following error while working with sample videos.

    (Streams com.ibm.streamsx.opencv::X11Viewer operator:7889): GLib-GObject-CRITICAL **: g_object_unref: assertion `G_IS_OBJECT (object)' failed
    28 Feb 2017 14:00:34.672 [7889] ERROR #splapptrc,J[0],P[0],vid0,spl_pe M[PEImpl.cpp:process:1270]  - CDISR5079E: An exception occurred during the processing of the processing element. The error is: Unable to open camera {0}. 
    

    I did not install any GPU device drivers here but when I used the following commands I am getting results like below,

    [streamsadmin@streamsqse output]$ lspci | grep VGA
    00:0f.0 VGA compatible controller: VMware SVGA II Adapter
    
    [streamsadmin@streamsqse output]$ find /dev -group video
    /dev/fb0
    /dev/dri/card0
    /dev/dri/renderD128
    /dev/dri/controlD64
    /dev/agpgart
    

    and

    glxinfo | grep -i vendor
    server glx vendor string: SGI
    client glx vendor string: Mesa Project and SGI
    OpenGL vendor string: VMware, Inc
    

    My doubt here is, whether I have installed GPU Drivers properly or do I need to install them again? Can anyone help me to resolve this issue.

    And I am unable to open those videos by using any player as well.

  • Generate fmp4 chunks for HLS with ffmpeg

    9 mars 2017, par genxstylez

    I am trying to generate fragmented MP4 as the chunks for HLS as introduced by apple last year.

    See link -> https://bitmovin.com/hls-news-wwdc-2016/

    Does ffmpeg supports this?

    Thanks!