Notice

The forum is in read only mode.

Support Forum

Welcome! Support Forums have been reactivated
Welcome the Technical Support section. Help us in assisting you by providing us with a concise and descriptive elaboration of your issues. Be specific and if possible, provide us with a step-by-step instruction in replicating your problem.

getting empty video files from cron job

11 years 1 month ago
  • Philip's Avatar
    Topic Author
  • Philip
  • Offline
  • Fresh Boarder
  • Posts: 25
  • Thank you received: 0
Licenses:
JomSocial Active Socialize Expired

I have been trying to get my videos onto my JomSocial site and when it goes to convert them using ffmpeg, it keeps creating empty (zero bytes) files over and over again using different filenames. When I upload the videos, they go onto the server fine, it's when the ffmpeg is converting them via cron job.
I've used the cron command recommended here on JS: lynx -source " dev.hraworld.com/index.php?option=com_community&task=cron ". When that didn't work, I talked to the support at my server and on their suggestion used curl or wget instead of the lynx -source - all to no avail.
I'm using Joomla 3.2.3 and JomSocial 3.1.1 with php 5.4.26. If it matters, I'm using the Akeeba backup and AdminTools extensions too - pro versions.
When I try to run the cron job in my browser window (FireFox), I'm getting:

XML Parsing Error: junk after document element
Location: dev.hraworld.com/index.php?option=com_community&task=cron
Line Number 1, Column 43:<pre>FFmpeg could not convert videos</pre><pre>/usr/bin/ffmpeg -y -i

/link/to/my/sitel/dev.hraworld.com/images/videos/originalvideos/30/lYlfc0CqVxz.wmv -vcodec libx264 -acodec aac -strict -2 -crf 23 -s

480x360 /home/hraworld/public_html/dev.hraworld.com/images/videos/videos/30/0jRwKwyvsvx.mp4</pre><pre></pre><?xml version="1.0" encoding="UTF-

8" ?><messages><message>Could not convert video</message><message>No temporary videos to delete.</message><message>No files to

transfer.</message><message>No Videos to transfer.</message><message>No avatars or cover of users needed to be transferred</message><message>No

avatars or cover of groups needed to be transferred</message><message>Removed Pending Invitation for Past Event</message></messages>


^


When my husband runs it on IE, he just gets a blank page.

I've attached files with the errors I'm getting in my server backend and the e-mails I've gotten from when the cron job runs.

Any help would be greatly appreciated.

Thanks in advance,
Mickey

This message has attachments files.
Please log in or register to see it.

11 years 1 month ago
  • Dimas Tekad Santosa's Avatar
  • Dimas Tekad Santosa
  • Visitor
  • Thank you received: 0
Licenses:

Hi,

Can you try to execute this command via terminal on your server, please?

/usr/bin/ffmpeg -y -i /link/to/my/sitel/dev.hraworld.com/images/videos/originalv...s/30/lYlfc0CqVxz.wmv -vcodec libx264 -acodec aac -strict -2 -crf 23 -s 480x360 /home/hraworld/public_html/dev.hraworld.com/images/videos/videos/30/0jRwKwyvsvx.mp4

Please let me know what do you get then.

Anyway, your backend account is not working, can you verify it?

thank you

11 years 1 month ago
  • Philip's Avatar
    Topic Author
  • Philip
  • Offline
  • Fresh Boarder
  • Posts: 25
  • Thank you received: 0
Licenses:
JomSocial Active Socialize Expired

