Ok, new problem.
Here is the script and how it has been modified so far
#!/bin/bash
### Transcode mp4 files for the roku
if [ -z $3 ]; then
echo "Usage: `basename $0` filename"
exit 0
fi
#Wait while any other ffmpeg processes are running
while [ -n "$(ps -ef | egrep "ffmpeg" | grep -v grep)" ];
do
echo -e "\n[$(date +%b\ %d\ %Y:\ %H:%M:%S)]\nFound another instance of ffmpeg running, pausing 5 minutes..."
sleep 300
done
# ffmpeg cmd
/home/phil/ffmpeg/ffmpeg -i /media/Media/tv/$3.* -mbd rd -trellis 2 -cmp 2 -subcmp 2 -g 100 -pass 1 -acodec libfaac -ab 192k -ac 2 -threads 0 /media/Media/tv/$3.mp4
exit 0
As you can see I just needed to point to the installation path of ffmpeg as well as the full file input and output paths and change the $1(folder) to a $3(clean job name).*
So the problem now is it starts up ffmpeg but closes with this:
ffmpeg version git-2012-06-22-15bde06 Copyright (c) 2000-2012 the FFmpeg developers
built on Jun 22 2012 16:30:44 with gcc 4.6.3
configuration: --enable-gpl --enable-libfaac --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-nonfree --enable-version3 --enable-x11grab
libavutil 51. 60.100 / 51. 60.100
libavcodec 54. 29.100 / 54. 29.100
libavformat 54. 11.100 / 54. 11.100
libavdevice 54. 0.100 / 54. 0.100
libavfilter 2. 82.100 / 2. 82.100
libswscale 2. 1.100 / 2. 1.100
libswresample 0. 15.100 / 0. 15.100
libpostproc 52. 0.100 / 52. 0.100
Input #0, avi, from '/media/Media/tv/Weeds.S07E02.BDRip.XviD-CLUE.avi':
Metadata:
encoder : VirtualDubMod 1.5.10.2 (build 2540/release)
Duration: 00:27:56.47, start: 0.000000, bitrate: 1169 kb/s
Stream #0:0: Video: mpeg4 (Advanced Simple Profile) (XVID / 0x44495658), yuv420p, 624x352 [SAR 1:1 DAR 39:22], 23.98 tbr, 23.98 tbn, 23.98 tbc
Stream #0:1: Audio: mp3 (U[0][0][0] / 0x0055), 48000 Hz, stereo, s16, 32 kb/s
[buffer @ 0x3283440] w:624 h:352 pixfmt:yuv420p tb:125/2997 fr:2997/125 sar:1/1 sws_param:flags=2
[ffmpeg_buffersink @ 0x32605a0] No opaque field provided
[libx264 @ 0x325c500] using SAR=1/1
[libx264 @ 0x325c500] using cpu capabilities: MMX2 SSE2Fast SSSE3 Cache64
[libx264 @ 0x325c500] ratecontrol_init: can't open stats file
Output #0, mp4, to '/media/Media/tv/Weeds.S07E02.BDRip.XviD-CLUE.mp4':
Metadata:
encoder : VirtualDubMod 1.5.10.2 (build 2540/release)
Stream #0:0: Video: h264 (hq), yuv420p, 624x352 [SAR 1:1 DAR 39:22], q=-1--1, pass 1, 90k tbn, 23.98 tbc
Stream #0:1: Audio: none, 48000 Hz, stereo, s16, 128 kb/s
Stream mapping:
Stream #0:0 -> #0:0 (mpeg4 -> libx264)
Stream #0:1 -> #0:1 (mp3 -> libfaac)
Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height
I am trying to work through this on my own the best I can but would appreciate any help.
-phil