summaryrefslogtreecommitdiff
path: root/rotord/rotor.cpp
diff options
context:
space:
mode:
authorTim Redfern <tim@herge.(none)>2013-06-25 19:42:30 +0100
committerTim Redfern <tim@herge.(none)>2013-06-25 19:42:30 +0100
commit1daee727f5d47681a73417a469d71673e1a0827c (patch)
tree4183a04deb54a69a07d73d2ea38f61cb39ab62d3 /rotord/rotor.cpp
parentf191b170379e5ae7f237aa2f7adae5f387caaa35 (diff)
pesky youtube movies
Diffstat (limited to 'rotord/rotor.cpp')
-rwxr-xr-xrotord/rotor.cpp15
1 files changed, 11 insertions, 4 deletions
diff --git a/rotord/rotor.cpp b/rotord/rotor.cpp
index 887fc9f..1c0345d 100755
--- a/rotord/rotor.cpp
+++ b/rotord/rotor.cpp
@@ -27,6 +27,7 @@ Node_factory::Node_factory(){
add_type("image_arithmetic",new Image_arithmetic());
add_type("random",new Random());
add_type("blend",new Blend());
+ //add_type("mirror",new Mirror());
}
bool Signal_input::connect(Signal_node* source) {
@@ -254,7 +255,7 @@ bool Video_output::render(const float duration, const float framerate,const stri
AVCodecID codecId=AV_CODEC_ID_H264; //MPEG4;
std::string container ="mp4";
-
+
//at the moment it crashes if you render before audio is loaded and also on 2nd render
libav::exporter exporter;
@@ -285,7 +286,7 @@ bool Video_output::render(const float duration, const float framerate,const stri
}
}
-
+
//[mp3 @ 0x7fffe40330e0] max_analyze_duration 5000000 reached at 5015510 microseconds
//[mp3 @ 0x7fffe4033ec0] Insufficient thread locking around avcodec_open/close()
//[mp3 @ 0x7fffe40330e0] Estimating duration from bitrate, this may be inaccurate
@@ -293,8 +294,8 @@ bool Video_output::render(const float duration, const float framerate,const stri
//[libx264 @ 0x7fffe8003940] profile High, level 3.0
//[libx264 @ 0x7fffe8003940] 264 - core 123 r2189 35cf912 - H.264/MPEG-4 AVC codec - Copyleft 2003-2012 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=12 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=10 keyint_min=1 scenecut=40 intra_refresh=0 rc_lookahead=10 rc=abr mbtree=1 bitrate=400 ratetol=1.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
//Assertion ff_avcodec_locked failed at libavcodec/utils.c:2967
-
-
+
+
Image* i=get_output(Frame_spec(vf,framerate,duration,outW,outH));
if (i) {
@@ -381,6 +382,12 @@ Image* Video_loader::output(const Frame_spec &frame){
if (isLoaded){
int wanted=((int) (frame.time*frame.framerate))%(player.getNumberOfFrames()); //-2?? this would give division by zero
+
+
+ //if (wanted==99){
+ // cerr<<"videoloader: near the end"<<endl;
+ //}
+
if (!player.fetchFrame(frame.w,frame.h,wanted)) { cerr<<"Rotor: frame returned false"<<endl; return nullptr; };
image.setup_fromRGB(frame.w,frame.h,player.pFrameRGB->data[0]);
return &image;