HD H.264 on-the-fly transcoding with VLC?

About encoding, codec settings, muxers and filter usage
shrubber
New Cone
New Cone
Posts: 1
Joined: 11 Oct 2007 16:35

HD H.264 on-the-fly transcoding with VLC?

Postby shrubber » 11 Oct 2007 16:48

I have a need to transcode on the fly HD streams (1080i and 720p) that are 12-22 Mbps MPEG-2 into H.264 streams. Does anyone know if this is even possible with VLC? Decent servers seem to barely be able to keep up with SD (about 4 Mbps Mpeg-2) when transcoding to H.264. Is HD to H.264 on the fly just too far out of reach for software? Are there any H.264 hardware acceleration boards or anything that would help VLC to be able to do this? Personally, I prefer the flexibility (and cost) of VLC to do this sort of thing over dropping 50k on an HD h.264 encoder appliance to do this.

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

Re: HD H.264 on-the-fly transcoding with VLC?

Postby Jean-Baptiste Kempf » 11 Oct 2007 17:53

yes, this is doable. But prepare for a Quadro-Bi-Xeon to do so :D
You need a really big server and correctly tune vlc but this is doable.
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.

daubman
New Cone
New Cone
Posts: 2
Joined: 13 Apr 2007 15:13
Location: Massachusetts

Re: HD H.264 on-the-fly transcoding with VLC?

Postby daubman » 23 Oct 2007 20:56

I'm looking for information on a similar live transcoding situation (iLink HD in, VLC transcode and stream RTP out). Do you have any pointers as to how to tune VLC appropriately (or at least get started tuning) as well as what hardware would really help... from what I've read recently, multi-core/multi-proc is not currently used for transcoding by VLC, so more procs/cores will not help in this regard...

Thanks,
~Aaron

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

Re: HD H.264 on-the-fly transcoding with VLC?

Postby Jean-Baptiste Kempf » 23 Oct 2007 23:16

You haven't read correctly.

x264 encoding is multi-threaded and will benefit hugely from multi-cores.
H.264 decoding is not multi-threaded.
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.

hihi
Blank Cone
Blank Cone
Posts: 49
Joined: 09 Jan 2007 08:48

Re: HD H.264 on-the-fly transcoding with VLC?

Postby hihi » 25 Oct 2007 16:36

Hi,

Is it possible to transcode an HD H.264 tream into a SD MPEG2 with a normal pc? and if yes how do I do the trancoding from HD to SD?

ps is it possible to decode AC-3 into the regular MPEG1 L2 L+R with downmix?

thanks

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

Re: HD H.264 on-the-fly transcoding with VLC?

Postby Jean-Baptiste Kempf » 25 Oct 2007 18:21

Yes, if you have a powerfull PC.
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.

hihi
Blank Cone
Blank Cone
Posts: 49
Joined: 09 Jan 2007 08:48

Re: HD H.264 on-the-fly transcoding with VLC?

Postby hihi » 25 Oct 2007 20:26

j-b

can you give me some code exaples I tried with transcode height en width parameters but it didn't work ...

also transcoding from H.264 didn't go well, it even seems that VLC isn't able to play back the live HD H.264 feed @ 9Mbps ...

gepebril
Blank Cone
Blank Cone
Posts: 76
Joined: 22 Oct 2007 23:31

Re: HD H.264 on-the-fly transcoding with VLC?

Postby gepebril » 28 Oct 2007 11:43

Hi there,

I was working on a similar kind of project (DVB MPEG-2 TS -> H264) and I have to warn you.
Aslong as you playback your created files on a VLC player there is no issue. But h264 created by VLC is not
compatible with other platforms/codecs. I've tested multiple sources and all H264 (mp4/asf) created with VLC
had audio sync problems on ffdshow codecs and XBMC(Xbox Media center).

I'm not sure if the development team is aware of this.... I think it is market protection, as e.g. divx4/5/6 are not supported in VLC
and options like 2-pass are not available for Divx3 to create HQ lowbitrate files.

gr,

Albert

mikeytown2
New Cone
New Cone
Posts: 2
Joined: 28 Dec 2007 02:19

Re: HD H.264 on-the-fly transcoding with VLC?

Postby mikeytown2 » 28 Dec 2007 03:11

I am interested in this as well. This is the setup i would like to do
HDV or DV cam -> Firewire -> Windows XP -> VLC Encoder (H.264) -> Internet -> VLC Decoder
With the Core 2 Quad processors this could be doable.
Low Latency would be nice

Other Solutions i have found
If bandwidth is not a problem
http://apps.internet2.edu/dvts.html

If money is not a problem (IP-9500 HD Video Encoder/Decoder)
http://www.fujitsu.com/us/services/comp ... als/video/

vlcdogs
New Cone
New Cone
Posts: 7
Joined: 15 Dec 2007 00:28

Re: HD H.264 on-the-fly transcoding with VLC?

Postby vlcdogs » 03 Jan 2008 20:56

