Cannot Play Video Output of Libavcodec (ffmpeg) Encoding Example











up vote
0
down vote

favorite












From FFMPEG's GitHub, I use the encode_video.c to generate a 1 second video. Here is the example in question: https://github.com/FFmpeg/FFmpeg/blob/master/doc/examples/encode_video.c



I compile with: gcc -Wall -o ffencode encode_video.c -lavcodec -lavutil -lz -lm



Clean compile, zero warnings.



I test the program by running: ./ffencode video.mp4 libx264



Lots of stats printed out (expected based on source code) as well as ffmpeg logs, but ultimately no errors or warnings.



However, then the generated output video.mp4, can only be played by ffplay, and VLC Player (as well as Google Chrome) fail to play the video.



Playing it via vlc command line actually prints:



[00007ffd3550fec0] main libvlc: Running vlc with the default interface. Use 'cvlc' to use vlc without interface.
TagLib: MP4: Invalid atom size
TagLib: MP4: Invalid atom size
TagLib: MP4: Invalid atom size


Looking at ffprobe output, the bitrate and duration fields are empty:



Input #0, h264, from 'video.mp4':
Duration: N/A, bitrate: N/A
Stream #0:0: Video: h264 (High), yuv420p(progressive), 352x288, 25 fps, 25 tbr, 1200k tbn, 50 tbc


I am using ffmpeg 4.1 with the following configuration:



ffprobe version 4.1 Copyright (c) 2007-2018 the FFmpeg developers
built with Apple LLVM version 10.0.0 (clang-1000.11.45.5)
configuration: --prefix=/usr/local/Cellar/ffmpeg/4.1 --enable-shared --enable-pthreads --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-ffplay --enable-gpl --enable-libmp3lame --enable-libopus --enable-libsnappy --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-libxvid --enable-lzma --enable-opencl --enable-videotoolbox
libavutil 56. 22.100 / 56. 22.100
libavcodec 58. 35.100 / 58. 35.100
libavformat 58. 20.100 / 58. 20.100
libavdevice 58. 5.100 / 58. 5.100
libavfilter 7. 40.101 / 7. 40.101
libavresample 4. 0. 0 / 4. 0. 0
libswscale 5. 3.100 / 5. 3.100
libswresample 3. 3.100 / 3. 3.100
libpostproc 55. 3.100 / 55. 3.100


Any ideas how to fix this? It is pretty surprising to see an API's official example to be lacking such basic information.










