mkv, ogm ?

Discussion about configuration and usage of VLM (a stream scheduler) within VLC.
songoo
Blank Cone
Blank Cone
Posts: 18
Joined: 17 Jan 2009 03:41

mkv, ogm ?

Postby songoo » 17 Jan 2009 03:58

Edited so now i know my questions was little insane ,so:
I am using Windows xp, so questions and answers are xp oriented , but may help everyone .

-[solved] for Vorbis audio in .OGM (no sound played with base rtp{mux=ts,dst=233.20.11.1})
in config file :
setup channel1 output
#transcode{acodec=mpga,ab=512,channels=2}:rtp{mux=ts,dst=233.20.11.1,sap,name="TVchannel"}

-[solved]for V_MS/VFW/FOURCC,XVID in .MKV (errors in stream with just rtp{mux=ts,dst=233.20.11.1})
setup channel1 output #transcode{vcodec=DIV3,vb=4096,scale=1,venc=ffmpeg}:rtp{mux=ts,dst=233.10.1.1}
****
-or see below how to make it to avi or mp4, so no transcoding needed(transcoding is lowerign quallity)

-[solved]for V_MPEG4/ISO/AVC in .MKV (errors in stream with just rtp{mux=ts,dst=233.20.11.1})
setup channel1 output #transcode{vcodec=DIV3,vb=4096,scale=1,venc=ffmpeg}:rtp{mux=ts,dst=233.10.1.1}
****
-or see below how to make it to avi or mp4, so no transcoding needed(transcoding is lowerign quallity)

-[solved]for H264 in .avi (no video just sound )
setup channel1 output #transcode{vcodec=DIV3,vb=4096,scale=1,venc=ffmpeg}:rtp{mux=ts,dst=233.10.1.1}
****
-or see below how to make it to mp4, so no transcoding needed(transcoding is lowerign quallity)

****You maybe ask, why the hell just dont use x264 enc or mp4enc.. , its since is like hell get ffmpg x264 enc for xp, if you succeed in that please inform us . (for linux users:
"<deathkin> FWIW I used vlc + libx264 + ffmpeg packages on ubuntu and they all worked fine for "
"<deathkin> are you doing 'transcode{venc=x264,vcodec=h264,...}' ? the venc is necessary to tell it which library it should be looking for"
"<xtophe> the h264 installer is libx264 not ffmpeg"

-maybe it will help you . [SolvedEdited] : mux it to mp4, or avi .
)

-[lmao solved..] How to choose which autio track will be played ?
Im using mkvmerge GUI v2.2.0, rearange order of audio tracks and in few sec its done .
dont laught .. :) .
-or sout-all and watchers can choose audio track themselvs .
////////////////////////////////////////////////

-[solved]Another problem, have 3videos in playlist, vhen one is on end, and next one start, there will be seen few secs of second video, then it will fall down, and people have to click on tv in sap again to watch channel?

Add to vlc shorcut properties ,to target area --sout-keep ** , and also for make sure in http control center in option for channel sout-keep (setup channel1 option sout-keep)

** F:\vlc-0.9.6\vlc.exe --sout-keep --ttl 2 --extraintf http --intf wx
(btw ttl 2 -broadcast will not get to longer distance than 2routers, http to allow http access in browser)


-[lmaoSolved]Even with sout-keep there sometime random(but no so offten) appear falling of channel, or only black screen on watchers side(they have to 2click to continue watch (streaming station -xp, athlon dual core))
Some advice i got :"<t0mm> on the client side, vlc --upd-caching 8000 ( for 8sec of buffer ), but.. make sure you notice user about the initial delay when streaming start ( or connected to )"
-still falling
- Dont use mkv, make avi or mp4 instead -see 28.1.2008 below.
- Or try shut down sout-all with no-sout-all {in shorcut and vlm option)


-[Solved] How to schedule playlist in vlm ?
Having some video with TV logo (tvspot.avi) , create channel with playlist loop, add there videospot.avi, then use schedule to add other video/s , and then another schedule to delete added playlist items and add some news can do the trick.

Example :
config.txt :