On the fly here no way but if you record the HD to file then rencode it to mpeg2 at 4000 bps and save it to file only,, don't view it just save to file you will end up with awesome results. "then"
rencode it again to h264 at 700 kbps and save to file. once made file can be watched from file.

Source is HD mpeg2 4:2:0


First transcode I use mpeg2 at 4000 .mpg audio default. 350 mg down to 90 meg.

second transcode h264 700 scale .5 audio mps asf container. file size = 20 meg

unreal

I recorded tochd for 30 minutes...North America.. 4 gigs. After the second conversion file size is 650 megs.
Picture is hard to tell it is is squeezed so much. Looks as good as the original to the untrained eye.

Here is a snapshot of the finish video.

http://i31.photobucket.com/albums/c372/ ... -77998.png
http://i31.photobucket.com/albums/c372/ ... -84993.png
http://i31.photobucket.com/albums/c372/ ... -84327.png

mikeytown2
New Cone
New Cone
Posts: 2
Joined: 28 Dec 2007 02:19

Re: HD H.264 on-the-fly transcoding with VLC?

Postby mikeytown2 » 03 Jan 2008 23:13

If your not Encoding on the fly you might as well use Virtual Dub [http://www.virtualdub.org/] to capture from using HuffYUV [http://neuron2.net/www.math.berkeley.ed ... ffyuv.html] or [http://en.wikipedia.org/wiki/Lossless_d ... ompression] as the capture codec. Or if your source is HDV use HDVSplit [http://strony.aster.pl/paviko/hdvsplit.htm]; DV use WinDV [http://windv.mourek.cz/]. Once your source is on the computer use MeGUI [http://mewiki.project357.com/] to encode it to H.264.

The beauty of VLC is that there is the potential to do a "Live" good quality (h.264) stream. The problem is, i have not found a way to do this.

vlcdogs
New Cone
New Cone
Posts: 7
Joined: 15 Dec 2007 00:28

Re: HD H.264 on-the-fly transcoding with VLC?

Postby vlcdogs » 04 Jan 2008 03:27

One way is to stream to network and transcode on a different machine.. Some delay. But this way you could get the signal on one machine and send the transcoding to a dedicated machine with some sick cpu power.


My video files have bad spot coming from this motherboard. It has been this way for a year. All videos have skip spots and converting programs crash when the see them. VLC doen'nt. My good. When you see the sample clip you will see the bad spots and vlc rides right through them. Never misses a beat. Cool



On my live broadcast of news feeds I use:


:sout=#transcode{vcodec=h264,vb=128,fps=12,scale=0.85,deinterlace,acodec=mp3,ab=64,channels=2}:duplicate{dst=display,dst=std{access=http,mux=asf,dst=192.168.1.230:10005}}

Low loading and a sharp pic. I use this mainly to send weather type channels to remote locations.

P4 3.2 1 gig ram 1.5/1.5 cox.

PS: There is a super fast HD converter called "Avivo video converter any card "that does super fast HD to h264 avi and mov and other containers. I was thinking it would be possible to write a graph to use these filters to do on the fly. If you haven't tried it it is worth a look. Porgram runs on xml graphs. So if the right sort could write a graph to do on the fly it should work.

Seatch the converter online and look for "Avivo video converter any card ". get it and try it. The get to graphing it.....Cool

tkapela
Blank Cone
Blank Cone
Posts: 13
Joined: 11 Nov 2008 18:15

Re: HD H.264 on-the-fly transcoding with VLC?

Postby tkapela » 24 Nov 2008 07:55

x.264 indeed will scale up to hd resolutions. I've successfully used vlc/x264 at 1440x1080 and 1920x1080 60i/30p on single-chip quad core boxen, though not with certain combinations of options - i.e. ref=2 or 3 tops with a GoP > than ~90 frames, and of course, some direct-prediction modes and motion estimation modes will consume more cpu than available, so stick with defaults there.

With the following options, 1440x1080p30 takes ~350% of a quad core box. Here's the stats:

-x64 vlc 0.9.6

-2.6.25.18-0.2-default #1 SMP 2008-10-21 16:30:26 +0200 x86_64 x86_64 x86_64 GNU/Linux

-model name : Intel(R) Xeon(R) CPU E5410 @ 2.33GHz

-#transcode{vcodec=h264,acodec=mp4a,ab=128,channels=2,deinterlace,threads=4,vb=2000,venc=x264{keyint=120,bpyramid,chroma-me,me-range=8,ref=1,ratetol=1.0,8x8dct,mixed-refs,direct=auto,direct-8x8=-1,non-deterministic,scenecut=50}}

So, HD resolutions indeed can be live-transcoded without alot of BS. In my cases, the video arrives on mp2ts UDP mpeg2, decompresses, and goes back out h264, and fits within a quad-cores' resources. More would be merrier indeed, but a reasonable qc box can do it.

-Tk


Return to “VLC stream-output (sout)”

Who is online

Users browsing this forum: No registered users and 4 guests