Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Capturing and Editing Video > New and alternative a/v containers
Register FAQ Calendar Today's Posts Search

Reply
 
Thread Tools Search this Thread Display Modes
Old 27th July 2005, 23:05   #1  |  Link
grayhalo
Registered User
 
Join Date: Jul 2005
Posts: 4
h.264 in mpeg2-ts?

probably a total newb question, but could someone please explain to me how I would take a video I've encoded to h.264 in Quicktime Pro and make a mpeg2 transport stream out of it? Is there an easy way (a tool?) to do this. I've played with many tools that allow me to strip away the TS information but not many that allow encapsulation.. Maybe I'm way off base, someone help please :-).

Also, on a somewhat related note, where in your opinion is the best place to get information about the relationship between these different codecs and also hi-def stuff (ATSC, etc)...
grayhalo is offline   Reply With Quote
Old 27th July 2005, 23:39   #2  |  Link
puffpio
Registered User
 
Join Date: Nov 2001
Posts: 176
sounds kinda off base..trying to put an mpeg4 video stream into an mpeg2 transport stream? Is there a native mpeg4 transport stream?
puffpio is offline   Reply With Quote
Old 27th July 2005, 23:46   #3  |  Link
nm
Registered User
 
Join Date: Mar 2005
Location: Finland
Posts: 2,641
Quote:
Originally Posted by puffpio
sounds kinda off base..trying to put an mpeg4 video stream into an mpeg2 transport stream?
Not at all: http://lists.mpegif.org/pipermail/mp...er/004180.html
This is probably what they are going to use for HDTV here in Europe.
nm is offline   Reply With Quote
Old 28th July 2005, 00:07   #4  |  Link
nm
Registered User
 
Join Date: Mar 2005
Location: Finland
Posts: 2,641
Quote:
Originally Posted by grayhalo
probably a total newb question, but could someone please explain to me how I would take a video I've encoded to h.264 in Quicktime Pro and make a mpeg2 transport stream out of it? Is there an easy way (a tool?) to do this.
I haven't tried this myself, but VLC (http://www.videolan.org/) has support for streaming MPEG-4 AVC over network. They use MPEG TS format among others, so it could be possible to put AVC into it. If VLC doesn't allow you to directly save the stream to a file, you can use a separate instance to read the stream and dump it.

Last edited by nm; 28th July 2005 at 00:16.
nm is offline   Reply With Quote
Old 28th July 2005, 00:23   #5  |  Link
grayhalo
Registered User
 
Join Date: Jul 2005
Posts: 4
that is actually what i'm trying right now... will let you know how it works.
grayhalo is offline   Reply With Quote
Old 28th July 2005, 01:28   #6  |  Link
ChronoCross
Does it really matter?
 
ChronoCross's Avatar
 
Join Date: Jun 2004
Location: Chicago, IL
Posts: 1,542
Quote:
Originally Posted by nm
I haven't tried this myself, but VLC (http://www.videolan.org/) has support for streaming MPEG-4 AVC over network. They use MPEG TS format among others, so it could be possible to put AVC into it. If VLC doesn't allow you to directly save the stream to a file, you can use a separate instance to read the stream and dump it.
As discussed in the ateme beta thread it may be possible with the next edition of the AVC encoder to do .ts. so look forward to that possibility
ChronoCross is offline   Reply With Quote
Old 28th July 2005, 17:48   #7  |  Link
grayhalo
Registered User
 
Join Date: Jul 2005
Posts: 4
Well I re-encoded to h.264 in Quicktime Pro and have been messing around with VLC but can't seem to get it working quite right. Here's the command I'm trying to use:

VLC inputstream.mp4 --sout '#standard{access=file,mux=ts,url=output.ts}'

This creates a transport stream, but there doesn't seem to be any video content, just audio. Or maybe VLC just can't see/play the video? But it can play the mp4 just fine...

Any help would be appreciated. Also, a list of other good resources would be invaluable as well. Thanks!
grayhalo is offline   Reply With Quote
Old 28th July 2005, 18:04   #8  |  Link
Doom9
clueless n00b
 
