On-the-fly transcoding -- too slow?

About encoding, codec settings, muxers and filter usage
StriatedFoot
New Cone
New Cone
Posts: 2
Joined: 31 Oct 2010 01:53

On-the-fly transcoding -- too slow?

Postby StriatedFoot » 31 Oct 2010 02:02

I want to transcode 720p files into something that will be playable on my original xbox (which cannot handle 720p) for use on a 19" tv. So, obviously, the quality doesn't have to be very good, let alone 720p. These files are encoded with h.264 video and AAC audio. Using mediatomb, I want to encode them in real-time and stream them within the local LAN.

Here's what I have.

Code: Select all

<agent command="vlc" arguments="-I dummy %in --sout #transcode{venc=ffmpeg,vcodec=mpeg4,vb=1000,fps=25,aenc=ffmpeg,acodec=mp3,ab=128,samplerate=44100,channels=2}:standard{access=file,mux=ps,dst=%out} vlc:quit"/>
I've been able to get this to work for very low bitrate files. I cannot get it to work for higher bitrate files, even at 480p resolution nevermind 720p. My computer gets pinned at 100% CPU usage and the thing never streams. BTW, this is an AMD processor (Athlon around 2.4GHz?) with two cores.

I've read that people have been able to do this. Are they using much faster machines, or am I doing something wrong? Any suggestions would be welcome.

PS - I don't need to encode audio at all...I'm fine with passing through the original audio stream, although I don't know how through VLC. All I'm trying to do is knock the bitrate/resolution down so that the xbox can handle it. Am I taking the wrong approach?

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: On-the-fly transcoding -- too slow?

Postby Jean-Baptiste Kempf » 31 Oct 2010 02:37

Don't specify acodec at all
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

StriatedFoot
New Cone
New Cone
Posts: 2
Joined: 31 Oct 2010 01:53

Re: On-the-fly transcoding -- too slow?

Postby StriatedFoot » 31 Oct 2010 02:00

Thanks, I yanked the audio stuff and so it doesn't seem to be transcoding that anymore.

Anyway, I try to play a 480p h.264 file and the transcoding computer's CPU hits 100% briefly and then it doesn't play. However, when I do a straight transcode of the file using ffmpeg directly (with the same bitrates), it encodes at approx 150 fps -- more than enough to do it in realtime. And when I try to play the encoded file back on the xbox, it plays fine.

So, it seems that the CPU is able to do the transcoding quickly enough, but not when VLC is involved. Any idea what's hanging me up?

armislv
New Cone
New Cone
Posts: 2
Joined: 01 Nov 2010 15:51

Re: On-the-fly transcoding -- too slow?

Postby armislv » 01 Nov 2010 16:49

Btw, I was able on-the-fly transcode to 4 mbit MP4S with old vlc 0.8.4, but with the newer one - no more on the same hardware. Tested with 1.1.4 right now.
With 0.8.4 CPU usage by vlc is 50-60%, 1.1.4 - 100+%, "late buffer for mux input" messages and dropped frames.
Here is how vlc is started:
0.8.4:

Code: Select all

vlc -I rc v4l:// :v4l-vdev="/dev/video" :v4l-adev="/dev/dsp" :v4l-norm=0 :v4l-frequency=-1 :v4l-caching=300 :v4l-chroma="" :v4l-fps=-1.000000 :v4l-samplerate=44100 :v4l-channel=0 :v4l-tuner=-1 :v4l-audio=-1 :v4l-stereo :v4l-width=768 :v4l-height=576 :v4l-brightness=-1 :v4l-colour=-1 :v4l-hue=-1 :v4l-contrast=-1 :no-v4l-mjpeg :v4l-decimation=1 :v4l-quality=100 sout='#transcode{vcodec=mp4v,vb=4096,scale=1,acodec=mp3,ab=128,channels=2}:duplicate{dst=std{access=http,mux=asf,url=:1234}}'
1.1.4:

Code: Select all

vlc -vvv v4l2:// :v4l2-width=768 :v4l2-height=576 :v4l2-quality=100 :v4l2-caching=300 :input-slave=alsa:// :samplerate=48000 :sout='#transcode{vcodec=mp4v,vb=4096,scale=1,acodec=mp3,ab=128,channels=2}:duplicate{dst=std{access=http,mux=asf,dst=:1234}}'
cpu:

Code: Select all

processor : 0 vendor_id : GenuineIntel cpu family : 15 model : 2 model name : Intel(R) Pentium(R) 4 CPU 2.40GHz stepping : 9 cpu MHz : 2400.000 cache size : 512 KB flags : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe pebs bts cid xtpr bogomips : 4823.32 clflush size : 64 cache_alignment : 128 processor : 1 vendor_id : GenuineIntel cpu family : 15 model : 2 model name : Intel(R) Pentium(R) 4 CPU 2.40GHz stepping : 9 cpu MHz : 2400.000 cache size : 512 KB lags : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe pebs bts cid xtpr bogomips : 4822.32 clflush size : 64 cache_alignment : 128
Should I report this on trac.videolan.org?


Return to “VLC stream-output (sout)”

Who is online

Users browsing this forum: No registered users and 14 guests