new channel1 broadcast enabled
setup channel1 input tvspot.avi
setup channel1 output #rtp{mux=ts,dst=233.20.11.1,sap,name="our TV"}
setup channel1 loop
control channel1 play


new my_sched schedule enabled
setup my_sched date 2009/01/17-21:30:00
setup my_sched append setup channel1 input animevideo.ogm

new my_sched2 schedule enabled
setup my_sched2 date 2009/01/17-22:30:00
setup my_sched2 append setup channel1 inputdel animevideo.ogm
setup my_sched2 append setup channel1 input killingmachine.ogm

*or with "inputdell all" you ll dell all input ideos.

///in case .OGM and audio problem passage with output would be
setup channel1 output #transcode{acodec=mpga,ab=512,channels=2}:rtp{mux=ts,dst=233.20.11.1,sap,name="our TV"}

-[solved] While playing gow to change order of items, how to stop playing actual item and jump to another?
control channel1 play ID (ID = 1,2,3 and so )
or to change playing position in currently playing video >
control channel1 seek +90% (will go 90per of time further)

-[solved] How to play dual audio, multiple audio tracks and subtitles :
setup channel1 option sout-all
But in XP dont forget also --sout-all in target in shorcut properthies of vlc .
Wiewers cann select tracks in vlc normal like normal .

Credits : Thnx to dionoea,j-b,deathkin

////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////[Edited 28.1.2008] - h264,mpg4///////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////
"Transcoding is not the way, muxing is."

So , some time passed, long google days, no help from nowhere :D , maybe next passage will help others speed up what they want .


:"Mkv is format that is streamble in Vlc, but also its not"

True maybe you get streamablesome mkv with xvid videos without transcoding without video errors,but you can feel random crashes of stream on watchers side, and others videos havevideo errors while streaming.. But there is still solution, you can stream without problems and without transcoding any XDIV (DIV3,V_MS and so on), but they have to be .avi .

- Use MKVtoolnix(mkvmerge can show you type of video in mkv), and MKVextractGUI(paste extractor files in mkvtoolnix) to extract elements from mkv, and you can make from it dual audio avi with AVIMux_GUI .

-You can get trouble with ogg, use Audacity(i tried 1.3beta), to convert it to mp3 or ac3 .

Ok but what about h264 and MPG4 ?
The name of solution is .mp4 container, just throw video and audio to mp4 , and you can stream h264 with vlm without transcoding . And have in mind we are muxing, not encoding, so mp4 process is quite fast.

Just demux(MKVextractGUI for mkv,OGMDemuxer for ogg) to audio files
and video .h264 file. Then use MP4Box, quite small program, extract it, start-run-cmd, in commandline go to florder where you extracted mp4box ("cd C:\mp4box") , next we use(in comandline) easy syntaxt for creating mp4 files:

examle :

MP4Box -fps 23.976 -add RawTrack1.h264 -flat -new outfile.mp4
-will create mp4 with video (flat -for streaming type of video)

MP4Box -fps 23.976 -add track2.mp4#ID=2 -flat outfile.mp4
-will add audio track to existing video, .acc or .acc in .mp4 ,#ID=2 mean that this track will have id 2, useful for adding delay later.

(i copied RawTrack1.h264 and audio track to mp4box florder so i used relative paths for them)

MP4Box -delay 2=2000 outfile
-will add 2000 miliseconds delay to audio track with id 2. **

MP4Box -info outfile.mp4
- will display informations about created mp4, mainly the duration of audio and video file which can help with determining time to delay audio . **

