CumulusClips - Forums
VideoJs MultiPlay both FLV and MP4
Hello @Damian
I have over 500 videos on Cumulusclips install on Version 1. now, I have Upgrade to Last Version with Fresh Install, I know that auto uprgrade is not fuction from version 1 to 2.
step by step I do. Now everything is Ok
My FLV Videos copied to h264 folder and All databases have been adapted.
I dont want to re-convert myvideos again. I change h264Url in play.phtml with filename .flv and type=video/flv. All off videos success to play flv with videojs.
Now The problem is When I Upload new videos, output is MP4, and cannot play in videojs, cause of h264Url set as flv video.
My Question is, How to make videojs player autoplay video take from flv or mp4 videos.
Thank you
I have over 500 videos on Cumulusclips install on Version 1. now, I have Upgrade to Last Version with Fresh Install, I know that auto uprgrade is not fuction from version 1 to 2.
step by step I do. Now everything is Ok
My FLV Videos copied to h264 folder and All databases have been adapted.
I dont want to re-convert myvideos again. I change h264Url in play.phtml with filename .flv and type=video/flv. All off videos success to play flv with videojs.
Now The problem is When I Upload new videos, output is MP4, and cannot play in videojs, cause of h264Url set as flv video.
My Question is, How to make videojs player autoplay video take from flv or mp4 videos.
Thank you


h264UrlPlayFLV.jpg
1440 x 900 - 168K


over500videos.jpg
724 x 664 - 85K


playFLV.jpg
754 x 643 - 134K


