title: Relocated ffmpeg example files fail
body: <p>I'm trying to use some ffmpeg calls in my own program, the basis of which I'm editing the ffmpeg example program remuxing.c. I'm trying to use some of the ffmpeg calls in my own program.</p>
  <p>I'm running Ubuntu 18.04.5 on a generic Linux box.</p>
  <p>To help better understand what I've done and where I've having problems, I'll out line what I've done and what is not working.</p>
  <p>Steps I've successfully completed:</p>
  <p>-- I've have downloaded the ffmpeg code base and example files</p>
  <p>-- Next I did a './configure', then 'make', then 'make install' and       'make examples' to make the libraries and examples</p>
  <p>-- I tested some of the examples and they ran fine from the default       install directory</p>
  <p>-- specifically, when I test remuxing.c in the original ffmpeg       downloaded dir — compile and run —  it works fine</p>
  <pre><code>    ./remuxing /data/iphone-h264.m4v /tmp/test15.ts
  </code></pre>
  <p>-- this creates a .ts output file that I can test and is readable by vlc</p>
  <p>Having ensured that I correctly compiled and tested ffmpeg source and its example files, I next move to working my own program based on the example remuxing.c</p>
  <p>— I copied the original remuxing.c into my own test directory structure</p>
  <p>— I make it by running this to link in the required ffmpeg libraries (I think)</p>
  <pre><code>    cc -DLINUX -o remuxing remuxing.c -I ../ffmpeg/libavformat -lavformat -I ../ffmpeg/libavcodec -lavcodec -I ../ffmpeg/libswresample -lswresample -I ../ffmpeg/libavutil -lavutil -lpthread -lm
  </code></pre>
  <p>— however when I try to generate a test16.ts file (to know it is different from the one I created before) I get an error:</p>
  <pre><code>    ./remuxing /data/iphone-h264.m4v /tmp/test16.ts
      Could not open input file '/data/iphone-h264.m4v’ Error occurred: Invalid data found when processing input
  </code></pre>
  <p>This is the exact same video file the same program converted from the installed doc/examples directory.</p>
  <p><strong>QUESTION</strong> — why is this happening — what am I doing wrong?</p>
  <p>I guess I may not be properly linking in the ffmpeg libraries?? -- but I'm not sure what I'm doing wrong.</p>
  <p>I can also post my makefiles if that would help.</p>
  <p>Would be most appreciative for any help -- thank you in advance.</p>