Closed GoogleCodeExporter closed 8 years ago
Comment by tanu.batra, Today (2 hours ago)
Hi Yonas
We have appled the patch ffmpeg4iphone-svn-2009-30-01-v0.0.4.patch on the
released
SVN code -r16838. There were some unsuccesful merges, but we merged the rejected
files manually and were able to build the libraries. However, MPEG4 decoded
data is
GARBLED and shows green patches in the output video. WE ARE REALLY STUCK
BECAUSE OF
THIS! ANY CLUE! PLEASE HELP!!
Tavneet Batra
Original comment by yonas.ya...@gmail.com
on 3 Feb 2009 at 5:47
I just tested with -r16838, but didn't get any rejections. Could you find out
why
there were rejections? What commands did you use to get checkout from SVN?
Original comment by yonas.ya...@gmail.com
on 3 Feb 2009 at 5:53
Hi Yonas
I used the following command :
patch -p4 -i /ffmpeg4iphone-svn-2009-30-01-v0.0.4.patch
and the output is:
patching file ffmpeg.c
Hunk #1 FAILED at 308.
1 out of 1 hunk FAILED -- saving rejects to file ffmpeg.c.rej
patching file libavcodec/arm/asm.S
patching file libavcodec/arm/dsputil_arm_s.S
Hunk #1 FAILED at 22.
Hunk #2 FAILED at 36.
Hunk #3 FAILED at 148.
Hunk #4 FAILED at 200.
Hunk #5 FAILED at 209.
Hunk #6 FAILED at 262.
Hunk #7 FAILED at 273.
Hunk #8 FAILED at 326.
Hunk #9 FAILED at 340.
Hunk #10 FAILED at 431.
Hunk #11 FAILED at 444.
Hunk #12 FAILED at 535.
Hunk #13 FAILED at 547.
Hunk #14 FAILED at 617.
Hunk #15 FAILED at 633.
Hunk #16 FAILED at 646.
Hunk #17 FAILED at 663.
Hunk #18 FAILED at 758.
18 out of 18 hunks FAILED -- saving rejects to file
libavcodec/arm/dsputil_arm_s.S.rej
patching file libavcodec/arm/dsputil_vfp.S
patching file libavcodec/arm/jrevdct_arm.S
Hunk #1 FAILED at 57.
Hunk #2 FAILED at 84.
Hunk #3 FAILED at 391.
3 out of 3 hunks FAILED -- saving rejects to file
libavcodec/arm/jrevdct_arm.S.rej
patching file libavcodec/arm/simple_idct_arm.S
Hunk #1 FAILED at 56.
Hunk #2 FAILED at 81.
Hunk #3 FAILED at 490.
3 out of 3 hunks FAILED -- saving rejects to file
libavcodec/arm/simple_idct_arm.S.rej
patching file libavcodec/arm/simple_idct_armv6.S
patching file libavutil/internal.h
Hunk #1 FAILED at 141.
1 out of 1 hunk FAILED -- saving rejects to file libavutil/internal.h.rej
Original comment by tanu.ba...@gmail.com
on 3 Feb 2009 at 6:54
I could still go ahead with a manual merge but my real problem is the GARBLED
decoded output. Do you have
any idea why this is happening? Its really urgent!
Original comment by tanu.ba...@gmail.com
on 3 Feb 2009 at 6:56
If we correct the patch problem, then you might not get the garbled output. You
used
patch -p4 -i /ffmpeg4iphone-svn-2009-30-01-v0.0.4.patch
to patch the code, but what command did you use to checkout the code from SVN?
Original comment by yonas.ya...@gmail.com
on 3 Feb 2009 at 7:00
I used the same command that you suggested
svn checkout svn://svn.ffmpeg.org/ffmpeg/trunk -r16838 ffmpeg
Original comment by tanu.ba...@gmail.com
on 3 Feb 2009 at 7:07
what do you suggest now?
Original comment by tanu.ba...@gmail.com
on 3 Feb 2009 at 7:10
I guess there was a problem in the check put initially.I checked it out on a
WINDOWS machine. Now I am using a
MAC and I have applied the patch .I havent found any rejects at all!
I am building the libraries now and will be using them in my application. I
hope I dont get the garbled output
now. Yonas, please stick around in case I need help.
Original comment by tanu.ba...@gmail.com
on 3 Feb 2009 at 7:15
Hi Yonas
I still get to see garbled output in the decoded video. Cant really trace why
this is happening. I will really
appreciate if you could tell me something
Original comment by tanu.ba...@gmail.com
on 3 Feb 2009 at 7:32
Hmm, it might also be a problem with the unpatched ffmpeg. Try -r16838 again,
but
unpatched.
Original comment by yonas.ya...@gmail.com
on 3 Feb 2009 at 7:39
I guess this unpatched code will not compile with the configure that you have
suggested because it has to be
modified for ARM. What configure do you suggest to use with the unpatched code?
Original comment by tanu.ba...@gmail.com
on 3 Feb 2009 at 7:43
If you're on Mac OSX, try:
/configure --target-os=darwin --disable-shared --enable-static --disable-vhook
--disable-mmx --disable-iwmmxt --enable-gpl --enable-postproc --disable-debug
--disable-stripping --enable-avfilter --enable-swscale --enable-avfilter
--enable-avfilter-lavf
Original comment by yonas.ya...@gmail.com
on 3 Feb 2009 at 7:47
I am using this configuration
./configure --enable-cross-compile --target-os=darwin --
cc=/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/arm-apple-darwin9-gc
c-4.0.1 --extra-
cflags="-arch armv6 -pipe -miphoneos-version-min=2.0 -isysroot
/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS2.1.sdk -
I/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS2.1.sdk/usr/inclu
de/gcc/darwin/4.0"
arch=armv6 --extra-ldflags="-
L/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/IphoneOS2.1.sdk/usr/lib"
--prefix=./bin --
disable-shared --enable-static --disable-vhook --disable-mmx --disable-iwmmxt
--disable-armvfp --
enable-gpl --enable-postproc --disable-armv5te --disable-armv6 --disable-debug
--disable-stripping
--enable-avfilter --enable-swscale --disable-vhook --enable-avfilter
--enable-avfilter-lavf
Original comment by tanu.ba...@gmail.com
on 3 Feb 2009 at 7:56
Without using the patch, that won't work.
Original comment by yonas.ya...@gmail.com
on 3 Feb 2009 at 8:01
I can compile the entire code - except ffmpeg.c. And I changed that single line
in the file that threw the error. I
can compile the entire code now. What problem do you think I can face?
Original comment by tanu.ba...@gmail.com
on 3 Feb 2009 at 8:07
Hi Yonas
I had the same result as Tanu:
I can apply the patch to version 16838 successfully but the encoded video is
garbled
with green colors !
Original comment by polo...@gmail.com
on 3 Feb 2009 at 8:09
I guess it can compile if optimizations aren't enabled...
Do you get the garbled output now? If so, can you post the video somewhere and
I'll
try it.
Original comment by yonas.ya...@gmail.com
on 3 Feb 2009 at 8:10
Yonas the unpatched code compiles successfully and the decoded video is
absolutely FINE. There are NO GREEN
PATCHES. But I need the optimised version of it.
Original comment by tanu.ba...@gmail.com
on 3 Feb 2009 at 8:31
Ok, I just did what you asked :
checkouted revision 16838
patched with file ffmpeg4iphone-svn-2009-30-01-v0.0.4.patch
compile with command line you gave in your comment #12.
The resulting video is not garbled, it is correct!
Original comment by polo...@gmail.com
on 3 Feb 2009 at 8:32
Polouis:
My results are same - in comment # 18
Original comment by tanu.ba...@gmail.com
on 3 Feb 2009 at 8:37
What video format are you converting from/to? What options did you use when
running
ffmpeg?
Original comment by yonas.ya...@gmail.com
on 3 Feb 2009 at 8:40
I am not using ffmpeg. I am using the APIs from libavcodec and libavutil. My
application gets video stream from
a source on network and I use the ffmpeg decoder to convert it to MPEG4 data
and then I render it on iphone
using a framework.
Original comment by tanu.ba...@gmail.com
on 3 Feb 2009 at 8:49
Tanu:
I need to recreate the error. Can you suggest how I do that? I've converted
from wmv3
to MPEG4, but it was fine.
Polouis:
What video format are you converting from/to? What options did you use when
running
ffmpeg?
Original comment by yonas.ya...@gmail.com
on 3 Feb 2009 at 9:05
Yonas, i am based in India and it is 3:00 AM here. Can we fix up a time later
today that suits both of us? I want
to get this sorted asap but I am realllly sleeepy
Original comment by tanu.ba...@gmail.com
on 3 Feb 2009 at 9:28
No problem. I should be online by 1pm tomorrow. Until then, try to find a way
for me
to re-create the error by using ffmpeg command-line.
Original comment by yonas.ya...@gmail.com
on 3 Feb 2009 at 9:33
Please try decoding MPEG4 video. The green patches are seen on decoding MPEG4
SP
for sure. You could try converting a MP4 file that contains MPEG4 video to some
other format using ffmpeg.
Original comment by aloka.mi...@gmail.com
on 4 Feb 2009 at 3:25
I work with Tanu and am posting this message in the same context - i.e. green
patches on video when using the optimised code for Iphone.
Original comment by aloka.mi...@gmail.com
on 4 Feb 2009 at 3:26
I've tried encoding WMV -> MPEG4 (mp4) and MPEG4 (mp4) -> WMV, without green
patches.
Can you make a small sample file for me to test?
Original comment by yonas.ya...@gmail.com
on 4 Feb 2009 at 4:50
Yonas,
Please find attached the mp4 file. Use this file to retrieve the YUV data.
Use it as:
ffmpeg -i dancing-walrus.mp4 d.yuv
See what kind of YUV data you get.
The video size is 368 x 208 pixels. (Width x Height).
You can use the following YUV Player - http://www.sunrayimage.com/download.html
Let me know of your comments as soon as possible.
Original comment by tanu.ba...@gmail.com
on 4 Feb 2009 at 6:59
Attachments:
Yonas
Please use the attached mp4 file.
This file has been created from a raw mpeg4 data dump that comes from our video
source on network, This will
give the exact idea about what is wrong.
Original comment by tanu.ba...@gmail.com
on 4 Feb 2009 at 9:45
Attachments:
Yonas, we are eagerly waiting for your comments/analysis.
Original comment by tanu.ba...@gmail.com
on 4 Feb 2009 at 5:01
Yonas, are you online?
Do you plan to work in this today. My team-mate and I are waiting for your
response and are kind of stuck.
Original comment by tanu.ba...@gmail.com
on 4 Feb 2009 at 6:54
Yonas Please look at the problem file uploaded in Comment#30 - using the code
that has the ffmpeg4iphone-
svn-2009-30-01-v0.0.4.patch patch applied on the released code - version 16838.
We see green video with
the patched code
Original comment by tanu.ba...@gmail.com
on 4 Feb 2009 at 7:08
Tanu,
I converted both videos to yuv using OSX and iPhone. Although there was a lot of
green, both OSX (unpatched) and iPhone (patched) output yuvs were identical.
I used this command: ffmpeg -i dancing-walrus.mp4 d.yuv
Original comment by yonas.ya...@gmail.com
on 4 Feb 2009 at 7:56
Well, In my case, the unpatched code for iphone produced correct outout.
Did you try decoding video_dump1.mp4?
Original comment by tanu.ba...@gmail.com
on 4 Feb 2009 at 7:58
I tried video_dump1 and dancing-walrus
Original comment by yonas.ya...@gmail.com
on 4 Feb 2009 at 8:01
The patched code + optimizations for iphone using ARMV6 options in configure -
produces green output.
However, unpatched code + NO Optimizations for ARMV6 give correct output.
I hope you understood the same.
By the way, do you have any insight into why the output is green when ARM
optimizations are applied?
Original comment by tanu.ba...@gmail.com
on 4 Feb 2009 at 8:05
Sorry Tanu, I don't know why this is happening for you. And I don't know why I
can't
reproduce the error. I think you should shoot an email to the ffmpeg-devel
mailing
list, see what they might come up with.
Original comment by yonas.ya...@gmail.com
on 4 Feb 2009 at 8:08
Yonas, we used the ffmpeg binary that is available from Cydia repository. I
guess the link to that one is :
http://apt.modmyi.com/2debs/ffmpegr16669.deb
We used this binary on the file video_dump1.mp4 and converted it to .yuv file.
IT PLAYS FINE.
Can you tell us whether this is optimized for iphone ARM or not. In case it is,
from where can we get the
source code / patched code that we can build for us?
Also, In the downloads section -
http://code.google.com/p/ffmpeg4iphone/downloads/list
there is a code featured as : -ffmpeg-SVN-r16669-1 FFmpeg version SVN-r16669 -
with optimizations
what is the file format of this archive? On downloading this, it opens as a
TEXT file on MAC.
We are not able to use this one.
Please comment.
Original comment by tanu.ba...@gmail.com
on 5 Feb 2009 at 1:43
I don't think it has ARM optimizations. ffmpeg-SVN-r16669-1 is an executable.
Transfer it to the iPhone and run ./ffmpeg-SVN-r16669-1.
Original comment by yonas.ya...@gmail.com
on 5 Feb 2009 at 3:32
Original issue reported on code.google.com by
yonas.ya...@gmail.com
on 3 Feb 2009 at 5:43