Project

General

Profile

Create an iPad copy at end of recording - RPi

Added by David Coad almost 12 years ago

Hi,

I want to create a shell script to create a mp4 version of the mkv recording.

I am using tvheaedend on a raspberry pi, ffmpeg doesn't install well so I tested avconv and it worked for one file but I want it to be an automatic process.

I tried using the example (which uses ffmpeg) on the site but cant get it working

Does anyone have an example I could use to get started?

Dave


Replies (1)

RE: Create an iPad copy at end of recording - RPi - Added by Alex . almost 12 years ago

David Coad wrote:

Hso I tested avconv and it worked for one file but I want it to be an automatic process.

I dont use avconv, but if you have a "working" example of the avconv command you would like to use you should put it in a bash script.
First make sure the bash script works from the commandline, and after that try from tvheadend.

My bash script (also based on the example but shorter) is convert.sh:

#!/bin/bash
echo "start script"
/bin/date >>/opt/tvheadend/home/convert.log
/usr/bin/ffmpeg -y -i "$1" -b 1000000 -ac 2 "$1.mpeg" </dev/null >>/opt/tvheadend/home/convert.log 2>&1

If you replace the ffmpeg-line with your command I guess it should work.
$1 is the filename which is taken as an option when calling the script.

It is called from the post-rpoccesor commandline in tvheadend :
/opt/tvheadend/home/convert.sh %f %t

Hope this helps,

Alex.

PS posting code with '@' doesn't work that well on this forum it seems...

    (1-1/1)