Join Date: Oct 2001
Location: somewhere over the rainbow
Posts: 10,579
Current Moonlight tools can write AVC into a transport stream (and have done so for quite a while). The huge overhead as compared to the MP4 container was the main reason why the Moonlight/Elecard codec wasn't included in the codec comparison last December.
__________________
For the web's most comprehensive collection of DVD backup guides go to www.doom9.org
Doom9 is offline   Reply With Quote
Old 28th July 2005, 18:10   #9  |  Link
grayhalo
Registered User
 
Join Date: Jul 2005
Posts: 4
XMuxer pro gives me an unsupported format when I try loading it in...
grayhalo is offline   Reply With Quote
Old 29th July 2005, 14:35   #10  |  Link
b_x20852
Registered User
 
Join Date: Mar 2003
Location: USA
Posts: 5
Quote:
Originally Posted by grayhalo
I've played with many tools that allow me to strip away the TS information
Could you please advise what tools you tried, and which one was the best for the task?

I need something that will intercept the MPEG-2 TS over UDP/IP stream, recover AVC content, and write it in the file. I don't even need to play it - just write it in the file.
b_x20852 is offline   Reply With Quote
Old 8th August 2005, 12:57   #11  |  Link
bond
Registered User
 
Join Date: Nov 2001
Posts: 9,770
Quote:
Originally Posted by grayhalo
VLC inputstream.mp4 --sout '#standard{access=file,mux=ts,url=output.ts}'

This creates a transport stream, but there doesn't seem to be any video content, just audio.
i now tried placing avc in ts and ps myself with videolan with the following commandline:

Code:
vlc "C:\...\input.file" :sout=output.mpg

vlc "C:\...\input.file" :sout=output.ts
my findings:

1) no ps or ts file with avc created with vlc can be played by the mainconcept dshow filters, which should handle it.
i therefore assume that vlc is simply not able to create spec compliant avc in ps or ts files

2) i wasnt able to remux apple avc .mp4 files to .ts (only got a 0kb output), but .mp4 files muxed with mp4box worked (got a .ts with the correct filesize), maybe because of the slices apple uses?
still the output .ts doesnt play anywhere (tried mainconcept, vlc and mplayer)

3) i was able to remux avc in mp4 to .mpg, but it also doesnt play anywhere

4) i was able to remux avc in avi to .mpg and .ts and both play in mplayer, but none play in mainconcept or vlc

5) i wasnt able to remux raw avc (and also not raw .m2v) to ps and ts with vlc, as i always only got a 1kb output

i only tried some basic avc streams without b-frames, no slices

Quote:
Or maybe VLC just can't see/play the video? But it can play the mp4 just fine...
seems as if vlc isnt able at all to play any of the .mpg or .ts avc files it creates (but its able to play the mainconcept avc .ts files, but not the .mpg files)


moved to container forum
__________________
Between the weak and the strong one it is the freedom which oppresses and the law that liberates (Jean Jacques Rousseau)
I know, that I know nothing (Socrates)

MPEG-4 ASP FAQ | AVC/H.264 FAQ | AAC FAQ | MP4 FAQ | MP4Menu stores DVD Menus in MP4 (guide)
Ogg Theora | Ogg Vorbis
use WM9 today and get Micro$oft controlling the A/V market tomorrow for free

Last edited by bond; 8th August 2005 at 13:00.
bond is offline   Reply With Quote
Old 8th August 2005, 18:04   #12  |  Link
bond
Registered User
 
Join Date: Nov 2001
Posts: 9,770
ok i now tried my luck with ffmpeg and with that tool its possible to both encode and mux avc into mpeg-2 ts

encoding:
Code:
ffmpeg -i "C:\bla\input.bla" -vcodec h264 -f mpegts output.ts
muxing:
Code:
ffmpeg -f h264 -i "C:\bla\input.264" -vcodec copy -f mpegts output.ts
the output plays fine in mplayer and with the mainconcept filters, but i dunno at all if they are spec compliant
videolan seems to have some problems with the streams
__________________
Between the weak and the strong one it is the freedom which oppresses and the law that liberates (Jean Jacques Rousseau)
I know, that I know nothing (Socrates)

