Newest 'ffmpeg' Questions - Stack Overflow
Les articles publiés sur le site
-
How to calculate sizes for AVPicture.data[x] pointers (YUV420p) when using libffmpeg
13 août 2013, par bradenV2I'm trying to get Y,U,V values separately in order to pass them to openGL and map to a texture. I know these values can be found in AVPicture.data[0] (Y) and AVPicture.data[1] (U) and AVPicture.data[2] (V)
avcodec_decode_video2(ctx, frame, &frameFinished, packet_data->packet); AVPicture _avPicture; picSize = avpicture_get_size(ctx->pix_fmt, ctx->width, ctx->height); avpicture_alloc(&_avPicture, ctx->pix_fmt,ctx->width, ctx->height ); avpicture_fill(&_avPicture, packet_data->packet, ctx->pix_fmt,ctx->width,ctx->height);
^^ That's working fine. The issue I run into is passing the Y,U,V values back to Java via JNI. I have to know the size of the data the AVPicture.data[x] pointers point to. I've tried AVPicture.linesize to no avail, as well as:
for (y = 0; y < ctx->height; y++){ for (x = 0; x < ctx->width; x++){ yDataSize++; } } /* Cb and Cr */ for (y = 0; y < ctx->height / 2; y++) { for (x = 0; x < ctx->width / 2; x++) { uDataSize++; vDataSize++; } }
I'm really stuck, thanks!
-
Armv6 + ffmpeg + android = sigill (heap)
13 août 2013, par frankishIf I compile everything for armv7, it works perfectly. If I compile everything for armv6, it crashes when calling the first ffmpeg function and I don't understand the crash output.
What can be the problem?
I use ndk-8e and I use minSdk=8 targetSdk=17 I tried this on Android 2.2 emulator (with also high heap size=128mb to see if it works, but it's not..)
08-11 18:36:28.904: I/DEBUG(30): signal 4 (SIGILL), fault addr 81247524 08-11 18:36:28.904: I/DEBUG(30): r0 81b346a0 r1 81b347bc r2 81b34702 r3 00000002 08-11 18:36:28.904: I/DEBUG(30): r4 00000001 r5 00000002 r6 00005601 r7 0000011a 08-11 18:36:28.904: I/DEBUG(30): r8 814cf2d0 r9 8090eca1 10 00000001 fp 0022c928 08-11 18:36:28.904: I/DEBUG(30): ip 00000006 sp 5ca0173c lr 812d6404 pc 81247524 cpsr 80000010 08-11 18:36:29.014: D/dalvikvm(58): GC_FOR_MALLOC freed 10199 objects / 574352 bytes in 153ms 08-11 18:36:29.183: I/DEBUG(30): #00 pc 00247524 /data/data/com.myapp/lib/libffmpeg.so 08-11 18:36:29.183: I/DEBUG(30): #01 lr 812d6404 /data/data/com.myApp/lib/libffmpeg.so 08-11 18:36:29.183: I/DEBUG(30): code around pc: 08-11 18:36:29.183: I/DEBUG(30): 81247504 e15c0007 e14260b2 e5d35003 e5d3a002 08-11 18:36:29.183: I/DEBUG(30): 81247514 e5d34004 e1c260b0 e1a05085 e1a0308a 08-11 18:36:29.183: I/DEBUG(30): 81247524 e6ef5075 e064a005 e6ef3073 e28aa001 08-11 18:36:29.193: I/DEBUG(30): 81247534 e2836001 e0854004 e5c14000 e5c1a001 08-11 18:36:29.193: I/DEBUG(30): 81247544 e5c06001 e5c03000 e2822004 e2811002 08-11 18:36:29.193: I/DEBUG(30): code around lr: 08-11 18:36:29.193: I/DEBUG(30): 812d63e4 eb057846 e3500000 1afffff7 e5943048 08-11 18:36:29.193: I/DEBUG(30): 812d63f4 e3530000 08bd8070 e1a00004 e12fff33 08-11 18:36:29.193: I/DEBUG(30): 812d6404 e8bd8070 007bbc14 007bbbe8 e92d4010 08-11 18:36:29.193: I/DEBUG(30): 812d6414 e5d1c001 e5d04001 e5d02000 e5d13000 08-11 18:36:29.193: I/DEBUG(30): 812d6424 e06c0004 e0633002 e0830400 e8bd8010 08-11 18:36:29.193: I/DEBUG(30): stack: 08-11 18:36:29.193: I/DEBUG(30): 5ca016fc 00000000 08-11 18:36:29.193: I/DEBUG(30): 5ca01700 00000000 08-11 18:36:29.193: I/DEBUG(30): 5ca01704 00000000 08-11 18:36:29.193: I/DEBUG(30): 5ca01708 00000000 08-11 18:36:29.193: I/DEBUG(30): 5ca0170c 00000000 08-11 18:36:29.193: I/DEBUG(30): 5ca01710 00000000 08-11 18:36:29.193: I/DEBUG(30): 5ca01714 00000000 08-11 18:36:29.193: I/DEBUG(30): 5ca01718 00000000 08-11 18:36:29.193: I/DEBUG(30): 5ca0171c 00000000 08-11 18:36:29.203: I/DEBUG(30): 5ca01720 00000000 08-11 18:36:29.203: I/DEBUG(30): 5ca01724 00000000 08-11 18:36:29.203: I/DEBUG(30): 5ca01728 00000000 08-11 18:36:29.203: I/DEBUG(30): 5ca0172c 00000000 08-11 18:36:29.203: I/DEBUG(30): 5ca01730 df002777 08-11 18:36:29.203: I/DEBUG(30): 5ca01734 e3a070ad 08-11 18:36:29.203: I/DEBUG(30): 5ca01738 815d9bd0 /data/data/com.myApp/lib/libffmpeg.so 08-11 18:36:29.203: I/DEBUG(30): #00 5ca0173c 815d9c60 /data/data/com.myApp/lib/libffmpeg.so 08-11 18:36:29.203: I/DEBUG(30): 5ca01740 815d9bd0 /data/data/com.myApp/lib/libffmpeg.so 08-11 18:36:29.213: I/DEBUG(30): 5ca01744 8094b9c4 /data/data/com.myApp/lib/mycustomlib.so 08-11 18:36:29.213: I/DEBUG(30): 5ca01748 afd489b0 08-11 18:36:29.213: I/DEBUG(30): 5ca0174c 00100000 [heap] 08-11 18:36:29.213: I/DEBUG(30): 5ca01750 5c902000 08-11 18:36:29.213: I/DEBUG(30): 5ca01754 812d6404 /data/data/com.myApp/lib/libffmpeg.so 08-11 18:36:29.213: I/DEBUG(30): 5ca01758 815d0c00 /data/data/com.myApp/lib/libffmpeg.so 08-11 18:36:29.213: I/DEBUG(30): 5ca0175c 80952dec /data/data/com.myApp/lib/mycustomlib.so 08-11 18:36:29.213: I/DEBUG(30): 5ca01760 8094b9c4 /data/data/com.myApp/lib/mycustomlib.so 08-11 18:36:29.213: I/DEBUG(30): 5ca01764 8107b964 /data/data/com.myApp/lib/libffmpeg.so 08-11 18:36:29.213: I/DEBUG(30): 5ca01768 0022c928 [heap] 08-11 18:36:29.213: I/DEBUG(30): 5ca0176c 8090da63 /data/data/com.myApp/lib/mycustomlib.so 08-11 18:36:29.213: I/DEBUG(30): 5ca01770 00000000 08-11 18:36:29.213: I/DEBUG(30): 5ca01774 00000000 08-11 18:36:29.213: I/DEBUG(30): 5ca01778 00000000 08-11 18:36:29.224: I/DEBUG(30): 5ca0177c 00000000 08-11 18:36:29.224: I/DEBUG(30): 5ca01780 80953024 /data/data/com.myApp/lib/mycustomlib.so
-
mp4 video plays from beginning while seeking to another time [on hold]
13 août 2013, par user2649860i am using lighttpd and h264 with jwplayer. I am trying to stream the MP4 video.
My problem is that the MP4 video downloads whole file before playing and i have another problem i.e. when i seek to another time/point the video plays from beginning and it plays after the end time also.
i have already tried the ffmpeg tools to create the h264 video and qt-faststart.exe tool to fix the video index problem of the video. But it does not work.
Any solution ?? THanks in advanced
-
FFmpeg missing frame after H264/TS to RAW/AVI
13 août 2013, par alexbuissonWhile converting a H263/TS to a RAW/AVI with
ffmpeg -i in.ts -vcodec rawvideo -pix_fmt yuv420p out.avi
I found that the output AVI file had less frame than expected. It may come from PTS error in the TS, but if I convert it first to MP4 using the -vcodec copy option, I don't lost frame while performing MP4 to RAW/AVI.
Is there a solution to ignore the PTS to convert directly from TS?
-
FFMPEG How do I render a FLV from multiple PNG while saving the alpha channel ?
13 août 2013, par Dan KI'm using FFMPEG, and when I'm rendering a FLV movie from multiple PNG files. I would like to preserve the png's alpha channel (transparency) in the output FLV file.
If you could please help me out on this one, I would appreciate it.
Thanks, Dan.