Recherche avancée

Médias (1)

Mot : - Tags -/musée

Autres articles (23)

  • Des sites réalisés avec MediaSPIP

    2 mai 2011, par

    Cette page présente quelques-uns des sites fonctionnant sous MediaSPIP.
    Vous pouvez bien entendu ajouter le votre grâce au formulaire en bas de page.

  • Participer à sa traduction

    10 avril 2011

    Vous pouvez nous aider à améliorer les locutions utilisées dans le logiciel ou à traduire celui-ci dans n’importe qu’elle nouvelle langue permettant sa diffusion à de nouvelles communautés linguistiques.
    Pour ce faire, on utilise l’interface de traduction de SPIP où l’ensemble des modules de langue de MediaSPIP sont à disposition. ll vous suffit de vous inscrire sur la liste de discussion des traducteurs pour demander plus d’informations.
    Actuellement MediaSPIP n’est disponible qu’en français et (...)

  • Librairies et logiciels spécifiques aux médias

    10 décembre 2010, par

    Pour un fonctionnement correct et optimal, plusieurs choses sont à prendre en considération.
    Il est important, après avoir installé apache2, mysql et php5, d’installer d’autres logiciels nécessaires dont les installations sont décrites dans les liens afférants. Un ensemble de librairies multimedias (x264, libtheora, libvpx) utilisées pour l’encodage et le décodage des vidéos et sons afin de supporter le plus grand nombre de fichiers possibles. Cf. : ce tutoriel ; FFMpeg avec le maximum de décodeurs et (...)