Metadata:
WM/ParentalRating:
WMFSDKVersion : 10.00.00.3646
WMFSDKNeeded : 0.0.0.0000
IsVBR : 0
title :
author :
copyright :
comment :
Duration: 00:01:31.99, start: 5.000000, bitrate: 1167 kb/s
Stream #0.0: Audio: wmav2, 48000 Hz, 2 channels, s16, 128 kb/s
Stream #0.1: Video: wmv3, yuv420p, 320x240, 29.97 tbr, 1k tbn, 1k tbc
[libx264 @ 0x84be90]broken ffmpeg default settings detected
[libx264 @ 0x84be90]use an encoding preset (e.g. -vpre medium)
[libx264 @ 0x84be90]preset usage: -vpre <speed> -vpre <profile>
[libx264 @ 0x84be90]speed presets are listed in x264 --help
[libx264 @ 0x84be90]profile is optional; x264 defaults to high
Output #0, mp4, to '/home/hraworld/public_html/dev.hraworld.com/images/videos/videos/30/0jRwKwyvsvx.mp4':
Stream #0.0: Video: libx264, yuv420p, 480x360, q=2-31, 200 kb/s, 90k tbn, 29.97 tbc
Stream #0.1: Audio: libfaac, 48000 Hz, 2 channels, s16, 64 kb/s
Stream mapping:
Stream #0.1 -> #0.0
Stream #0.0 -> #0.1
Error while opening encoder for output stream #0.0 - maybe incorrect parameters such as bit_rate, rate, width or height

11 years 1 month ago
  • Philip's Avatar
    Topic Author
  • Philip
  • Offline
  • Fresh Boarder
  • Posts: 25
  • Thank you received: 0
Licenses:
JomSocial Active Socialize Expired

Dimas,
I just sent you a PM with all the creds to log in. Both my husband and I checked it and were able to log in with no problem. Give it a shot and let me know.

Thanks,
Mickey

11 years 1 month ago
  • Dimas Tekad Santosa's Avatar
  • Dimas Tekad Santosa
  • Visitor
  • Thank you received: 0
Licenses:

You are using centos right? can you read here for how to fix this issue in centos www.dropbox.com/s/vhekitc2zkxo9s8/FFMPEG...0a%20Centos%206X.pdf

11 years 1 month ago
  • Philip's Avatar
    Topic Author
  • Philip
  • Offline
  • Fresh Boarder
  • Posts: 25
  • Thank you received: 0
Licenses:
JomSocial Active Socialize Expired

I had to go ask for help on the path for ffmpeg/flvtool2, but they are /usr/bin/ffmpeg and /usr/bin/flvtool2.

here's the other info - for ffmpeg:
This email address is being protected from spambots. You need JavaScript enabled to view it. [~]# ffmpeg
FFmpeg version 0.6.5, Copyright (c) 2000-2010 the FFmpeg developers
built on Jan 29 2012 23:55:02 with gcc 4.1.2 20080704 (Red Hat 4.1.2-51)
configuration: --prefix=/usr --libdir=/usr/lib64 --shlibdir=/usr/lib64 --mandir=/usr/share/man --incdir=/usr/include --disable-avisynth --extra-cflags='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -fPIC' --enable-avfilter --enable-avfilter-lavf --enable-libdirac --enable-libfaac --enable-libfaad --enable-libfaadbin --enable-libgsm --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libx264 --enable-gpl --enable-nonfree --enable-postproc --enable-pthreads --enable-shared --enable-swscale --enable-vdpau --enable-version3 --enable-x11grab
libavutil 50.15. 1 / 50.15. 1
libavcodec 52.72. 2 / 52.72. 2
libavformat 52.64. 2 / 52.64. 2
libavdevice 52. 2. 0 / 52. 2. 0
libavfilter 1.19. 0 / 1.19. 0
libswscale 0.11. 0 / 0.11. 0
libpostproc 51. 2. 0 / 51. 2. 0
Hyper fast Audio and Video encoder
usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}...


and for flvtool2:
This email address is being protected from spambots. You need JavaScript enabled to view it. [~]# flvtool2
FLVTool2 1.0.6
Copyright (c) 2005-2007 Norman Timmler (inlet media e.K., Hamburg, Germany)
Get the latest version from www.inlet-media.de/flvtool2
This program is published under the BSD license.

Usage: flvtool2 [-ACDPUVaciklnoprstvx]... [-key:value]... in-path|stdin [out-path|stdout]

If out-path is omitted, in-path will be overwritten.
In-path can be a single file, or a directory. If in-path is a directory,
out-path has to be likewise, or can be omitted. Directory recursion
is controlled by the -r switch. You can use stdin and stdout keywords
as in- and out-path for piping or redirecting.

Chain commands like that: -UP (updates FLV file than prints out meta data)

