[MPlayer-users] SVCD from TV card

Torsten Römer troemer at swipnet.se
Wed Dec 24 07:15:13 CET 2003


Uups! Just before I wrote:

 > I read the docs. But the manpage and the HTML docs only mention MPEG,
 > never MPEG1 regarding the -of mpeg option.

I'm taking this back... mencoder -of help says:

Available output formats:
    avi      - Microsoft Audio/Video Interleaved
    mpeg     - MPEG-1 system stream format

Sorry for that...

> [Automatic answer: RTFM (read DOCS, FAQ), also read DOCS/bugreports.html]
> 
> rcooley wrote:
>  > MPlayer is very flexible, it will play practically anything...
> 
> Actually MPlayer had problems, it was hanging every few seconds for a 
> short moment. Only Xine was playing it fine.
> 
>  > You wouldn't be if you read the docs...  -of mpeg is for mpeg1, not
>  > mpeg2.
> 
> I read the docs. But the manpage and the HTML docs only mention MPEG, 
> never MPEG1 regarding the -of mpeg option.
> 
>  > Yes, mplayer has no problem playing an MPEG2 video inside an MPEG1
>  > container...  You won't be so lucky with other players.
> [...]
>  > Yes, your DVD player doesn't like it because it isn't really an MPEG2
>  > stream.
> 
> OK, that's clear now. I didn't know the container has to be of the right 
> format as well. If the docs could explicitly state that -of mpeg is only 
> good for MPEG1 it would be helpful for non-experts like me :-)
> 
> I will try transcode with ffmpeg. And I will also try your suggestion 
> dumping into separate files and then multiplexing them.
> 
> Thanks for your reply, it is very helpful.
> 
> Torsten
> 
>> On Mon, 22 Dec 2003 15:40:50 +0100
>> Torsten Römer <troemer at swipnet.se> wrote:
>>
>>
>>> I am trying to encode to SVCD from the TV card. It "almost" seems to 
>>> work, MPlayer and Xine can play the resulting SVCD (while MPlayer
>>> hangs a bit) but my DVD Player cannot play it at all (just hangs)
>>
>>
>>
>> MPlayer is very flexible, it will play practically anything...  Hardware
>> players are almost always the exact opposite, and will only play if it
>> is exactly how it wants it.
>>
>>
>>> I encode like this:
>>>
>>> mencoder -tv driver=v4l:width=480:height=576 tv://
>>>          -of mpeg
>>>          -ovc lavc
>>>          -oac lavc
>>>          -lavcopts vcodec=mpeg2video:vbitrate=1500:aspect=4/3:acodec=mp2
>>>          -o test.mpg
>>>
>>> Then I use vcdimager to create the SVCD. Something is strange here, it
>>>
>>> warns me:
>>>
>>> ++ WARN: mpeg stream will be padded on the fly -- hope that's ok for
>>> you!++ WARN: autopadding requires to insert additional 232944 zero
>>> bytes into MPEG stream (due to 844 unaligned packets of 845 total)
>>> ++ WARN: this VCD type should not contain MPEG1 streams
>>>
>>> Regarding the packet alignment I have no idea how to solve it.
>>
>>
>>
>> To solve it, you must re-write the MPEG container code for mplayer...
>>
>>
>>> I am also surprised about the warning that it's an MPEG1 stream, while
>>
>>
>>
>> You wouldn't be if you read the docs...  -of mpeg is for mpeg1, not
>> mpeg2.
>>
>>
>>> Available output formats:
>>>   avi      - Microsoft Audio/Video Interleaved
>>>   mpeg     - MPEG-1 system stream format
>>
>>
>>
>>
>>> mplayer says:
>>>
>>> VIDEO:  MPEG2  480x576  (aspect 2)  25,000 fps    0,0 kbps ( 0,0
>>> kbyte/s)
>>
>>
>>
>> Yes, mplayer has no problem playing an MPEG2 video inside an MPEG1
>> container...  You won't be so lucky with other players.
>>
>>
>>> Does anybody have an idea why my DVD Player (and also MPlayer) don't 
>>> like the resulting SVCD?
>>
>>
>>
>> Yes, your DVD player doesn't like it because it isn't really an MPEG2
>> stream.
>>
>>
>>> I created some SVCD's with transcode and mpeg2enc which works nice,
>>> but it's way too slow to encode from the TV card...
>>
>>
>>
>> First of all, mpeg2enc isn't the only codec available with transcode. 
>> Using ffmpeg's mpeg2video codec for video will make things about 3X
>> faster.
>>
>> Secondly, you could try ffmpeg...  It's supposed to be able to encode
>> straight from v4l.
>>
>> Finally, the way you are currently doing it with mencoder is actually
>> just fine.  You simply need to dump the video and audio to seperate
>> files, and use a program like mplex or tcmplex to combine them into a
>> *real* mpeg2 container... It will play in your DVD player, and won't
>> need to be padded by vcdimager.  The downside is, it's entirely possible
>> that the video/audio will be out-of-sync. 
>> I can't really help with sync problems, since all my experience
>> has led me to one conclusion: Some encoders keep sync with some
>> videos, and some don't...  No video encoder on Unix, that I've
>> found (eg ffmpeg/ transcode/ mpeg2enc/ mencoder) will consistently
>> maintain sync when outputing audio/video to seperate files.
>>
>>
>>> Thanks in advance
>>> Torsten
>>
>>
>>
>> _______________________________________________
>> RTFM!!!  http://www.MPlayerHQ.hu/DOCS
>> Search:  http://www.MPlayerHQ.hu/cgi-bin/htsearch
>> http://mplayerhq.hu/mailman/listinfo/mplayer-users
>>
> 
> _______________________________________________
> RTFM!!!  http://www.MPlayerHQ.hu/DOCS
> Search:  http://www.MPlayerHQ.hu/cgi-bin/htsearch
> http://mplayerhq.hu/mailman/listinfo/mplayer-users
> 
> 




More information about the MPlayer-users mailing list