xuggler - Xuggle API - Output video file size increasing. -



xuggler - Xuggle API - Output video file size increasing. -

i trying run basic scenario using xuggle api, giving input flv file , writing flv file.

i used same input parameters (e.g. bit rate, width , height); however, after conversion, getting much bigger output video file 2-3 times of input video size.

please see below ffmpeg command output of both videos.

input video:

anilj@desk1:~/workspace/androws/xugglemedia$ ffmpeg -i input/internetcrashing.flv ffmpeg version n-36083-g2501f93-xuggle-5.5 copyright (c) 2000-2012 ffmpeg developers built on jun 3 2014 13:43:04 gcc 4.6.4 configuration: --prefix=/home/anilj/workspace/xugglehome --extra-version=xuggle-5.5 --extra-cflags=-i/home/anilj/workspace/xuggle-xuggler/build/native/x86_64-unknown-linux-gnu/captive/stage/home/anilj/workspace/xugglehome/include --extra-ldflags=-l/home/anilj/workspace/xuggle-xuggler/build/native/x86_64-unknown-linux-gnu/captive/stage/home/anilj/workspace/xugglehome/lib --disable-shared --enable-pic --enable-gpl --enable-nonfree --enable-libx264 --enable-version3 --enable-libmp3lame --enable-libvorbis --enable-libtheora --enable-libspeex --enable-libvo-aacenc --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-librtmp --enable-openssl --enable-zlib --enable-libvpx input #0, flv, 'input/internetcrashing.flv': metadata: starttime : 0 totalduration : 344 totaldatarate : 299 bytelength : 12850666 canseekontime : true sourcedata : b4a7dd5a3mm1402426875642882 purl : pmsg : duration: 00:05:43.97, start: 0.000000, **bitrate: 298 kb/s** stream #0:0: video: flv1, yuv420p, 400x226, 263 kb/s, 29.97 tbr, 1k tbn, 1k tbc stream #0:1: audio: mp3, 22050 hz, stereo, s16, 56 kb/s @ to the lowest degree 1 output file must specified

output video:

anilj@desk1:~/workspace/androws/xugglemedia$ ffmpeg -i output/output1.flv ffmpeg version n-36083-g2501f93-xuggle-5.5 copyright (c) 2000-2012 ffmpeg developers built on jun 3 2014 13:43:04 gcc 4.6.4 configuration: --prefix=/home/anilj/workspace/xugglehome --extra-version=xuggle-5.5 --extra-cflags=-i/home/anilj/workspace/xuggle-xuggler/build/native/x86_64-unknown-linux-gnu/captive/stage/home/anilj/workspace/xugglehome/include --extra-ldflags=-l/home/anilj/workspace/xuggle-xuggler/build/native/x86_64-unknown-linux-gnu/captive/stage/home/anilj/workspace/xugglehome/lib --disable-shared --enable-pic --enable-gpl --enable-nonfree --enable-libx264 --enable-version3 --enable-libmp3lame --enable-libvorbis --enable-libtheora --enable-libspeex --enable-libvo-aacenc --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-librtmp --enable-openssl --enable-zlib --enable-libvpx input #0, flv, 'output/output1.flv': metadata: encoder : lavf54.3.100 duration: 00:05:44.05, start: 0.000000, **bitrate: 935 kb/s** stream #0:0: video: flv1, yuv420p, 226x400, 200 kb/s, 29.97 tbr, 1k tbn, 1k tbc stream #0:1: audio: mp3, 22050 hz, stereo, s16, 64 kb/s @ to the lowest degree 1 output file must specified anilj@desk1:~/workspace/androws/xugglemedia$

i see there huge difference between bit rate (shown in bold). not understand how did bit rate alter much , command xuggle apis.

i using below code processing. note using same input parameters of video.

public void onaddstream(iaddstreamevent event) { int streamindex = event.getstreamindex(); istreamcoder streamcoder = event.getsource().getcontainer() .getstream(streamindex).getstreamcoder(); if (streamcoder.getcodectype() == icodec.type.codec_type_audio) { streamcoder.setbitrate((int) audiobitrate); writer.addaudiostream(streamindex, streamindex, audiochannelcount, audiosamplerate); } else if (streamcoder.getcodectype() == icodec.type.codec_type_video) { streamcoder.setwidth(video_width); streamcoder.setheight(video_height); streamcoder.setbitrate((int) videobitrate); writer.addvideostream(streamindex, streamindex, video_width, video_height); } super.onaddstream(event); } public void onvideopicture(ivideopictureevent event) { ivideopicture pic = event.getpicture(); if (videoresampler == null) { videoresampler = ivideoresampler.make(video_width, video_height, pic.getpixeltype(), pic.getwidth(), pic.getheight(), pic.getpixeltype()); } ivideopicture out = ivideopicture.make(pic.getpixeltype(), video_width, video_height); videoresampler.resample(out, pic); ivideopictureevent asc = new videopictureevent(event.getsource(), out, event.getstreamindex()); super.onvideopicture(asc); out.delete(); } public void onaudiosamples(iaudiosamplesevent event) { iaudiosamples samples = event.getaudiosamples(); if (audioresampler == null) { audioresampler = iaudioresampler.make(audiooutputchannels, samples.getchannels(), audiooutputrate, samples.getsamplerate()); } if (event.getaudiosamples().getnumsamples() > 0) { iaudiosamples out = iaudiosamples.make(samples.getnumsamples(), samples.getchannels()); audioresampler.resample(out, samples, samples.getnumsamples()); audiosamplesevent asc = new audiosamplesevent(event.getsource(), out, event.getstreamindex()); super.onaudiosamples(asc); out.delete(); } }

am missing here, causing problem?

xuggler xuggle

Comments

Popular posts from this blog

php - Android app custom user registration and login with cookie using facebook sdk -

django - Access session in user model .save() -

php - .htaccess Multiple Rewrite Rules / Prioritizing -