Commands:
-A Adds tags from -t tags-file
-C Cuts file using -i inpoint and -o outpoint
-D Debugs file (writes a lot to stdout)
-H Helpscreen will be shown
-P Prints out meta data to stdout
-U Updates FLV with an onMetaTag event

Switches:
-a Collapse space between cutted regions
-c Compatibility mode calculates some onMetaTag values different
-key:value Key-value-pair for onMetaData tag (overwrites generated values)
-i timestamp Inpoint for cut command in miliseconds
-k Keyframe mode slides onCuePoint(navigation) tags added by the
add command to nearest keyframe position
-l Logs FLV stream reading to stream.log in current directory
-n Number of tag to debug
-o timestamp Outpoint for cut command in miliseconds
-p Preserve mode only updates FLVs that have not been processed
before
-r Recursion for directory processing
-s Simulation mode never writes FLV data to out-path
-t path Tagfile (MetaTags written in XML)
-v Verbose mode
-x XML mode instead of YAML mode

REPORT BUGS at projects.inlet-media.de/flvtool2

11 years 3 weeks ago
  • Dimas Tekad Santosa's Avatar
  • Dimas Tekad Santosa
  • Visitor
  • Thank you received: 0
Licenses:

Hi,

I think you current FFMPEG Path is correct, but the problem is come from your FFMPE setting in your server.. so please read again carefully the pdf file from me... in that doc you can see how to troubleshoot this issue.

thank you

11 years 3 weeks ago
  • Philip's Avatar
    Topic Author
  • Philip
  • Offline
  • Fresh Boarder
  • Posts: 25
  • Thank you received: 0
Licenses:
JomSocial Active Socialize Expired

ok, we've gone through this before, but here's the output for the version and the path for both ffmpeg and flvtool2:

FFmpeg version 0.6.5, Copyright (c) 2000-2010 the FFmpeg developers
built on Jan 29 2012 23:55:02 with gcc 4.1.2 20080704 (Red Hat 4.1.2-51)
configuration: --prefix=/usr --libdir=/usr/lib64 --shlibdir=/usr/lib64 --mandir=/usr/share/man --incdir=/usr/include --disable-avisynth --extra-cflags='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -fPIC' --enable-avfilter --enable-avfilter-lavf --enable-libdirac --enable-libfaac --enable-libfaad --enable-libfaadbin --enable-libgsm --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libx264 --enable-gpl --enable-nonfree --enable-postproc --enable-pthreads --enable-shared --enable-swscale --enable-vdpau --enable-version3 --enable-x11grab
libavutil 50.15. 1 / 50.15. 1
libavcodec 52.72. 2 / 52.72. 2
libavformat 52.64. 2 / 52.64. 2
libavdevice 52. 2. 0 / 52. 2. 0
libavfilter 1.19. 0 / 1.19. 0
libswscale 0.11. 0 / 0.11. 0
libpostproc 51. 2. 0 / 51. 2. 0
ffmpeg: missing argument for option 'v'
This email address is being protected from spambots. You need JavaScript enabled to view it. [~]# whereis ffmpeg
ffmpeg: /usr/bin/ffmpeg /usr/share/ffmpeg /usr/share/man/man1/ffmpeg.1.gz
This email address is being protected from spambots. You need JavaScript enabled to view it. [~]# whereis flvtool2
flvtool2: /usr/bin/flvtool2
This email address is being protected from spambots. You need JavaScript enabled to view it. [~]# flvtool2 -v
FLVTool2 1.0.6
Copyright (c) 2005-2007 Norman Timmler (inlet media e.K., Hamburg, Germany)
Get the latest version from www.inlet-media.de/flvtool2
This program is published under the BSD license.

Usage: flvtool2 [-ACDPUVaciklnoprstvx]... [-key:value]... in-path|stdin [out-path|stdout]

If out-path is omitted, in-path will be overwritten.
In-path can be a single file, or a directory. If in-path is a directory,
out-path has to be likewise, or can be omitted. Directory recursion
is controlled by the -r switch. You can use stdin and stdout keywords
as in- and out-path for piping or redirecting.