But what about ac3, or .ogg audio ? , mp4box wont accept it you have encode it to mp3 or acc, use BeLight to do that. (BeLight and BeSweet, download both and to same florder, there are guides like "ac3 to acc" using BeLight on http://www.doom9.org, (just drag drop audio and use in menu ,example : Presets-ACC-LC-VBR/5.1 220/250 )) . Dont forget to check, if duration of track is same as source one .

** You can find fps of video in player(vlc) , or using mediainfo(that is name of program), but as i saw sometime it can lye, if is something wrong and video is rapidly shorter try some of standard fps rates (23.976, 25 and so on). And sometime even if you set right fps video have + 2 sec at the beginning sou audio sync is wrong, use -info and -delay commands.


Am pretty fresh at it , but when all is all right (x264 and acc or mp3) whole proces is about 3minutes .
Mp4 is format for streaming, and vlcdont have problem with that (same for .ts) .
(also sometime there is strange error that you dont see mp4 video while vlm streaming , that can be solved by transcoding audo (to mga or mp3), or in another way be deleting transcoding of audio(if is some set))

//////////////////////////////////////////////////////////////////////////////
So if you tryied to go with mp4 muxing solution , you may enounter strange a/v sync problems , shorter videos ressults and so , even if you muxed it with same fps as the video have (mkvinfo.exe,MediaInfo).

And maybe you even tried to guess fps to get the same lenght as source , but a/v sync was still no good.

So in this case you encountered vfr video (variable frame rate).
There is no constant value of frames per second, but frames have its values which tell them when to start and so on , so when you use mp4box to mux it at constant framerate(even when info sayis it have this one), result video will be shorter than source.

[solved]
Vfr mkv to Vfr mp4 :

Example video : examplevideo.mkv

Run MkvExtractgui.exe(v1.6.4.1, mkvtoolnix), drag examplevideo.mkv to it ,
in MkvExtractgui select options/tabs/timecode,
in MkvExtractgui in content window check a box which is located next to video track(mainly track ID 1(mpg4,h264 and so) ),
click extract, you ll get examplevideo_Track1.h264 and TimeCode_Track1.txt(its txt with video variable timecodes).
(*with MkvExtractgui you can get all parts of mkv like audio tracks and subtitles extracted)

So we have examplevideo_Track1.h264 and TimeCode_Track1.txt,
Mux examplevideo_Track1.h264 with MP4box.exe to mp4 with constant frame rate.
(I used mkvinfo(mkvtoolnix) to find out fps of mkv video [**in totalcomander go to MKVtoolnix florder ,use "cmd" command in totalcmd command line (at bottom), or just (xp) start/run/cmd and use cd "targetflorder"(TAB can help) or cd .., anyway in cmd i used command "mkvinfo E:\Anime\mp4\examplevideo.mkv" to get
detailed informations and mainly fps,in our case 29.970 .
Or simply use mediainfo program.)

Mux examplevideo_Track1.h264 with MP4box.exe with command(**) :
MP4Box -fps 29.970 -add E:\videos\examplevideo_Track1.h264 -flat -new cfrexamplevideo.mp4

cfrexamplevideo.mp4 have shortened time duration because it have constant frame rate .

Use tc2mp4 (**)(there is needed to add mp4box files to its florder) to join cfrexamplevideo.mp4 with TimeCode_Track1.txt :
tc2mp4 -i E:\videos\mp4\cfrexamplevideo.mp4 -t E:\videos\mp4\TimeCode_Track1.txt -o vfrexamplevideo.mp4

We get vfrexamplevideo.mp4, which have right time duration(same as source).
last step use mp4box(**) and add audio track:
MP4Box -fps 23.970 -add E:\video\sound\examplevideo_track2.mp4#ID=2 -flat vfrexamplevideo.mp4
(there doestnt matter on fps value while adding audio , just gave it same as video.
This will add audio to video and all is sync well, in source video i had uncompatible audio format i used BeLight(BeSweet)
to change it to acc muxed in (mp4examplevideo_track2.mp4), .acc or .mp3 should work without problems too)


Thats all, its not long process at all, just little prax .

//////////////////////////////////////////////////////////////
To tc2mp4 :
If you while vfr muxing encountered :
"Illegal division by zero at script/tc2mp4.pl line .."

Its because Mp4Box auto recognise ISMA videos, so while muxing will automatically create default BIFS and OD tracks to make the resulting file compliant with the ISMA 1.0 standard .

Mp4Box -info cfrexamplevideo.mp4 , will show something like :
Track # 1 Info - TrackID 201 - TimeScale 24000 - Duration 00:00:15.348, + 2 other tracks with id 1,2 that are extra short.
Problem is , that after isam conversion id of video track is 201 not 1, this is causing tc2mp4 to crash.

[solved]
I take first one solution which came, so if you know something better faster or more inteligent :) ,write to my pls .

Go back to demuxing step and use this command instead :
MP4Box -fps 29.970 -nosys -hint -add E:\videos\examplevideo_Track1.h264i#trackID=1 -flat -new cfrexamplevideo.mp4
-will create non-isam mp4 with video track id 1.
After that continue same way, with adding sound at the end -flat option will make from finnal mp4 isam again.

//////////////////////////////////////////////////////////
[Edited]
ogg audio
[solved]
Dont encode it to acc, or you can encounter "VLC does not support the audio or video format "mp4a". Unfortunately there is no way for you to fix this." error in vlc, you will get playable video but without sound.
Use mp3 encoding instead:
Use BeSweet.exe(**), you need to get libvorbis.dll and libmmd.dll and copy them to BeSweet florder .
////////////////////////////////////////////////////////

BeSweet.exe -core( -input "E:\videos\examplevideo_Track2.ogg" -output "E:\videos\examplevideo_Track2.mp3" ) -lame( --abr 128 )

///////////////////////////////////////////////////////////
Last edited by songoo on 21 Mar 2009 12:03, edited 25 times in total.

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: mkv, ogm ?

Postby Jean-Baptiste Kempf » 17 Jan 2009 10:12

You probably need to transcode
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.

songoo
Blank Cone
Blank Cone
Posts: 18
Joined: 17 Jan 2009 03:41

Re: mkv, ogm ?

Postby songoo » 17 Jan 2009 15:58

Edited : see first post

songoo
Blank Cone
Blank Cone
Posts: 18
Joined: 17 Jan 2009 03:41

Re: mkv, ogm ?

Postby songoo » 19 Jan 2009 04:17

Edited : see first post
Last edited by songoo on 18 Feb 2009 00:54, edited 1 time in total.

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: mkv, ogm ?

Postby Jean-Baptiste Kempf » 19 Jan 2009 09:42

Install libavcodec-unstripped.
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.

songoo
Blank Cone
Blank Cone
Posts: 18
Joined: 17 Jan 2009 03:41

Re: mkv, ogm ?

Postby songoo » 19 Jan 2009 11:28

Edited : see first post
Last edited by songoo on 18 Feb 2009 00:54, edited 1 time in total.

songoo
Blank Cone
Blank Cone
Posts: 18
Joined: 17 Jan 2009 03:41

Re: mkv, ogm ?

Postby songoo » 19 Jan 2009 18:20

Edited : see first post
Last edited by songoo on 18 Feb 2009 00:57, edited 1 time in total.

songoo
Blank Cone
Blank Cone
Posts: 18
Joined: 17 Jan 2009 03:41

Re: mkv, ogm ?

Postby songoo » 21 Jan 2009 19:33

Edited : see first post
Last edited by songoo on 18 Feb 2009 00:57, edited 1 time in total.

songoo
Blank Cone
Blank Cone
Posts: 18
Joined: 17 Jan 2009 03:41

Re: mkv, ogm ?

Postby songoo » 24 Jan 2009 16:48

Edited : see first post
Last edited by songoo on 18 Feb 2009 00:56, edited 1 time in total.

songoo
Blank Cone
Blank Cone
Posts: 18
Joined: 17 Jan 2009 03:41

Re: mkv, ogm ?

Postby songoo » 24 Jan 2009 22:05

Edited : see first post
Last edited by songoo on 18 Feb 2009 00:56, edited 1 time in total.

songoo
Blank Cone
Blank Cone
Posts: 18
Joined: 17 Jan 2009 03:41

Re: mkv, ogm ?

Postby songoo » 28 Jan 2009 02:49

Edited : see first post
Last edited by songoo on 18 Feb 2009 00:55, edited 1 time in total.

songoo
Blank Cone
Blank Cone
Posts: 18
Joined: 17 Jan 2009 03:41

Re: mkv, ogm ?

Postby songoo » 18 Feb 2009 00:45

edited
Last edited by songoo on 21 Mar 2009 11:58, edited 1 time in total.

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: mkv, ogm ?

Postby Jean-Baptiste Kempf » 18 Feb 2009 01:13

waouw... Long thread. Help us improving our doc and wiki, and fill bugs :D
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.

songoo
Blank Cone
Blank Cone
Posts: 18
Joined: 17 Jan 2009 03:41

Re: mkv, ogm ?

Postby songoo » 20 Feb 2009 00:20

[Edited-see first post]

songoo
Blank Cone
Blank Cone
Posts: 18
Joined: 17 Jan 2009 03:41

Re: mkv, ogm ?

Postby songoo » 21 Mar 2009 14:52

I made simple mux comands generator , to get mkv to mp4 muxing as simpliest as it can be.
http://nextstone.ic.cz/cmdmaker/muxform.php
http://nextstone.ic.cz/cmdmaker/source.zip

///////////////////////////////////////////////////////////
How to stream dvd ?
[lmaoSolved]
0.9.8a crashed .
So i used older 0.8.6d vlc, download zipped version (no need of instalation), Before any actions check settings/preferences/(bottom right check advanced options)/Stream output/Sout Stream/Rtp port ,audio port, video port, maybe you want change them . (most often to 123/4/0/2)
Right click on vlc.exe icon-createshortcut, then right click on created shortcut-properties , and there add to "Target:" line after path to exe : dvdsimple://D: --sout #rtp{mux=ts,dst=233.10.1.1}
Example : "H:\setups\old\setups\VLC\vlc.exe" dvdsimple://D: --sout #rtp{mux=ts,dst=233.10.1.1}

In this example we have dvd in D drive (dvdsimple://D:), and we are rtp streaming to 233.10.1.1 broadcast ip adress to lan .
After doubleclick on this new shortcut dvd is begin streamed automatically . You can see timeline in vlc, its playing all parts of dvd as they are indexed one after another, you can click on timeline and jump whenewer you want, change audio and so on, streaming wil not crassh but nice do all you want.
Still its not weri efective cos you have do all manually,i didnt found better solution , if you know please pm me or reply.
-For watching your own channel open another vlc, but using normal shorcut!, since old vlc can crash time to time while watching(do not worry till now
it didnt recognise crash of streaming if i didnt use same to watch and stream). One crashed vlc dont affect other.
-After using old vlc, and switching to new one be aware, old vlc will change port numbers to default ones(50004/0/2)tools/preferences (left bottom show settings/all )/Stream output/Sout Stream/Rtp - port ,audio port, video port , so if you used other (1234/0/2) change them back.
///////////////////////////////////////////////////////////
[Edited]
TV logo
[???]
I tried :--logo-file="F:\TV\vlc-0.9.8a\tvlogo.png" in vlc shorcut and #transcode{sfilter=logo}:rtp{mux=ts,dst=233.10.1.7} , i have to make mistake somewhere .
//////////////////////////////////////////////////////////
[Edited]
Streaming pictures.(with rtp{mux=ts,dst=233.10.1.7})
[???]
//////////////////////////////////////////////////////////
[Edited]
Avi(XVID) to mp4 or ts
[???]
xvid avi are quite streamable without transcoding,
but there are some video errors from time to time
so mp4 would be better. Mainly what to do with DIV 3 .
///////////////////////////////////////////////////////////
[edited] managing tv program ?
[???]
Is there some complete solution?
If i will not find anithing , i was thinking about some simple php+mysql, database with names of videos, locations on localdisk, if it wos played sometime , time duration etc, then some user friendly forms to do tv schedule for month, + some bash prog that wil run every 24hours run php script which will rewrite vlm config txt file, and in vlm set schedule to load that txt to get repeatet every 24hours, and sou we could get fully automated scheduling , maybe with some pools about which video when wanna people see + auto tv timetable of program on page and so on.
But only if there isnt other solution already ready .


Return to “VLM”

Who is online

Users browsing this forum: No registered users and 5 guests