Before I upload the changes to F-Droid I wanted to upload here the APK, plugin and sources for version 1.5
I moved the project sources from googlecode to github, since googlecode is about to shutdown. Github address for AndroidCPG is:
https://github.com/IsaNexusDev/androidcpgChangelog:
* Bridge support (only MyBB at the moment)
* UTF8 support (title, description, username, password, album name)
* Show Result button is visible at ShareActivity when login or fetch albums fails
* Greek Translation
* Translator credits at preferences.
To dimangelid: please download latest
https://github.com/IsaNexusDev/androidcpg/raw/master/androidcpg_coppermine_plugin.zip and overwrite your coppermine androidcpg plugin folder with the code in this version, since the code at db_input.php at AndroidCPG_bridgeBB_beta.zip had some code that will not work with your server, this code:
$failurewritting = false;
$picture_name_ori = null;
if (in_array($matches[2], array('avi','mp4','3gp','m4v','flv','mpeg','mpg','mov','3pg','webm','wmv'))){
$picture_name_ori = $uploaded_pic;
if ($matches[2] == 'mp4'){
$uploaded_pic_new = str_replace('.mp4','_ori.mp4',$uploaded_pic);
if (!rename($uploaded_pic,$uploaded_pic_new)) {
if (copy ($uploaded_pic,$uploaded_pic_new)) {
//chmod($dbfilename, 664);
unlink($uploaded_pic);
} else {
$failurewritting = true;
}
}
if (!$failurewritting){
$uploaded_pic = $uploaded_pic_new;
}
} else {
$picture_name = str_replace('.'. $matches[2],'.mp4' ,$picture_name);
}
$thumb_name = 'thumb_' . str_replace('.mp4','.jpg' ,$picture_name);
if (!$failurewritting){
$cmd = 'nohup nice -n 10 encodevideo.sh "'.$uploaded_pic.'" "'.$dest_dir .$picture_name.'" "'.$dest_dir.$thumb_name.'" > encodelogs/encode_'.$picture_name.'.log & printf "%u" $!';
$pid = shell_exec($cmd);
}
}
As seen, I use this code for automatic video encode when user uploads a video... but, if encodevideo.sh is missing from the server you will end up in not a very good situation

My encodevideo.sh code, if anyone interested is:
#!/bin/bash
#
# REQUIRED:
#
# Handbrake installation:
#
# sudo add-apt-repository ppa:stebbins/handbrake-releases
# sudo apt-get update
# sudo apt-get install handbrake-gtk handbrake-cli
#
# FFMpeg installation:
#
# sudo apt-get install ffmpeg
#
# Imagemagik installation:
#
# sudo apt-get install imagemagick
#
# mp4 encoding supported by most android/Iphone devices
HandBrakeCLI --width 800 --aencoder aac --ab 160 -6 stereo --arate 44.1 -e x264 -q 20 -a 1 --modulus 2 --loose-anamorphic --rate 29.97 -x 8x8dct=0:ref=1:bframes=0:cabac=0:me=umh:mixed_ref=0:chroma_me=1:threads=3:lookahead_threads=1:sliced_threads=0:nr=0:decimate=1:interlaced=0:bluray_compat=0:constrained_intra=0:weightp=0:keyint=300:keyint_min=30:scenecut=40:intra_refresh=0:rc=crf:crf=20,0:qcomp=0,60:qpmin=0:qpmax=69:qpstep=4:ip_ratio=1,40:aq=1:1,00:chroma_qp_offset=-2:deadzone=21,11:fast_pskip=1:rc_lookahead=50 -i "$1" -o "$2"
echo video reencoded "$2"
if [ -f "$3" ]
then
echo the thumb already exists "$3"
else
#ffprobe and ffmpeg are part of ffmpeg package
d=$(ffprobe -v quiet -print_format compact=print_section=0:nokey=1:escape=csv -show_entries format=duration "$2" 2>&1 | grep -o -P ".*?(?=\.)")
d=$(( d / 3))
ffmpeg -i "$2" -y -r 1 -vframes 1 -ss "$d" "$3"
#convert and composite is part of imagemagick package
convert "$3" -resize 120x120 "$3"
echo composite -compose atop -gravity center video_watermark.png "$3" "$3.tmp.jpg"
composite -compose atop -gravity center video_watermark.png "$3" "$3.tmp.jpg"
mv -f "$3.tmp.jpg" "$3"
echo created thumb "$3"
fi
As seen, video transcoding and image preview extraction is performed. If video_watermark.png exists, then It will be overlaid in the preview image