Chain commands like that: -UP (updates FLV file than prints out meta data)

Commands:
-A Adds tags from -t tags-file
-C Cuts file using -i inpoint and -o outpoint
-D Debugs file (writes a lot to stdout)
-H Helpscreen will be shown
-P Prints out meta data to stdout
-U Updates FLV with an onMetaTag event

Switches:
-a Collapse space between cutted regions
-c Compatibility mode calculates some onMetaTag values different
-key:value Key-value-pair for onMetaData tag (overwrites generated values)
-i timestamp Inpoint for cut command in miliseconds
-k Keyframe mode slides onCuePoint(navigation) tags added by the
add command to nearest keyframe position
-l Logs FLV stream reading to stream.log in current directory
-n Number of tag to debug
-o timestamp Outpoint for cut command in miliseconds
-p Preserve mode only updates FLVs that have not been processed
before
-r Recursion for directory processing
-s Simulation mode never writes FLV data to out-path
-t path Tagfile (MetaTags written in XML)
-v Verbose mode
-x XML mode instead of YAML mode

REPORT BUGS at projects.inlet-media.de/flvtool2
Powered by Riva VX, rivavx.com





what exactly do I need to tell my server support to look for??? I read through the PDF and other than recompiling ffmpeg, I don't see any "help" in there at all.