MPEG-4 ASP FAQ | AVC/H.264 FAQ | AAC FAQ | MP4 FAQ | MP4Menu stores DVD Menus in MP4 (guide)
Ogg Theora | Ogg Vorbis
use WM9 today and get Micro$oft controlling the A/V market tomorrow for free
bond is offline   Reply With Quote
Old 11th December 2005, 11:24   #13  |  Link
unixfs
Registered User
 
Join Date: May 2002
Posts: 308
The reason why sometimes vlc doesn't work is that when muxing to TS it expects to find AVC in bytestream format (NALS prefixed by 0x000001 as mpeg1/2/4), that for is never the case when the original stream is contained in mp4/mov and sometimes in avi (when the fourcc is avcc). In cases like those AVC is in raw NAL format, that unfortunately can only be muxed in SL substreams when inserted in TS (that vlc doesn't even read).
unixfs is offline   Reply With Quote
Old 11th December 2005, 12:42   #14  |  Link
bond
Registered User
 
Join Date: Nov 2001
Posts: 9,770
do you know if ffmpegs way of muxing avc to ts is spec compliant with the avc-in-mpg specs?
__________________
Between the weak and the strong one it is the freedom which oppresses and the law that liberates (Jean Jacques Rousseau)
I know, that I know nothing (Socrates)

MPEG-4 ASP FAQ | AVC/H.264 FAQ | AAC FAQ | MP4 FAQ | MP4Menu stores DVD Menus in MP4 (guide)
Ogg Theora | Ogg Vorbis
use WM9 today and get Micro$oft controlling the A/V market tomorrow for free
bond is offline   Reply With Quote
Old 11th December 2005, 15:10   #15  |  Link
unixfs
Registered User
 
Join Date: May 2002
Posts: 308
when the AVC stream is in bytestream format it is, otherwise it's not.
unixfs is offline   Reply With Quote
Old 16th December 2005, 18:17   #16  |  Link
Hyper Shinchan
Registered User
 
Join Date: Mar 2005
Location: Italy
Posts: 286
Anyway can you write the command line to include AAC, AC3 or MPEG audio, Bond (or someone else)? I don't use FFMPEG and i'm not able to do it. Where can I find a good build of ffmpeg too (I've used the one included in 3GPP converter and it seems to work fine with TS muxing). I think that actually it's pretty stupid muxing AVC in TS, but it will be useful in the future, of course.
Hyper Shinchan is offline   Reply With Quote
Old 16th December 2005, 18:34   #17  |  Link
bond
Registered User
 
Join Date: Nov 2001
Posts: 9,770
i guess the chance is great that the way ffmpeg places avc in .ts and .mpg isnt spec compliant, so unless we know it is, i wouldnt use it
__________________
Between the weak and the strong one it is the freedom which oppresses and the law that liberates (Jean Jacques Rousseau)
I know, that I know nothing (Socrates)

MPEG-4 ASP FAQ | AVC/H.264 FAQ | AAC FAQ | MP4 FAQ | MP4Menu stores DVD Menus in MP4 (guide)
Ogg Theora | Ogg Vorbis
use WM9 today and get Micro$oft controlling the A/V market tomorrow for free
bond is offline   Reply With Quote
Old 25th December 2005, 21:06   #18  |  Link
digigami
Digigami
 
Join Date: Jul 2005
Location: Los Angeles, CA
Posts: 182
Quote:
Originally Posted by unixfs
when the AVC stream is in bytestream format it is, otherwise it's not.
What about raw NAL to bytestream converters?

Also, anyone know which spec documents cover packaging H.264 in MPEG-2 transport streams?
__________________
Digigami
MoviesForMyPod MPEG-4 H.264 iPod Converter - Popular, free, easy.
MegaPEG MPEG-2 Encoder - Like Rodney Dangerfield, gets no respect (except from customers).
MPressionist MPEG-2 Analyzer - no problems with this one, everybody likes it, including me.
digigami is offline   Reply With Quote
Old 27th December 2005, 20:52   #19  |  Link
unixfs
Registered User
 
Join Date: May 2002
Posts: 308
Quote:
Originally Posted by digigami
What about raw NAL to bytestream converters?
I'm not aware of any such tool
Quote:
Also, anyone know which spec documents cover packaging H.264 in MPEG-2 transport streams?
recent revisions of IS13818-1
unixfs is offline   Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 00:03.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.