share|improve this question




























    up vote
    0
    down vote

    favorite












    From FFMPEG's GitHub, I use the encode_video.c to generate a 1 second video. Here is the example in question: https://github.com/FFmpeg/FFmpeg/blob/master/doc/examples/encode_video.c



    I compile with: gcc -Wall -o ffencode encode_video.c -lavcodec -lavutil -lz -lm



    Clean compile, zero warnings.



    I test the program by running: ./ffencode video.mp4 libx264



    Lots of stats printed out (expected based on source code) as well as ffmpeg logs, but ultimately no errors or warnings.



    However, then the generated output video.mp4, can only be played by ffplay, and VLC Player (as well as Google Chrome) fail to play the video.



    Playing it via vlc command line actually prints:



    [00007ffd3550fec0] main libvlc: Running vlc with the default interface. Use 'cvlc' to use vlc without interface.
    TagLib: MP4: Invalid atom size
    TagLib: MP4: Invalid atom size
    TagLib: MP4: Invalid atom size


    Looking at ffprobe output, the bitrate and duration fields are empty:



    Input #0, h264, from 'video.mp4':
    Duration: N/A, bitrate: N/A
    Stream #0:0: Video: h264 (High), yuv420p(progressive), 352x288, 25 fps, 25 tbr, 1200k tbn, 50 tbc


    I am using ffmpeg 4.1 with the following configuration:



    ffprobe version 4.1 Copyright (c) 2007-2018 the FFmpeg developers
    built with Apple LLVM version 10.0.0 (clang-1000.11.45.5)
    configuration: --prefix=/usr/local/Cellar/ffmpeg/4.1 --enable-shared --enable-pthreads --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-ffplay --enable-gpl --enable-libmp3lame --enable-libopus --enable-libsnappy --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-libxvid --enable-lzma --enable-opencl --enable-videotoolbox
    libavutil 56. 22.100 / 56. 22.100
    libavcodec 58. 35.100 / 58. 35.100
    libavformat 58. 20.100 / 58. 20.100
    libavdevice 58. 5.100 / 58. 5.100
    libavfilter 7. 40.101 / 7. 40.101
    libavresample 4. 0. 0 / 4. 0. 0
    libswscale 5. 3.100 / 5. 3.100
    libswresample 3. 3.100 / 3. 3.100
    libpostproc 55. 3.100 / 55. 3.100


    Any ideas how to fix this? It is pretty surprising to see an API's official example to be lacking such basic information.










    share|improve this question


























      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      From FFMPEG's GitHub, I use the encode_video.c to generate a 1 second video. Here is the example in question: https://github.com/FFmpeg/FFmpeg/blob/master/doc/examples/encode_video.c



      I compile with: gcc -Wall -o ffencode encode_video.c -lavcodec -lavutil -lz -lm



      Clean compile, zero warnings.



      I test the program by running: ./ffencode video.mp4 libx264



      Lots of stats printed out (expected based on source code) as well as ffmpeg logs, but ultimately no errors or warnings.



      However, then the generated output video.mp4, can only be played by ffplay, and VLC Player (as well as Google Chrome) fail to play the video.



      Playing it via vlc command line actually prints:



      [00007ffd3550fec0] main libvlc: Running vlc with the default interface. Use 'cvlc' to use vlc without interface.
      TagLib: MP4: Invalid atom size
      TagLib: MP4: Invalid atom size
      TagLib: MP4: Invalid atom size


      Looking at ffprobe output, the bitrate and duration fields are empty:



      Input #0, h264, from 'video.mp4':
      Duration: N/A, bitrate: N/A
      Stream #0:0: Video: h264 (High), yuv420p(progressive), 352x288, 25 fps, 25 tbr, 1200k tbn, 50 tbc


      I am using ffmpeg 4.1 with the following configuration:



      ffprobe version 4.1 Copyright (c) 2007-2018 the FFmpeg developers
      built with Apple LLVM version 10.0.0 (clang-1000.11.45.5)
      configuration: --prefix=/usr/local/Cellar/ffmpeg/4.1 --enable-shared --enable-pthreads --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-ffplay --enable-gpl --enable-libmp3lame --enable-libopus --enable-libsnappy --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-libxvid --enable-lzma --enable-opencl --enable-videotoolbox
      libavutil 56. 22.100 / 56. 22.100
      libavcodec 58. 35.100 / 58. 35.100
      libavformat 58. 20.100 / 58. 20.100
      libavdevice 58. 5.100 / 58. 5.100
      libavfilter 7. 40.101 / 7. 40.101
      libavresample 4. 0. 0 / 4. 0. 0
      libswscale 5. 3.100 / 5. 3.100
      libswresample 3. 3.100 / 3. 3.100
      libpostproc 55. 3.100 / 55. 3.100


      Any ideas how to fix this? It is pretty surprising to see an API's official example to be lacking such basic information.










      share|improve this question















      From FFMPEG's GitHub, I use the encode_video.c to generate a 1 second video. Here is the example in question: https://github.com/FFmpeg/FFmpeg/blob/master/doc/examples/encode_video.c



      I compile with: gcc -Wall -o ffencode encode_video.c -lavcodec -lavutil -lz -lm



      Clean compile, zero warnings.



      I test the program by running: ./ffencode video.mp4 libx264



      Lots of stats printed out (expected based on source code) as well as ffmpeg logs, but ultimately no errors or warnings.



      However, then the generated output video.mp4, can only be played by ffplay, and VLC Player (as well as Google Chrome) fail to play the video.



      Playing it via vlc command line actually prints:



      [00007ffd3550fec0] main libvlc: Running vlc with the default interface. Use 'cvlc' to use vlc without interface.
      TagLib: MP4: Invalid atom size
      TagLib: MP4: Invalid atom size
      TagLib: MP4: Invalid atom size


      Looking at ffprobe output, the bitrate and duration fields are empty:



      Input #0, h264, from 'video.mp4':
      Duration: N/A, bitrate: N/A
      Stream #0:0: Video: h264 (High), yuv420p(progressive), 352x288, 25 fps, 25 tbr, 1200k tbn, 50 tbc


      I am using ffmpeg 4.1 with the following configuration:



      ffprobe version 4.1 Copyright (c) 2007-2018 the FFmpeg developers
      built with Apple LLVM version 10.0.0 (clang-1000.11.45.5)
      configuration: --prefix=/usr/local/Cellar/ffmpeg/4.1 --enable-shared --enable-pthreads --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-ffplay --enable-gpl --enable-libmp3lame --enable-libopus --enable-libsnappy --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-libxvid --enable-lzma --enable-opencl --enable-videotoolbox
      libavutil 56. 22.100 / 56. 22.100
      libavcodec 58. 35.100 / 58. 35.100
      libavformat 58. 20.100 / 58. 20.100
      libavdevice 58. 5.100 / 58. 5.100
      libavfilter 7. 40.101 / 7. 40.101
      libavresample 4. 0. 0 / 4. 0. 0
      libswscale 5. 3.100 / 5. 3.100
      libswresample 3. 3.100 / 3. 3.100
      libpostproc 55. 3.100 / 55. 3.100


      Any ideas how to fix this? It is pretty surprising to see an API's official example to be lacking such basic information.







      c video ffmpeg video-encoding libavcodec






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Nov 15 at 23:50

























      asked Nov 15 at 22:46









      user3707763

      315




      315
























          2 Answers
          2






          active

          oldest

          votes

















          up vote
          0
          down vote













          The example generates a raw bitstream - it is not a MP4. The example is only meant to demonstrate encoding, not muxing (the term for packaging one or more streams into a container file format like MP4).



          Rename extension to .h264 and test with VLC. No idea if Chrome supports raw .h264 files.



          To generate MP4 from this output, run



          ffmpeg -i video.mp4 -c copy actually.mp4





          share|improve this answer





















          • Maybe I should have clarified more - I am looking for a way to achieve this via libavcodec i.e. a C program. Basically I want to know what the example code is missing. Encoding with the ffmpeg CLI is trivial, comparatively.
            – user3707763
            Nov 16 at 6:16










          • My ffmpeg command isn't encoding - it's muxing. See github.com/FFmpeg/FFmpeg/blob/master/doc/examples/muxing.c which does both encoding and muxing afterwards.
            – Gyan
            Nov 16 at 6:23












          • Never said your command was encoding. I was saying that if I wanted to use the CLI to resolve this, I would have done the encoding in that fashion as well. In case it needs more clarification: the encode_video.c example is missing something that makes the video playable. I am looking for that "something" in libavcodec.
            – user3707763
            Nov 16 at 19:05












          • Video is playable - libavcodec can only encode and so it generates a raw bitstream, and so you need to give the output an extension of h264 if encoder is libx264. MP4 is a container which requires muxing carried out by libavformat. ffplay doesn't care much about the input extension. VLC surprisingly does.
            – Gyan
            Nov 16 at 19:33




















          up vote
          0
          down vote













          You will need to perform muxing of your video stream into video container, such as .mp4. Muxing stuff is kept in libavformat. Algorithm should go like this:




          • Initialize format library by invoking av_register_all or manually registering formats of interests.

          • Create muxing context by invoking avformat_alloc_context

          • Create one or more media streams by invoking avformat_new_stream

          • Write header by invoking avformat_write_header

          • Write media data by invoking av_write_frame

          • Write trailer by invoking av_write_trailer

          • Destroy muxing context by invoking avformat_free_context






          share|improve this answer





















            Your Answer






            StackExchange.ifUsing("editor", function () {
            StackExchange.using("externalEditor", function () {
            StackExchange.using("snippets", function () {
            StackExchange.snippets.init();
            });
            });
            }, "code-snippets");

            StackExchange.ready(function() {
            var channelOptions = {
            tags: "".split(" "),
            id: "1"
            };
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function() {
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled) {
            StackExchange.using("snippets", function() {
            createEditor();
            });
            }
            else {
            createEditor();
            }
            });

            function createEditor() {
            StackExchange.prepareEditor({
            heartbeatType: 'answer',
            convertImagesToLinks: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            imageUploader: {
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            },
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            });


            }
            });














            draft saved

            draft discarded


















            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53328946%2fcannot-play-video-output-of-libavcodec-ffmpeg-encoding-example%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            2 Answers
            2






            active

            oldest

            votes








            2 Answers
            2






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes








            up vote
            0
            down vote













            The example generates a raw bitstream - it is not a MP4. The example is only meant to demonstrate encoding, not muxing (the term for packaging one or more streams into a container file format like MP4).



            Rename extension to .h264 and test with VLC. No idea if Chrome supports raw .h264 files.



            To generate MP4 from this output, run



            ffmpeg -i video.mp4 -c copy actually.mp4





            share|improve this answer





















            • Maybe I should have clarified more - I am looking for a way to achieve this via libavcodec i.e. a C program. Basically I want to know what the example code is missing. Encoding with the ffmpeg CLI is trivial, comparatively.
              – user3707763
              Nov 16 at 6:16










            • My ffmpeg command isn't encoding - it's muxing. See github.com/FFmpeg/FFmpeg/blob/master/doc/examples/muxing.c which does both encoding and muxing afterwards.
              – Gyan
              Nov 16 at 6:23












            • Never said your command was encoding. I was saying that if I wanted to use the CLI to resolve this, I would have done the encoding in that fashion as well. In case it needs more clarification: the encode_video.c example is missing something that makes the video playable. I am looking for that "something" in libavcodec.
              – user3707763
              Nov 16 at 19:05












            • Video is playable - libavcodec can only encode and so it generates a raw bitstream, and so you need to give the output an extension of h264 if encoder is libx264. MP4 is a container which requires muxing carried out by libavformat. ffplay doesn't care much about the input extension. VLC surprisingly does.
              – Gyan
              Nov 16 at 19:33

















            up vote
            0
            down vote













            The example generates a raw bitstream - it is not a MP4. The example is only meant to demonstrate encoding, not muxing (the term for packaging one or more streams into a container file format like MP4).



            Rename extension to .h264 and test with VLC. No idea if Chrome supports raw .h264 files.



            To generate MP4 from this output, run



            ffmpeg -i video.mp4 -c copy actually.mp4





            share|improve this answer





















            • Maybe I should have clarified more - I am looking for a way to achieve this via libavcodec i.e. a C program. Basically I want to know what the example code is missing. Encoding with the ffmpeg CLI is trivial, comparatively.
              – user3707763
              Nov 16 at 6:16










            • My ffmpeg command isn't encoding - it's muxing. See github.com/FFmpeg/FFmpeg/blob/master/doc/examples/muxing.c which does both encoding and muxing afterwards.
              – Gyan
              Nov 16 at 6:23












            • Never said your command was encoding. I was saying that if I wanted to use the CLI to resolve this, I would have done the encoding in that fashion as well. In case it needs more clarification: the encode_video.c example is missing something that makes the video playable. I am looking for that "something" in libavcodec.
              – user3707763
              Nov 16 at 19:05












            • Video is playable - libavcodec can only encode and so it generates a raw bitstream, and so you need to give the output an extension of h264 if encoder is libx264. MP4 is a container which requires muxing carried out by libavformat. ffplay doesn't care much about the input extension. VLC surprisingly does.
              – Gyan
              Nov 16 at 19:33















            up vote
            0
            down vote










            up vote
            0
            down vote









            The example generates a raw bitstream - it is not a MP4. The example is only meant to demonstrate encoding, not muxing (the term for packaging one or more streams into a container file format like MP4).



            Rename extension to .h264 and test with VLC. No idea if Chrome supports raw .h264 files.



            To generate MP4 from this output, run



            ffmpeg -i video.mp4 -c copy actually.mp4





            share|improve this answer












            The example generates a raw bitstream - it is not a MP4. The example is only meant to demonstrate encoding, not muxing (the term for packaging one or more streams into a container file format like MP4).



            Rename extension to .h264 and test with VLC. No idea if Chrome supports raw .h264 files.



            To generate MP4 from this output, run



            ffmpeg -i video.mp4 -c copy actually.mp4






            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered Nov 16 at 5:17









            Gyan

            30.4k22567




            30.4k22567












            • Maybe I should have clarified more - I am looking for a way to achieve this via libavcodec i.e. a C program. Basically I want to know what the example code is missing. Encoding with the ffmpeg CLI is trivial, comparatively.
              – user3707763
              Nov 16 at 6:16










            • My ffmpeg command isn't encoding - it's muxing. See github.com/FFmpeg/FFmpeg/blob/master/doc/examples/muxing.c which does both encoding and muxing afterwards.
              – Gyan
              Nov 16 at 6:23












            • Never said your command was encoding. I was saying that if I wanted to use the CLI to resolve this, I would have done the encoding in that fashion as well. In case it needs more clarification: the encode_video.c example is missing something that makes the video playable. I am looking for that "something" in libavcodec.
              – user3707763
              Nov 16 at 19:05












            • Video is playable - libavcodec can only encode and so it generates a raw bitstream, and so you need to give the output an extension of h264 if encoder is libx264. MP4 is a container which requires muxing carried out by libavformat. ffplay doesn't care much about the input extension. VLC surprisingly does.
              – Gyan
              Nov 16 at 19:33




















            • Maybe I should have clarified more - I am looking for a way to achieve this via libavcodec i.e. a C program. Basically I want to know what the example code is missing. Encoding with the ffmpeg CLI is trivial, comparatively.
              – user3707763
              Nov 16 at 6:16










            • My ffmpeg command isn't encoding - it's muxing. See github.com/FFmpeg/FFmpeg/blob/master/doc/examples/muxing.c which does both encoding and muxing afterwards.
              – Gyan
              Nov 16 at 6:23












            • Never said your command was encoding. I was saying that if I wanted to use the CLI to resolve this, I would have done the encoding in that fashion as well. In case it needs more clarification: the encode_video.c example is missing something that makes the video playable. I am looking for that "something" in libavcodec.
              – user3707763
              Nov 16 at 19:05












            • Video is playable - libavcodec can only encode and so it generates a raw bitstream, and so you need to give the output an extension of h264 if encoder is libx264. MP4 is a container which requires muxing carried out by libavformat. ffplay doesn't care much about the input extension. VLC surprisingly does.
              – Gyan
              Nov 16 at 19:33


















            Maybe I should have clarified more - I am looking for a way to achieve this via libavcodec i.e. a C program. Basically I want to know what the example code is missing. Encoding with the ffmpeg CLI is trivial, comparatively.
            – user3707763
            Nov 16 at 6:16




            Maybe I should have clarified more - I am looking for a way to achieve this via libavcodec i.e. a C program. Basically I want to know what the example code is missing. Encoding with the ffmpeg CLI is trivial, comparatively.
            – user3707763
            Nov 16 at 6:16












            My ffmpeg command isn't encoding - it's muxing. See github.com/FFmpeg/FFmpeg/blob/master/doc/examples/muxing.c which does both encoding and muxing afterwards.
            – Gyan
            Nov 16 at 6:23






            My ffmpeg command isn't encoding - it's muxing. See github.com/FFmpeg/FFmpeg/blob/master/doc/examples/muxing.c which does both encoding and muxing afterwards.
            – Gyan
            Nov 16 at 6:23














            Never said your command was encoding. I was saying that if I wanted to use the CLI to resolve this, I would have done the encoding in that fashion as well. In case it needs more clarification: the encode_video.c example is missing something that makes the video playable. I am looking for that "something" in libavcodec.
            – user3707763
            Nov 16 at 19:05






            Never said your command was encoding. I was saying that if I wanted to use the CLI to resolve this, I would have done the encoding in that fashion as well. In case it needs more clarification: the encode_video.c example is missing something that makes the video playable. I am looking for that "something" in libavcodec.
            – user3707763
            Nov 16 at 19:05














            Video is playable - libavcodec can only encode and so it generates a raw bitstream, and so you need to give the output an extension of h264 if encoder is libx264. MP4 is a container which requires muxing carried out by libavformat. ffplay doesn't care much about the input extension. VLC surprisingly does.
            – Gyan
            Nov 16 at 19:33






            Video is playable - libavcodec can only encode and so it generates a raw bitstream, and so you need to give the output an extension of h264 if encoder is libx264. MP4 is a container which requires muxing carried out by libavformat. ffplay doesn't care much about the input extension. VLC surprisingly does.
            – Gyan
            Nov 16 at 19:33














            up vote
            0
            down vote













            You will need to perform muxing of your video stream into video container, such as .mp4. Muxing stuff is kept in libavformat. Algorithm should go like this:




            • Initialize format library by invoking av_register_all or manually registering formats of interests.

            • Create muxing context by invoking avformat_alloc_context

            • Create one or more media streams by invoking avformat_new_stream

            • Write header by invoking avformat_write_header

            • Write media data by invoking av_write_frame

            • Write trailer by invoking av_write_trailer

            • Destroy muxing context by invoking avformat_free_context






            share|improve this answer

























              up vote
              0
              down vote













              You will need to perform muxing of your video stream into video container, such as .mp4. Muxing stuff is kept in libavformat. Algorithm should go like this:




              • Initialize format library by invoking av_register_all or manually registering formats of interests.

              • Create muxing context by invoking avformat_alloc_context

              • Create one or more media streams by invoking avformat_new_stream

              • Write header by invoking avformat_write_header

              • Write media data by invoking av_write_frame

              • Write trailer by invoking av_write_trailer

              • Destroy muxing context by invoking avformat_free_context






              share|improve this answer























                up vote
                0
                down vote










                up vote
                0
                down vote









                You will need to perform muxing of your video stream into video container, such as .mp4. Muxing stuff is kept in libavformat. Algorithm should go like this:




                • Initialize format library by invoking av_register_all or manually registering formats of interests.

                • Create muxing context by invoking avformat_alloc_context

                • Create one or more media streams by invoking avformat_new_stream

                • Write header by invoking avformat_write_header

                • Write media data by invoking av_write_frame

                • Write trailer by invoking av_write_trailer

                • Destroy muxing context by invoking avformat_free_context






                share|improve this answer












                You will need to perform muxing of your video stream into video container, such as .mp4. Muxing stuff is kept in libavformat. Algorithm should go like this:




                • Initialize format library by invoking av_register_all or manually registering formats of interests.

                • Create muxing context by invoking avformat_alloc_context

                • Create one or more media streams by invoking avformat_new_stream

                • Write header by invoking avformat_write_header

                • Write media data by invoking av_write_frame

                • Write trailer by invoking av_write_trailer

                • Destroy muxing context by invoking avformat_free_context







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Nov 19 at 23:54









                VTT

                23.7k42345




                23.7k42345






























                    draft saved

                    draft discarded




















































                    Thanks for contributing an answer to Stack Overflow!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid



                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.


                    To learn more, see our tips on writing great answers.





                    Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


                    Please pay close attention to the following guidance:


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid



                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.


                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function () {
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53328946%2fcannot-play-video-output-of-libavcodec-ffmpeg-encoding-example%23new-answer', 'question_page');
                    }
                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    Costa Masnaga

                    Fotorealismo

                    Sidney Franklin