VLC Transcoding issues!!! *HELP PLEASE*

Need help? Post your questions here.

Moderator: moderators

VLC Transcoding issues!!! *HELP PLEASE*

Postby spitefulmonkey » Tue Jun 28, 2011 3:52 pm

I'm having issues with using VLC to transcode video. It pushes the CPU to 100% but more importantly it doesn't end the process when canceling the video stream. So the computer sits at 100% usage even after logging off from the server. It's a I5 2600k with 12gb ram. Im not sure it should be maxxed out to transcode a a simple xvid. I would be happy just to get it to end the process when logging off though.

All ideas and help welcome please, and thank you.
spitefulmonkey
 
Posts: 6
Joined: Tue Jun 28, 2011 4:44 am

Postby GJ51 » Wed Jun 29, 2011 1:56 am

Why not just use ffmpeg? The recent builds work very well with every file type I've tried, including xvid.
Gary J

http://bios-mods.com
http://www.maplegrovepartners.com
http://theaverageguy.tv/category/tagpodcasts/cyberfrontiers/
User avatar
GJ51
 
Posts: 3492
Joined: Wed Oct 20, 2010 11:58 pm
Location: Western New York

Postby spitefulmonkey » Wed Jun 29, 2011 11:28 pm

VLC seems to do a better job for me. The video is much less blocky and better looking with VLC. Perhaps I'll mess with ffmpeg some more though since I cant seem to get vlc to act right.
spitefulmonkey
 
Posts: 6
Joined: Tue Jun 28, 2011 4:44 am

Postby nerbrume2 » Thu Jun 30, 2011 8:57 am

Hi,
+1 for vlc, more efficient, decoding is hardware-acelerated, and support subtitles.

I encountered the same problems, here is the bash script I use to avoid them (using a trap command). It almost always work. Tweak the cvlc command to your likings, but do not forget the "&".
Call it with (in subsonic) : vlc.sh %s %b %o %w %h

Code: Select all
#!/bin/bash
function trap_cmd {
#echo $vlcpid 1>&2
sleep 2
kill $vlcpid
sleep 20
kill $vlcpid
exit
}

file=$1
bitrate=$2
start=$3
sizew=$4
sizeh=$5
subtrack=0
filenoext=`echo $file|sed -e "s/\.[^.]*$//"`
if [ -f "$filenoext".fr.* ] && [ -f "$filenoext".en.* ]
    then subtrack=1
fi
/usr/bin/cvlc -I dummy "$file" -q --start-time=$start :sout="#transcode{venc=x264{profile=main,level=3,keyint=50,vbv-maxrate=$bitrate,vbv-bufsize=512,no-mbtree,no-mixed-refs,ref=2,subme=4,weightp=1,me=umh},vcodec=h264,vb=$bitrate,vfilter=canvas{width=$sizew,height=$sizeh,aspect=$sizew:$sizeh,padd},aenc=ffmpeg{aac-profile=low},acodec=mp4a,ab=64,soverlay}:standard{access=file,mux=ffmpeg{mux=flv},dst=-}" --sub-language="fr,any" --sub-track=$subtrack vlc://quit 2>/dev/null &
sleep 2
vlcpid=$!
echo "VLC pid is "$vlcpid
trap "trap_cmd" 0 1 2 3 4 5 6 7 8 10 12 13 14 15 20
wait $vlcpid


PS : however, something is still buggy here, and I would like to know what. Basically, subsonic often fail to kill vlc because it won't use the right pid for the script and/or the encoder process.
nerbrume2
 
Posts: 1
Joined: Thu Jun 30, 2011 8:46 am

Re: VLC Transcoding issues!!! *HELP PLEASE*

Postby marsmayhem » Thu Sep 08, 2011 7:08 pm

Sorry to revive an old post, but I was wondering if you had tried adding "vlc:quit" to the end of your commandline to tell VLC to quit once it's done doing the transcoding.. I'm just getting into VLC, and I'm having similar issues, but I saw this somewhere else and remembered the problem you'd been having..
marsmayhem
 
Posts: 19
Joined: Wed Aug 10, 2011 7:09 am


Return to Help

Who is online

Users browsing this forum: No registered users and 18 guests