By the way, I installed and used 2 other video scripts that use ffmpeg and flvtool2 - the same as JS does - with no problem. As a matter of fact, they BOTH detected the path to my ffmpeg and flvtool2 without me having to put anything in for that. They also uploaded and converted the videos (the exact same videos I've been trying to use for Jom Social) with NO PROBLEMS!!!!!! Therefore, it is very apparent to me that it's not MY problem nor my SERVER'S problem, but a problem with JOMSOCIAL!!!!!

Mickey

11 years 3 weeks ago
  • Paul's Avatar
  • Paul
  • Visitor
  • Thank you received: 0
Licenses:

Hi Philip,

Lets see if we can get this worked out so you can get videos to convert on the server. There are a few things that i'd like you to try and if you could try these one at a time so we can see if we can find what the problem is

1. The first thing to do is ask you server administrator what the path is to your FFMPEG i notice that there are two /usr/bin/ffmpeg /usr/share/ffmpeg. Normally is would be /usr/bin/ffmpeg but please double check with your server admin. it looks like there is 2 copies on your server.

2. Can you please make a change to the file /components/com_community/helpers/videos.php

around line 279 please change the build FFMPEg code to this

// Build the ffmpeg command
		$config	= CFactory::getConfig();
		$cmd 	= array();
		$cmd[]	= $this->ffmpeg;
		$cmd[]	= '-y -i ' . $videoIn;
		  /**
+                 * @uses Server must compiled with libx264
+                 */
		$cmd[]	= '-vcodec libx264';
		$cmd[]	= '-acodec aac -ab 64k'; /* Set a lower bitrate (for example "-ab 64k") */
		$cmd[]  = '-strict -2';
		$cmd[]  = '-crf 23';
		$cmd[]	= '-s ' . $videoSize;
		$cmd[]	= $config->get('customCommandForVideo');
		$cmd[]	= $videoFullPath;

The command -ab 64k will slow down the bit rate which can be a problem sometimes.

Once you change this code and confirm the path to FFMPEG upload a video and and run the cron. The easeist way is to run it frontend by adding this to your sites URL
index.php?option=com_community&task=cron
so it would be
http://www.yoursite.com/index.php?option=com_community&task=cron
then see if the videos convert.

If it doesn't then the next thing to check, and you may need to ask your server administrator to check for you, is that you are not using a custom php.ini file in your root that is missing the line extension = "ffmpeg.so" some versions do not use this so it may or may not be applicable in this situation. If you have a custom php.ini file in the root of your hosting, comment it out to confirm that nothing is missing form the file. Commenting it out will force your site to use the servers master php.ini file which will have all the required information in it.

The next thing to look at is something that you posted previously [libx264 @ 0x84be90]broken ffmpeg default settings detected. While this is a long shot and can often be seen on a server when the bitrate is incorrect, but as we are running out of options have the server admin look into it. your should be able to manually run a video conversion @ terminal using SSH and it should not show any errors.

The last option would be to have the FFMPEG upgraded to a more recent version. Your ffmpeg is 0.65 and the current version is 2.02, so if you are reading this section because nothing else has worked then i would recommend you consider this option. Make sure you get libx264 compiled when they upgrade. The php.ini file will be relevant when you upgrade as the more recent versions do add extension = "ffmpeg.so" into the servers master php.ini file so make sure that they don't upgrade and leave a local copy of the php.ini file in your root.

Let me know how you get on after trying this.

One last thing is can you please edit your first post and update the login information, the details we have are not allowing me to log in so i cannot look / check anything. I know you have sent them by PM to Dimas but he is not on shift now so it doesnt help. this will be important for future support that you do this

11 years 3 weeks ago
  • Philip's Avatar
    Topic Author
  • Philip
  • Offline
  • Fresh Boarder
  • Posts: 25
  • Thank you received: 0
Licenses:
JomSocial Active Socialize Expired

Paul,
thanks for the reply. We're in the middle of a bunch of doctor's appointments - did half today and the rest tomorrow. When we get home tomorrow afternoon, I'll follow your instructions and then post the results.
I think I had mentioned in one of my posts that we had asked the server support and the correct paths are /usr/bin/ffmpeg and /usr/bin/flvtool2. The rest of it I'll work on tomorrow.
Also, it seems that something happened to the site. When we get back at it tomorrow, I'm re-doing the site and we'll go from there.
One quick question - when I redo the site, should I use the newest RC3 of JS or stay with the stable 3.1.1 version?

Thanks again,
Mickey

11 years 3 weeks ago
  • Paul's Avatar
  • Paul
  • Visitor
  • Thank you received: 0
Licenses:

Hi Philip,

If you are planning to setup the site and test / build it for the next week or so then RC3 is ok to install, but if you are going to install your site and make it live then i recommend using the stable release. I hope this makes sense.

I'll wait for your reply in a few days. I hope all goes well with the doctors. :)

11 years 2 weeks ago
  • Philip's Avatar
    Topic Author
  • Philip
  • Offline
  • Fresh Boarder
  • Posts: 25
  • Thank you received: 0
Licenses:
JomSocial Active Socialize Expired

Paul,
I apologize for the delay. We had some problems with our computers and phone lines. We're back online now.
I have to work tonight, but when I get home in the morning, I'll work on the site some more and post the results.
Thanks for your patience.

Mickey

11 years 1 week ago
  • Philip's Avatar
    Topic Author
  • Philip
  • Offline
  • Fresh Boarder
  • Posts: 25
  • Thank you received: 0
Licenses:
JomSocial Active Socialize Expired

Paul,
I just sent you a PM with information you probably will need.

Thanks again,
Mickey

11 years 1 week ago
  • Paul's Avatar
  • Paul
  • Visitor
  • Thank you received: 0
Licenses:

Hi Mickey,

I have had a good look at this and spoken with your hosting provider, The version of ffmpeg on the hosting account is 0.65 which is from 2012 This is a very old version and has incompatibilities with current code. I asked them about upgrading it and they replied with "it is something we will be doing but do not know when". we have tested ffmpeg on centos which i confirmed is the server they are running and FFMPEG would need to be upgrade for it to process videos.though Jomsocial

I notice that you mentioned you have used other applications and they convert OK on this server, but it is not that simple. We use the libx264 codec and they may be using a different one for there conversion.

This really is an issue you will have to peruse with the hosting company.
Because we are not able to view the sever logs (for obvious reasons) The support person said he was happy to look at the logs when the cron was run, but i then got no response back from them. This may be something you can follow up with them and get them to look in the logs for the error.

I also see in some previous replies there is a few errors coming back [libx264 @ 0x84be90]broken ffmpeg default settings detected.maybe discuss this with them also

Moderators: Piotr Garasiński
Powered by Kunena Forum

Join 180,000 websites creating Amazing communities

JomSocial is the most complete, easy-to-use addon that turns Joomla CMS into a
full -fledged, social networking site

TRY NOW BUY NOW