playMP4Error.jpg
743 x 649 - 149K
This discussion has been closed.
Comments
1) add a column to the videos table called "imported" that says true if the video was imported and is an flv, false if its new and h264.
2) create a plugin that hooks into play.end. it looks up that imported column we created for the requested video and sets a theme variable with that value.
3) in the theme, check the variable you set in step 2. if the video was imported then use the flv extension. otherwise, use the mp4 extension.
check the documentation for instructions on how to create a plugin.
Oh.. its hard to me.. I dont know and I'm not Programmer.. just little knows about php mysql
Did another way, for me? if not solve above, I want to make output H.264 Encoding Options in admin panel to FLV not MP4.
I have try with option :
-vcodec libx264 -vf "scale=min(640\,iw):trunc(ow/a/2)*2" -vb 800k -acodec libfaac -ab 96k -ar 44100 -f flv
but I got error : encountered non-QT top-level atom (is this a QuickTime file?)
last atom in file was not a moov atom
Could you show how the encoding options to FLV ?
here is the logs :
==================================================================
H.264 ENCODING
==================================================================
H.264 Encoding Command: /usr/local/bin/ffmpeg -i /home/adhi/www/cumulusclips/cc-content/uploads/temp/qkHVdmLzY4CvgtfTnBQm.flv -vcodec libx264 -vf "scale=min(640\,iw):trunc(ow/a/2)*2" -vb 800k -acodec libfaac -ab 96k -ar 44100 -f flv /home/adhi/www/cumulusclips/cc-content/uploads/h264/qkHVdmLzY4CvgtfTnBQm_temp.mp4 >> /home/adhi/www/cumulusclips/cc-core/logs/qkHVdmLzY4CvgtfTnBQm.log 2>&1
H.264 Encoding Output:
ffmpeg version N-61445-gdded5ed-syslint Copyright (c) 2000-2014 the FFmpeg developers
built on Mar 14 2014 12:12:56 with gcc 4.4.7 (GCC) 20120313 (Red Hat 4.4.7-4)
configuration: --prefix=/usr/local/cpffmpeg --enable-shared --enable-nonfree --enable-gpl --enable-pthreads --enable-libopencore-amrnb --enable-decoder=liba52 --enable-libopencore-amrwb --enable-libfaac --enable-libmp3lame --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libxvid --extra-cflags=-I/usr/local/cpffmpeg/include/ --extra-ldflags=-L/usr/local/cpffmpeg/lib --enable-version3 --extra-version=syslint
libavutil 52. 66.101 / 52. 66.101
libavcodec 55. 52.102 / 55. 52.102
libavformat 55. 34.101 / 55. 34.101
libavdevice 55. 11.100 / 55. 11.100
libavfilter 4. 3.100 / 4. 3.100
libswscale 2. 5.101 / 2. 5.101
libswresample 0. 18.100 / 0. 18.100
libpostproc 52. 3.100 / 52. 3.100
Input #0, flv, from '/home/adhi/www/cumulusclips/cc-content/uploads/temp/qkHVdmLzY4CvgtfTnBQm.flv':
Metadata:
major_brand : M4V
minor_version : 1
compatible_brands: M4V mp42isom
encoder : Lavf54.63.104
Duration: 00:00:44.38, start: 0.000000, bitrate: 4808 kb/s
Stream #0:0: Video: flv1, yuv420p, 720x576, 2000 kb/s, 29.97 tbr, 1k tbn, 1k tbc
Stream #0:1: Audio: mp3, 44100 Hz, stereo, s16p, 96 kb/s
[libx264 @ 0x21fa9a0] using cpu capabilities: none!
[libx264 @ 0x21fa9a0] profile High, level 3.0
[libx264 @ 0x21fa9a0] 264 - core 142 r2409 d6b4e63 - H.264/MPEG-4 AVC codec - Copyleft 2003-2014 - 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=6 lookahead_threads=1 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=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=abr mbtree=1 bitrate=800 ratetol=1.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
Output #0, flv, to '/home/adhi/www/cumulusclips/cc-content/uploads/h264/qkHVdmLzY4CvgtfTnBQm_temp.mp4':
Metadata:
major_brand : M4V
minor_version : 1
compatible_brands: M4V mp42isom
encoder : Lavf55.34.101
Stream #0:0: Video: h264 (libx264) ([7][0][0][0] / 0x0007), yuv420p, 640x512, q=-1--1, 800 kb/s, 1k tbn, 29.97 tbc
Stream #0:1: Audio: aac (libfaac) ([10][0][0][0] / 0x000A), 44100 Hz, stereo, s16, 96 kb/s
Stream mapping:
Stream #0:0 -> #0:0 (flv -> libx264)
Stream #0:1 -> #0:1 (mp3 -> libfaac)
Press [q] to stop, [?] for help
frame= 74 fps=0.0 q=20.0 size= 173kB time=00:00:02.90 bitrate= 488.8kbits/s
frame= 144 fps=140 q=14.0 size= 352kB time=00:00:05.66 bitrate= 508.6kbits/s
frame= 185 fps=115 q=14.0 size= 879kB time=00:00:07.33 bitrate= 981.8kbits/s
frame= 230 fps=109 q=23.0 size= 1195kB time=00:00:09.14 bitrate=1070.5kbits/s
.
.
.
.
frame= 1107 fps= 57 q=-1.0 Lsize= 4515kB time=00:00:44.39 bitrate= 833.0kbits/s
video:3952kB audio:509kB subtitle:0 data:0 global headers:0kB muxing overhead 1.206613%
[libx264 @ 0x21fa9a0] frame I:9 Avg QP:15.80 size: 21234
[libx264 @ 0x21fa9a0] frame P:550 Avg QP:20.92 size: 6149
[libx264 @ 0x21fa9a0] frame B:548 Avg QP:18.73 size: 863
[libx264 @ 0x21fa9a0] consecutive B-frames: 23.5% 27.5% 12.2% 36.9%
[libx264 @ 0x21fa9a0] mb I I16..4: 40.4% 39.7% 19.9%
[libx264 @ 0x21fa9a0] mb P I16..4: 2.9% 5.1% 1.1% P16..4: 21.9% 9.7% 5.5% 0.0% 0.0% skip:53.7%
[libx264 @ 0x21fa9a0] mb B I16..4: 0.1% 0.1% 0.1% B16..8: 14.8% 2.1% 0.5% direct: 1.2% skip:81.2% L0:33.1% L1:56.4% BI:10.4%
[libx264 @ 0x21fa9a0] final ratefactor: 21.04
[libx264 @ 0x21fa9a0] 8x8 transform intra:53.1% inter:61.0%
[libx264 @ 0x21fa9a0] coded y,uvDC,uvAC intra: 42.0% 47.4% 28.4% inter: 9.7% 9.6% 1.7%
[libx264 @ 0x21fa9a0] i16 v,h,dc,p: 62% 25% 5% 9%
[libx264 @ 0x21fa9a0] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 21% 22% 23% 4% 6% 6% 6% 6% 6%
[libx264 @ 0x21fa9a0] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 25% 27% 17% 4% 6% 6% 5% 5% 5%
[libx264 @ 0x21fa9a0] i8c dc,h,v,p: 64% 16% 14% 6%
[libx264 @ 0x21fa9a0] Weighted P-Frames: Y:15.5% UV:13.1%
[libx264 @ 0x21fa9a0] ref P L0: 69.1% 17.2% 10.0% 3.4% 0.2%
[libx264 @ 0x21fa9a0] ref B L0: 90.8% 8.6% 0.6%
[libx264 @ 0x21fa9a0] ref B L1: 96.8% 3.2%
[libx264 @ 0x21fa9a0] kb/s:731.06
==================================================================
H.264 SHIFT MOOV ATOM
==================================================================
H.264 Shift Moov Atom Command: /usr/local/bin/qt-faststart /home/adhi/www/cumulusclips/cc-content/uploads/h264/qkHVdmLzY4CvgtfTnBQm_temp.mp4 /home/adhi/www/cumulusclips/cc-content/uploads/h264/qkHVdmLzY4CvgtfTnBQm.mp4 >> /home/adhi/www/cumulusclips/cc-core/logs/qkHVdmLzY4CvgtfTnBQm.log 2>&1
H.264 Shift Moov Atom Output:
0 1179407873
encountered non-QT top-level atom (is this a QuickTime file?)
last atom in file was not a moov atom
Thank you
Going forward, especially with new updates, you will save yourself so much time if you just take care of this now.
I know, I know, not what you want to hear. But as end-user of this software, as well as being an IT professional, it will pay off in the long term.