Re: Convert video clip to .vdr format

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Dick,

i wrote a small shellscript which does the job. It looks, if the original video is a mpg
or different and do the right steps to get a vdr-video. You need mencoder and genindex for
the script. Let me know, if this works for you, too.

regards,
Friedhelm.


Dick Streefland wrote:
> I'm trying to convert video clips from my camera (KonicaMinolta A200)
> to .vdr format, so that I can watch them using vdr, but so far I had
> no success. The format is MJPEG 640x480 30fps, with PCM audio
> (7875x16x1). I can convert it to MPEG4 with:
> 
> transcode -i "$in" -x mov,ffbin -y ffmpeg -F mpeg4 -N 0x55 --no_audio_adjust -E 11025,16,1 -o "$out"
> 
> but i cannot convert it to MPEG2. I found some hints that I could use
> mplayer to do the conversion, something like:
[..]

> 
> However, when I play this with vdr (after generating the index.vdr file
> with genindex), this video is not the right size, it skips every few
> seconds and there is no sound.
> 
> What do I have to do to get a proper vdr recording?
> 

#!/bin/bash

set -x

VIDEODIR="/video0";

if [ $# -lt 1 ];
then
    echo >&2 "`basename $0`: import mpeg file in vdr"
    echo >&2 "Usage: `basename $0` filename.mpg"
    exit 1
fi

if [ ! -d $VIDEODIR ];
then
    echo >&2 "Target video directory does not exist"
    exit 1
fi

echo $1

BASENAME=`echo "$1" |perl -pe  's#^.*/(.*)\..*?$#$1#' | perl -pe 's# #_#g'`
SUFFIX=`echo "$1" | perl -pe 's#^.*\.##'`

DATE=`date '+%F.%H:%M.50.50.rec'`;
TARGETDIR="$VIDEODIR/$2/$BASENAME/$DATE";

mkdir -p "$TARGETDIR"

if [ "$SUFFIX" <> "mpg" ]; then
	nice mencoder -ofps 25 -oac lavc -ovc lavc -of mpeg \
	-mpegopts format=dvd -vf scale=720:576,harddup \
	-srate 48000 -af lavcresample=48000 -lavcopts \
	vcodec=mpeg2video:vrc_buf_size=1835:vrc_maxrate=9800:vbitrate=5000:keyint=2:acodec=mp2:abitrate=192:aspect=4/3 \
	-o $TARGETDIR/001.mpg "$1"

	nice genindex -i $TARGETDIR/001.mpg -r -d "$TARGETDIR" -s 400
	rm $TARGETDIR/001.mpg
	else
	nice genindex -i "$*" -r -d "$TARGETDIR" -s 400
	fi
touch $VIDEODIR/.update
_______________________________________________
vdr mailing list
vdr@xxxxxxxxxxx
http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr

[Index of Archives]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Util Linux NG]     [Xfree86]     [Big List of Linux Books]     [Fedora Users]     [Fedora Women]     [ALSA Devel]     [Linux USB]

  Powered by Linux