<div dir="ltr"><div><div><div><div><div>Hello all,<br><br></div>I'm fairly new to using ffmpeg. Currently I'm trying to use ffmpeg within an Android application of mine to view a live rtsp stream with h264 endoded video. I've been using code from an ffmpeg and Android NDK tutorial (link below) to help me understand how to use it with Android.  Everything has been working out great, until I started trying to scale the output. When I try to scale at a ratio other than 1:1 (no scaling), I get a garbled up stream. I decided to run the tutorial to see if it was my code that was wrong, but I still ended up with the same mess. So I'm kind of lost as to how to fix this. Has anybody else had problems like this or know what I could be doing wrong? <br>

<br></div>Here's the tutorial: <a href="https://github.com/roman10/android-ffmpeg-tutorial/tree/master/android-ffmpeg-tutorial02">https://github.com/roman10/android-ffmpeg-tutorial/tree/master/android-ffmpeg-tutorial02</a><br>

</div><div><br>Native code (uses the ffmpeg library): <a href="https://github.com/roman10/android-ffmpeg-tutorial/blob/master/android-ffmpeg-tutorial02/jni/tutorial02.c">https://github.com/roman10/android-ffmpeg-tutorial/blob/master/android-ffmpeg-tutorial02/jni/tutorial02.c</a><br>

</div><div><br></div>Screenshot of my stream with no scaling: <a href="https://www.dropbox.com/s/s1e509yfmisfv7g/Screenshot_2014-06-20-09-42-42.png">https://www.dropbox.com/s/s1e509yfmisfv7g/Screenshot_2014-06-20-09-42-42.png</a><br>

<br>Screenshot of my stream scaled up: <a href="https://www.dropbox.com/s/e8h9039nw3sxaz2/Screenshot_2014-06-20-09-45-00.png">https://www.dropbox.com/s/e8h9039nw3sxaz2/Screenshot_2014-06-20-09-45-00.png</a><br><br>Screenshot of my stream scaled down: <a href="https://www.dropbox.com/s/yyjyuw3n7y1qaan/Screenshot_2014-06-20-10-09-48.png">https://www.dropbox.com/s/yyjyuw3n7y1qaan/Screenshot_2014-06-20-10-09-48.png</a><br>

<br></div>Thank You!<br></div>Ryan G<br></div>