Sur d’autres sites (3970)

  • Capture JPEG frame from avi file using ffmpeg library. How to open captured files ?

    30 novembre 2013, par ios198

    This is the code I found from the ffmpeg tutorial website :

    #include <libavcodec></libavcodec>avcodec.h>
    #include <libavformat></libavformat>avformat.h>
    #include <libswscale></libswscale>swscale.h>
    #include
    void SaveFrame(AVFrame *pFrame, int width, int height, int iFrame) {
     FILE *pFile;
     char szFilename[32];
     int  y;

     // Open file
     sprintf(szFilename, "frame%d.ppm", iFrame); // szFilenam = frame4.ppm
     pFile=fopen(szFilename, "wb");
     if (pFile == NULL) {
      return;
       }
      //Write header
     fprintf(pFile, "P6\n%d %d\n255\n", width, height);

     // Write pixel data
     for(y=0; ydata[0]+y*pFrame->linesize[0], 1, width*3, pFile);

     // Close file
     fclose(pFile);
    }

    int main(int argc, char **argv[])
    {
       AVFormatContext *pFormatCtx = NULL;
       int             i, videoStream;
       AVCodecContext  *pCodecCtx = NULL;
       AVCodec         *pCodec = NULL;
       AVFrame         *pFrame = NULL;
       AVFrame         *pFrameRGB = NULL;
       AVPacket        packet;
       int             frameFinished;
       int             numBytes;
       uint8_t         *buffer = NULL;

       AVDictionary    *optionsDict = NULL;
       struct SwsContext      *sws_ctx = NULL;


       // Register all formats and codecs
       av_register_all();

       // Open video file
       if(avformat_open_input(&amp;pFormatCtx, "/root/dhquan/AVI/turning_pages.avi", NULL, NULL)!=0)
           return -1; // couldn&#39;t open file

       // Retrieve stream information
       if(avformat_find_stream_info(pFormatCtx,NULL)&lt;0)
           return -1; // couldn&#39;t find stream information
                      // This function populates pFormatCtx->streams with the proper

       // dump information about file onto standard error
       av_dump_format(pFormatCtx, 0, "/root/dhquan/AVI/turning_pages.avi", 0);

       // Find the first video stream
       videoStream = -1;
       for(i=0;inb_streams;i++)
           if(pFormatCtx->streams[i]->codec->codec_type==AVMEDIA_TYPE_VIDEO){
               videoStream=i;
               break;
           }
           if(videoStream==-1)
               return -1; // didn&#39;t find a video stream

       // Get a pointer to the codec context for the video stream
           pCodecCtx= pFormatCtx->streams[videoStream]->codec;

       // Find the decoder for the video stream
           pCodec=avcodec_find_decoder(pCodecCtx->codec_id);
           if(pCodec==NULL){
               fprintf(stderr,"Unsupported codec!\n");
               return -1;
           }

       // Open Codec
           if(avcodec_open2(pCodecCtx, pCodec, &amp;optionsDict)&lt;0)
               return -1; // Could not open codec

       // Allocate video frame
           pFrame = avcodec_alloc_frame();

       // Allocate an AVFrame structure
            pFrameRGB=avcodec_alloc_frame();
           if(pFrameRGB==NULL)
               return -1;
       // Determine required buffer size and allocate buffer
            numBytes=avpicture_get_size(PIX_FMT_RGB24, pCodecCtx->width,
                     pCodecCtx->height);
            buffer=(uint8_t *)av_malloc(numBytes*sizeof(uint8_t));

            sws_ctx =
            sws_getContext
       (
           pCodecCtx->width,
           pCodecCtx->height,
           pCodecCtx->pix_fmt,
           pCodecCtx->width,
           pCodecCtx->height,
           PIX_FMT_RGB24,
           SWS_BILINEAR,
           NULL,
           NULL,
           NULL
       );

     // Assign appropriate parts of buffer to image planes in pFrameRGB
     // Note that pFrameRGB is an AVFrame, but AVFrame is a superset
     // of AVPicture
     avpicture_fill((AVPicture *)pFrameRGB, buffer, PIX_FMT_RGB24,
            pCodecCtx->width, pCodecCtx->height);

     // Read frames and save first five frames to disk
     i=0;
     while(av_read_frame(pFormatCtx, &amp;packet)>=0) {
       // Is this a packet from the video stream?
       if(packet.stream_index==videoStream) {
         // Decode video frame
         avcodec_decode_video2(pCodecCtx, pFrame, &amp;frameFinished,
                  &amp;packet);

         // Did we get a video frame?
         if(frameFinished) {
       // Convert the image from its native format to RGB
           sws_scale
           (
               sws_ctx,
               (uint8_t const * const *)pFrame->data,
               pFrame->linesize,
               0,
               pCodecCtx->height,
               pFrameRGB->data,
               pFrameRGB->linesize
           );

       // Save the frame to disk
       if(++i&lt;=5)
         SaveFrame(pFrameRGB, pCodecCtx->width, pCodecCtx->height,
               i);
         }
       }

       // Free the packet that was allocated by av_read_frame
       av_free_packet(&amp;packet);
     }

     // Free the RGB image
     av_free(buffer);
     av_free(pFrameRGB);

     // Free the YUV frame
     av_free(pFrame);

     // Close the codec
     avcodec_close(pCodecCtx);

     // Close the video file
     avformat_close_input(&amp;pFormatCtx);

     return 0;
     //getch();
    }

    In line :
    sprintf(szFilename, "frame%d.ppm", iFrame) ;

    I changed into frame%d.jpg. It creates .jpg file in my folder. But I can't read it. How to open this file ? Please help me.

  • Could not find codec parameters for stream 0 (Video : hevc, none) : unspecified size

    5 avril 2020, par bzc0fq

    I try to use ffmpeg to feed ffserver on CENTOS 6.10. When I run ffmpeg on stream I got an error message : Could not find codec parameters for stream 0 (Video : h264, none) : unspecified size.

    &#xA;&#xA;

    The full ffmpeg output is here :

    &#xA;&#xA;

    [root@stone1 ~]# ffmpeg -i rtsp://user44:xxx@192.168.101.108:554/0 -y http://192.168.101.1:8090/feed2.ffm&#xA;ffmpeg version 2.6.8 Copyright (c) 2000-2016 the FFmpeg developers&#xA;  built with gcc 4.4.7 (GCC) 20120313 (Red Hat 4.4.7-16)&#xA;  configuration: --prefix=/usr --bindir=/usr/bin --datadir=/usr/share/ffmpeg --incdir=/usr/include/ffmpeg --libdir=/usr/lib64 --mandir=/usr/share/man --arch=x86_64 --optflags=&#x27;-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic&#x27; --enable-bzlib --disable-crystalhd --enable-gnutls --enable-ladspa --enable-libass --enable-libdc1394 --enable-libfaac --enable-nonfree --disable-indev=jack --enable-libfreetype --enable-libgsm --enable-libmp3lame --enable-openal --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libvorbis --enable-libv4l2 --enable-libx264 --enable-libx265 --enable-libxvid --enable-x11grab --enable-avfilter --enable-avresample --enable-postproc --enable-pthreads --disable-static --enable-shared --enable-gpl --disable-debug --disable-stripping --shlibdir=/usr/lib64 --enable-runtime-cpudetect&#xA;  libavutil      54. 20.100 / 54. 20.100&#xA;  libavcodec     56. 26.100 / 56. 26.100&#xA;  libavformat    56. 25.101 / 56. 25.101&#xA;  libavdevice    56.  4.100 / 56.  4.100&#xA;  libavfilter     5. 11.102 /  5. 11.102&#xA;  libavresample   2.  1.  0 /  2.  1.  0&#xA;  libswscale      3.  1.101 /  3.  1.101&#xA;  libswresample   1.  1.100 /  1.  1.100&#xA;  libpostproc    53.  3.100 / 53.  3.100&#xA;[rtsp @ 0x8bc780] Could not find codec parameters for stream 0 (Video: hevc, none): unspecified size&#xA;Consider increasing the value for the &#x27;analyzeduration&#x27; and &#x27;probesize&#x27; options&#xA;Guessed Channel Layout for  Input Stream #0.1 : mono&#xA;Input #0, rtsp, from &#x27;rtsp://user44:xxx@192.168.101.108:554/0&#x27;:&#xA;  Metadata:&#xA;    title           : h264.mp4&#xA;  Duration: 00:00:00.00, start: 0.000000, bitrate: N/A&#xA;    Stream #0:0: Video: hevc, none, 90k tbr, 90k tbn, 90k tbc&#xA;    Stream #0:1: Audio: pcm_mulaw, 8000 Hz, 1 channels, s16, 64 kb/s&#xA;[buffer @ 0x91c2e0] Unable to parse option value "0x0" as image size&#xA;[buffer @ 0x91c2e0] Unable to parse option value "-1" as pixel format&#xA;[buffer @ 0x91c2e0] Unable to parse option value "0x0" as image size&#xA;[buffer @ 0x91c2e0] Error setting option video_size to value 0x0.&#xA;[graph 0 input from stream 0:0 @ 0x8a0da0] Error applying options to the filter.&#xA;Error opening filters!&#xA;

    &#xA;&#xA;

    I tested the stream with vlc on windows and it looks it works fine.&#xA;VLC stream details

    &#xA;&#xA;

    Any hints on the issue ?

    &#xA;&#xA;


    &#xA;&#xA;

    UPDATE

    &#xA;&#xA;

    I have confirmed that the same issue remains on Windows and Linux ffmpeg ver. 4.2.2. Please find attached debug output bellow.

    &#xA;&#xA;

    D:\Temp\ffmpeg-4.2.2-win64-static\bin>ffmpeg -loglevel debug -i rtsp://userxx:xxx@192.168.101.108:554/0:0 -y http://192.168.101.1:8090/feed2.ffm&#xA;ffmpeg version 4.2.2 Copyright (c) 2000-2019 the FFmpeg developers&#xA;  built with gcc 9.2.1 (GCC) 20200122&#xA;  configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libdav1d --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx --enable-amf --enable-ffnvcodec --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth --enable-libopenmpt&#xA;  libavutil      56. 31.100 / 56. 31.100&#xA;  libavcodec     58. 54.100 / 58. 54.100&#xA;  libavformat    58. 29.100 / 58. 29.100&#xA;  libavdevice    58.  8.100 / 58.  8.100&#xA;  libavfilter     7. 57.100 /  7. 57.100&#xA;  libswscale      5.  5.100 /  5.  5.100&#xA;  libswresample   3.  5.100 /  3.  5.100&#xA;  libpostproc    55.  5.100 / 55.  5.100&#xA;Splitting the commandline.&#xA;Reading option &#x27;-loglevel&#x27; ... matched as option &#x27;loglevel&#x27; (set logging level) with argument &#x27;debug&#x27;.&#xA;Reading option &#x27;-i&#x27; ... matched as input url with argument &#x27;rtsp://userxx:xxx@192.168.101.108:554/0:0&#x27;.&#xA;Reading option &#x27;-y&#x27; ... matched as option &#x27;y&#x27; (overwrite output files) with argument &#x27;1&#x27;.&#xA;Reading option &#x27;http://192.168.101.1:8090/feed2.ffm&#x27; ... matched as output url.&#xA;Finished splitting the commandline.&#xA;Parsing a group of options: global .&#xA;Applying option loglevel (set logging level) with argument debug.&#xA;Applying option y (overwrite output files) with argument 1.&#xA;Successfully parsed a group of options.&#xA;Parsing a group of options: input url rtsp://userxx:xxx@192.168.101.108:554/0:0.&#xA;Successfully parsed a group of options.&#xA;Opening an input file: rtsp://userxx:xxx@192.168.101.108:554/0:0.&#xA;[tcp @ 000002426835b540] No default whitelist set&#xA;[tcp @ 000002426835b540] Original list of addresses:&#xA;[tcp @ 000002426835b540] Address 192.168.101.108 port 554&#xA;[tcp @ 000002426835b540] Interleaved list of addresses:&#xA;[tcp @ 000002426835b540] Address 192.168.101.108 port 554&#xA;[tcp @ 000002426835b540] Starting connection attempt to 192.168.101.108 port 554&#xA;[tcp @ 000002426835b540] Successfully connected to 192.168.101.108 port 554&#xA;[rtsp @ 0000024268358c40] SDP:&#xA;v=0&#xA;o=StreamingServer 3331435948 1116907222000 IN IP4 192.168.101.108&#xA;s=h264.mp4&#xA;c=IN IP4 0.0.0.0&#xA;t=0 0&#xA;a=control:*&#xA;m=video 0 RTP/AVP 96&#xA;a=control:trackID=0&#xA;a=rtpmap:96 H265/90000&#xA;a=ptime:40&#xA;a=range:npt=0-0&#xA;a=fmtp:96 packetization-mode=1; sprop-parameter-sets=(null)&#xA;a=videoinfo:960*576*30*4096&#xA;m=audio 0 RTP/AVP 0&#xA;a=control:trackID=1&#xA;a=rtpmap:0 PCMU/8000&#xA;a=ptime:20&#xA;&#xA;&#xA;[rtsp @ 0000024268358c40] video codec set to: hevc&#xA;[rtsp @ 0000024268358c40] audio codec set to: pcm_mulaw&#xA;[rtsp @ 0000024268358c40] audio samplerate set to: 8000&#xA;[rtsp @ 0000024268358c40] audio channels set to: 1&#xA;[rtp @ 000002426835bb00] No default whitelist set&#xA;[udp @ 000002426835f600] No default whitelist set&#xA;[udp @ 000002426835f600] &#x27;circular_buffer_size&#x27; option was set but it is not supported on this build (pthread support is required)&#xA;[udp @ 000002426835f600] end receive buffer size reported is 65536&#xA;[udp @ 000002426836f900] No default whitelist set&#xA;[udp @ 000002426836f900] &#x27;circular_buffer_size&#x27; option was set but it is not supported on this build (pthread support is required)&#xA;[udp @ 000002426836f900] end receive buffer size reported is 65536&#xA;[rtsp @ 0000024268358c40] setting jitter buffer size to 500&#xA;[rtp @ 00000242683804c0] No default whitelist set&#xA;[udp @ 0000024268380780] No default whitelist set&#xA;[udp @ 0000024268380780] &#x27;circular_buffer_size&#x27; option was set but it is not supported on this build (pthread support is required)&#xA;[udp @ 0000024268380780] end receive buffer size reported is 65536&#xA;[udp @ 0000024268390a80] No default whitelist set&#xA;[udp @ 0000024268390a80] &#x27;circular_buffer_size&#x27; option was set but it is not supported on this build (pthread support is required)&#xA;[udp @ 0000024268390a80] end receive buffer size reported is 65536&#xA;[rtsp @ 0000024268358c40] setting jitter buffer size to 500&#xA;[rtsp @ 0000024268358c40] hello state=0&#xA;[rtsp @ 0000024268358c40] Could not find codec parameters for stream 0 (Video: hevc, 1 reference frame, none): unspecified size&#xA;Consider increasing the value for the &#x27;analyzeduration&#x27; and &#x27;probesize&#x27; options&#xA;Guessed Channel Layout for Input Stream #0.1 : mono&#xA;Input #0, rtsp, from &#x27;rtsp://userxx:xxx@192.168.101.108:554/0:0&#x27;:&#xA;  Metadata:&#xA;    title           : h264.mp4&#xA;  Duration: 00:00:00.00, start: 0.000000, bitrate: N/A&#xA;    Stream #0:0, 0, 1/90000: Video: hevc, 1 reference frame, none, 90k tbr, 90k tbn, 90k tbc&#xA;    Stream #0:1, 0, 1/8000: Audio: pcm_mulaw, 8000 Hz, mono, s16, 64 kb/s&#xA;Successfully opened the file.&#xA;Parsing a group of options: output url http://192.168.101.1:8090/feed2.ffm.&#xA;Successfully parsed a group of options.&#xA;Opening an output file: http://192.168.101.1:8090/feed2.ffm.&#xA;[NULL @ 00000242683c85c0] Unable to find a suitable output format for &#x27;http://192.168.101.1:8090/feed2.ffm&#x27;&#xA;http://192.168.101.1:8090/feed2.ffm: Invalid argument&#xA;

    &#xA;&#xA;

    VLC works fine on the same Windows system.

    &#xA;&#xA;

    Any hints on this please ?

    &#xA;

  • cmake installation of x265 for ffmpeg on Cygwin - executable location different from other codecs

    12 mai 2020, par bballdave025

    TL ;DR (with expected vs. real)

    &#xA;&#xA;

    For a Cygwin build of ffmpeg, I'm installing x265, and it seems to me that the executable ends up in the wrong place. I'll show some basic directory structure, then I'll show the tree outputs for expected and real, both before and after the cmake installation. For directories where I think this is important, I'll show the outputs before and after the cmake installation.

    &#xA;&#xA;

    My question has two parts. I used the following cmake and make commands,

    &#xA;&#xA;

    # pwd => $HOME/programs/ffmpeg/ffmpeg_sources/x265/build/linux&#xA;PATH="$HOME/programs/ffmpeg/bin:$PATH" \&#xA;  cmake -G "Unix Makefiles" \&#xA;        -DCMAKE_INSTALL_PREFIX="$HOME/programs/ffmpeg/ffmpeg_build" \&#xA;        -DENABLE_SHARED=OFF \&#xA;        -DCMAKE_EXE_LINKER_FLAGS="-static" &#xA;            ../../source&#xA;PATH="$HOME/programs/ffmpeg/bin:$PATH" make -j $(nproc)&#xA;make install&#xA;

    &#xA;&#xA;

    The result is below, with my real vs. expected, and there is a more detailed, more explicit, and hopefully more clear file with the info at pastebin.com/86wHrtxR. Now, for my two-part question :

    &#xA;&#xA;

      &#xA;
    1. How can I change my cmake command so that my x265.exe file ends up in $HOME/programs/ffmpeg/bin with the proper linking, rather than $HOME/programs/ffmpeg/ffmpeg_build/bin ?

    2. &#xA;

    3. Would the build/linker/whatever figure things out for the ffmpeg build ?

    4. &#xA;

    &#xA;&#xA;

    I want to know the answer to question number 1 regardless of the answer to question number 2. I haven't used cmake with the -DVAR=var flags before, and I'd like to take this opportunity to learn.

    &#xA;&#xA;

    For the result :

    &#xA;&#xA;

    Things surrounded by double curly brackets are {{ expected }}.

    &#xA;&#xA;

    Things surrounded by double angle brackets are &lt;&lt; real >>, i.e. they exist after the installation is done.

    &#xA;&#xA;

    If real matches expected, and the file/directory is new, I've surrounded it by double parentheses, i.e. double round brackets. (( match ))

    &#xA;&#xA;

    If something is not new (and thus has the same before and after) I haven't marked it.

    &#xA;&#xA;

       me@MACHINE ~/programs/ffmpeg&#xA;   $ tree --charset=ascii bin&#xA;   bin&#xA;   |-- lame.exe&#xA;   |-- mp3rtp.exe&#xA;   |-- mp3x.exe&#xA;   `-- x264.exe&#xA;{{ `-- x265.exe                     }} ## Expected, not Exists&#xA;&#xA;   me@MACHINE ~/programs/ffmpeg&#xA;   $ tree --charset=ascii \&#xA;                   ffmpeg_build&#xA;   ffmpeg_build&#xA;&lt;&lt; |-- bin                          >> ## Not expected, Exists&#xA;&lt;&lt; |   `-- x265.exe                 >> ## Not expected, Exists&#xA;   |-- include&#xA;   |   |-- fdk-aac&#xA;   |   |   |-- aacdecoder_lib.h&#xA;   |   |   |-- aacenc_lib.h&#xA;   |   |   `-- ... <more files="files">&#xA;   |   |-- lame&#xA;   |   |   `-- lame.h&#xA;   |   |-- x264.h&#xA;   |   `-- x264_config.h&#xA;(( |   |-- x265.h                   )) ## Expected and Exists&#xA;(( |   `-- x265_config.h            )) ## Expected and Exists&#xA;   |-- lib&#xA;   |   |-- libfdk-aac.a&#xA;   |   |-- libfdk-aac.la&#xA;   |   |-- libmp3lame.a&#xA;   |   |-- libmp3lame.la&#xA;(( |   |-- libx265.a                )) ## Expected and Exists&#xA;   |   `-- pkgconfig&#xA;   |       |-- fdk-aac.pc&#xA;   |       `-- x264.pc&#xA;(( |       `-- x265.pc              )) ## Expected and Exists&#xA;   `-- share&#xA;       |-- doc&#xA;       |   ... <only lame="lame">&#xA;       `-- man&#xA;           ... <only lame="lame">&#xA;</only></only></more>

    &#xA;&#xA;

    Other, possibly useful information about the build directory structure.

    &#xA;&#xA;

    me@MACHINE ~/programs/ffmpeg&#xA;$ tree --charset=ascii -L 1 .&#xA;.&#xA;|-- bin&#xA;|-- ffmpeg_build&#xA;`-- ffmpeg_sources&#xA;&#xA;3 directories, 0 files&#xA;

    &#xA;&#xA;

    For this next, ffmpeg_sources dir, I'm showing the after (which is both expected and real/exists) surrounded by double parentheses, i.e. double round brackets, (( <after> ))</after>.

    &#xA;&#xA;

       me@MACHINE ~/programs/ffmpeg&#xA;   $ tree --charset=ascii -L 1 ffmpeg_sources&#xA;   ffmpeg_sources&#xA;   |-- fdk-aac.zip&#xA;   |-- lame-svn&#xA;   |-- mstorsjo-fdk-aac-e7d8591&#xA;   |-- x264-snapshot-20191217-2245&#xA;   |-- x264-snapshot-20191217-2245.tar.bz2&#xA;   `-- x264-snapshot-20191218-README.txt&#xA;(( `-- x265                         ))&#xA;&#xA;   3 directories, 3 files&#xA;(( 4 directories, 3 files ))&#xA;

    &#xA;&#xA;


    &#xA;&#xA;

    NOW, FOR SOME MORE DETAIL

    &#xA;&#xA;


    &#xA;&#xA;

    What I'm Doing

    &#xA;&#xA;

    I am working on a Cygwin build (vs. a Windows/mingw build) of ffmpeg. I am following an older guide by koohiimaster (archived). That guide says,

    &#xA;&#xA;

    &#xA;

    [W]e are not cross-compiling for windows ; we are compiling for Cygwin.

    &#xA;

    &#xA;&#xA;

    This 2014 guide doesn't have all of the codecs I want - I want as complete a build as possible - so I've also been referring to this ffmpeg-for-Ubuntu guide (archived), which I hope is kept up-to-date. It's referred to by koohiimaster.

    &#xA;&#xA;

    Also, as a way of checking that I'm getting all the codecs I want, I've been looking at this FFmpeg for Windows guide from SuperUser

    &#xA;&#xA;

    I'll give the basics of my steps below. More details, as well as all the output is at pastebin.com/suL1nU6Z.

    &#xA;&#xA;

    A look at directory structure for the build

    &#xA;&#xA;

    me@MACHINE ~/programs/ffmpeg&#xA;$ cd $HOME/programs/ffmpeg&#xA;&#xA;me@MACHINE ~/programs/ffmpeg&#xA;$ tree --charset=ascii -d -L 1&#xA;.&#xA;|-- bin&#xA;|-- ffmpeg_build&#xA;`-- ffmpeg_sources&#xA;&#xA;3 directories&#xA;

    &#xA;&#xA;

    Getting the source. Note that I had to apt-cyg install mercurial, though (with my Cygwin setup GUI/EXE in my Cygwin root directory, i.e. C:\cygwin64\setup-x86_64.exe), I could also have done /setup-x86_64.exe install -q -P mercurial.

    &#xA;&#xA;

    cd ffmpeg_sources&#xA;hg clone https://bitbucket.org/multicoreware/x265&#xA;

    &#xA;&#xA;

    Running the cmake and make commands

    &#xA;&#xA;

    cd x265/build/linux&#xA;PATH="$HOME/programs/ffmpeg/bin:$PATH" \&#xA;  cmake -G "Unix Makefiles" \&#xA;        -DCMAKE_INSTALL_PREFIX="$HOME/programs/ffmpeg/ffmpeg_build" \&#xA;        -DENABLE_SHARED=OFF \&#xA;        -DCMAKE_EXE_LINKER_FLAGS="-static" \&#xA;            ../../source&#xA;PATH="$HOME/programs/ffmpeg/bin:$PATH" make -j $(nproc)&#xA;make install&#xA;

    &#xA;&#xA;

    It was the last part (actually the very last line) of the make install output that worried me. Here is the whole output - it's not very long.

    &#xA;&#xA;

    make[1]: Entering directory &#x27;/home/me/programs/ffmpeg/ffmpeg_sources/x265/build/linux&#x27;&#xA;make[2]: Entering directory &#x27;/home/me/programs/ffmpeg/ffmpeg_sources/x265/build/linux&#x27;&#xA;make[2]: Leaving directory &#x27;/home/me/programs/ffmpeg/ffmpeg_sources/x265/build/linux&#x27;&#xA;[ 20%] Built target encoder&#xA;make[2]: Entering directory &#x27;/home/me/programs/ffmpeg/ffmpeg_sources/x265/build/linux&#x27;&#xA;make[2]: Leaving directory &#x27;/home/me/programs/ffmpeg/ffmpeg_sources/x265/build/linux&#x27;&#xA;[ 83%] Built target common&#xA;make[2]: Entering directory &#x27;/home/me/programs/ffmpeg/ffmpeg_sources/x265/build/linux&#x27;&#xA;make[2]: Leaving directory &#x27;/home/me/programs/ffmpeg/ffmpeg_sources/x265/build/linux&#x27;&#xA;[ 84%] Built target x265-static&#xA;make[2]: Entering directory &#x27;/home/me/programs/ffmpeg/ffmpeg_sources/x265/build/linux&#x27;&#xA;make[2]: Leaving directory &#x27;/home/me/programs/ffmpeg/ffmpeg_sources/x265/build/linux&#x27;&#xA;[100%] Built target cli&#xA;make[1]: Leaving directory &#x27;/home/me/programs/ffmpeg/ffmpeg_sources/x265/build/linux&#x27;&#xA;Install the project...&#xA;-- Install configuration: "Release"&#xA;-- Installing: /home/me/programs/ffmpeg/ffmpeg_build/lib/libx265.a&#xA;-- Installing: /home/me/programs/ffmpeg/ffmpeg_build/include/x265.h&#xA;-- Installing: /home/me/programs/ffmpeg/ffmpeg_build/include/x265_config.h&#xA;-- Installing: /home/me/programs/ffmpeg/ffmpeg_build/lib/pkgconfig/x265.pc&#xA;-- Installing: /home/me/programs/ffmpeg/ffmpeg_build/bin/x265.exe&#xA;

    &#xA;&#xA;

    As discussed in the TL ;DR section, I expected to see x265.exe at

    &#xA;&#xA;

    home/me/programs/ffmpeg/bin/x265.exe

    &#xA;&#xA;

    rather than the path given on the last line of output,

    &#xA;&#xA;

    /home/me/programs/ffmpeg/ffmpeg_build/bin/x265.exe

    &#xA;&#xA;

    This worries me especially because the first part of the ffmpeg install command that my instructions inform me to run is

    &#xA;&#xA;

    PATH="$HOME/programs/ffmpeg/bin:$PATH" \&#xA;PKG_CONFIG_PATH="$HOME/programs/ffmpeg/ffmpeg_build/lib/pkgconfig" \&#xA;  ./configure \&#xA;    --prefix="$HOME/programs/ffmpeg/ffmpeg_build" \&#xA;    --extra-cflags="-I$HOME/programs/ffmpeg/ffmpeg_build/include" \&#xA;    --extra-ldflags="-L$HOME/programs/ffmpeg/ffmpeg_build/lib" \&#xA;    --bindir="$HOME/programs/ffmpeg/bin" \&#xA;

    &#xA;&#xA;

    ... and on it goes ...

    &#xA;&#xA;

    It would seem to me that the .configure script for ffmpeg won't find the x265 executable, since it's not in the bindir.

    &#xA;&#xA;

    I'll repeat my two-part question from before :

    &#xA;&#xA;

      &#xA;
    1. How can I change my cmake command so that my x265.exe file ends up in $HOME/programs/ffmpeg/bin with the proper linking, rather than $HOME/programs/ffmpeg/ffmpeg_build/bin ?
    2. &#xA;

    &#xA;&#xA;

    What I'm looking for here is something akin to the --bindir flag from make's ./confiure.

    &#xA;&#xA;

      &#xA;
    1. Would the build/linker/whatever figure things out for the ffmpeg build ?
    2. &#xA;

    &#xA;&#xA;

    I want to know the answer to question number 1 regardless of the answer to question number 2. I haven't used cmake with the -DVAR=var flags before, and I'd like to take this opportunity to learn.

    &#xA;&#xA;


    &#xA;&#xA;

    Where I've Looked & What I've Tried

    &#xA;&#xA;

    I first started with the man page and the --help for cmake. That was scary. I was hoping that I'd find something useful around the CMAKE_INSTALL_PREFIX stuff, but I wasn't sure what to make of it.

    &#xA;&#xA;

    I tried greping through cmake --help-full (with 50 lines before and after whatever I was searching for), but got tripped up by the complexity. I've only used basic cmake stuff, before, and I got more than a little lost.

    &#xA;&#xA;

    Even with the --help, I don't know if I need to look at the help-manual, the help-command, the help-module, the help-policy, the help-variable, or something else.

    &#xA;&#xA;

    It seemed to me, in reading, that a "binary directory" is the top of the "build", whereas I thought it would be the dir named bin ... I couldn't tell what things were meant to be used by the person creating the package rather than by me, who am trying to make/build the package from the command line.

    &#xA;&#xA;

    I looked through what seemed to be a cmake wiki's Useful Variables page (archived), as well as at this thread at cmake.org (archived), which, along with this SO source and this and this and this and this SO sources, seemed to suggest using the CMAKE_RUNTIME_OUTPUT_DIRECTORY variable (since the EXECUTABLE_OUTPUT-DIRECTORY variable has been superseded by it). By the way, I couldn't tell which things should be used by the creator of the package vs. the consumer of the package - the consumer being me. I tried with

    &#xA;&#xA;

    PATH="$HOME/programs/ffmpeg/bin:$PATH" \&#xA;  cmake -G "Unix Makefiles" \&#xA;        -DCMAKE_INSTALL_PREFIX="$HOME/programs/ffmpeg/ffmpeg_build" \&#xA;        -DCMAKE_RUNTIME_OUTPUT_DIRECTORY="$HOME/programs/ffmpeg/bin" \&#xA;        -DENABLE_SHARED=OFF \&#xA;        -DCMAKE_EXE_LINKER_FLAGS="-static" &#xA;            ../../source&#xA;PATH="$HOME/&#xA;

    &#xA;&#xA;

    and have thought about fifty-or-so other -DVAR variables, but with any I have tried, I still get the same result. I still get the executable in what seems to be the wrong place.

    &#xA;&#xA;


    &#xA;&#xA;

    System Details

    &#xA;&#xA;

    $ date &amp;&amp; date &#x2B;&#x27;%s&#x27;&#xA;Tue, May  5, 2020 11:14:40 AM&#xA;1588698880&#xA;$ uname -a&#xA;CYGWIN_NT-10.0 MACHINE 3.1.4(0.340/5/3) 2020-02-19 08:49 x86_64 Cygwin&#xA;$ cmake --version&#xA;cmake version 3.14.5&#xA;&#xA;CMake suite maintained and supported by Kitware (kitware.com/cmake).&#xA;$ bash --version | head -n 1&#xA;GNU bash, version 4.4.12(3)-release (x86_64-unknown-cygwin)&#xA;$ gcc --version | head -n 1&#xA;gcc (GCC) 9.3.0&#xA;$ g&#x2B;&#x2B; --version | head -n 1&#xA;g&#x2B;&#x2B; (GCC) 9.3.0&#xA;$ make --version | head -n 2&#xA;GNU Make 4.3&#xA;Built for x86_64-pc-cygwin&#xA;

    &#xA;