VideoHelp Forum




+ Reply to Thread
Results 1 to 10 of 10
  1. Member
    Join Date
    Apr 2008
    Location
    Sweden
    Search Comp PM
    I try to mux a mpeg2 videostream and a mpeg1 audiostream into a mpeg2 programstream using ffmpeg but the resulting file wont play in Windows Media Player 9.0?

    Code:
    ffmpeg -i temp.m2v -i temp.mp2 -vcodec copy -acodec copy test.mpg
    The streams originate from the MPEG2TS that is transmitted from swedish television and is demuxed to the two streams.

    I can mux them using mplex but the resulting video will stutter during playback on Panasonic DVD-players so thats not an option.

    Ffmpeg version is Sherpya-r14277 grabbed of the site yesterday.

    Gspot identifies it as a mpeg-1 container and the same streams muxed with mplex is idīd as a mpeg-2. So how do I get ffmpeg to build a mpeg-2 instead of a mpeg-1. I tried diffrent extensions on the target file to no avail.
    Quote Quote  
  2. Member
    Join Date
    Sep 2007
    Location
    Europe
    Search PM
    Originally Posted by juhani
    ffmpeg -i temp.m2v -i temp.mp2 -vcodec copy -acodec copy -f vob test.mpg
    Try it with this command line. You have to always put in -f vob for encoding and muxing to mpg program stream.
    Quote Quote  
  3. Member
    Join Date
    Apr 2008
    Location
    Sweden
    Search Comp PM
    Thanks, now at least the resulting mpeg-file is a mpeg2 container.... but it still wont play in Windows Media Player 9.0. It will however play in mplayer 1.0rc2-4.2.1.

    And if I use mplex to mux the two streams it plays in Media Player... but mplex is not a viable solution since it has a bug concerning Panasonic DVD-players.

    The link leads to a zip-fil containing two small streams, 1 audio and 1 video to be muxed togheter. Isthere anyone out there who can tell me what I need to tell ffmpeg so it can do it? I refuse to belive that mplex can do something that ffmpeg can not :P

    the mplex I use for it is version 2.2.2 and the command is

    Code:
    mplex -f 3 -V -r 0 -o test.m2p temp.mp2 temp.m2v


    test.zip
    Quote Quote  
  4. Member ChrissyBoy's Avatar
    Join Date
    Feb 2003
    Location
    Yorkshire!
    Search Comp PM
    you could try:

    Code:
    ffmpeg -i temp.m2v -i temp.mp2 -target dvd -vcodec copy -acodec copy test.mpg
    SVCD2DVD v2.5, AVI/MPEG/HDTV/AviSynth/h264->DVD, PAL->NTSC conversion.
    VOB2MPG PRO, Extract mpegs from your DVDs - with you in control!
    Quote Quote  
  5. Member
    Join Date
    Sep 2008
    Location
    Korea, Republic of
    Search Comp PM
    Code:
    mplex -f 3 -b 500 -V -o "test.mpg" "test.mpa" "test.mpv"

    If you see buffer under-run message, try something bigger than 500.
    I guess 500 is enough for HDTV cap.

    You should see this message at the end.

    Code:
    INFO: [???] MUX STATUS: no under-runs detected
    .
    Quote Quote  
  6. Member
    Join Date
    Apr 2008
    Location
    Sweden
    Search Comp PM
    yonta : Thanks but the problem with mplex is not bitrate but the fact that mplex ignores a few essential headers in the mpeg programstream layer. In the code for the program it is even stated that the developer didnt know how to handle those headers so they are given bogus values. These values causes the playback on, among others, Panasonic-machines to stutter when the raw-material have been digitized from a analog source using a Adaptec-card. Unfortunatly I don't have the time to rewrite this part of mplex so I have to look elsewhere for a muxer.
    Because of historical reasons mplex is not an option as long as this part of the software is not fixed. The amount of mpeg-files this problem screws up is to great to re-digitize.
    Thanks anyway but mplex is out on itīs furry behind. I have done extensive trails to see if it can work for us using a couple of hundred diffrent combinations of parameters but no dice. So my hope stands to ffmpeg rightnow if I only can get it to deliver a file that actually can be played, mplex is simply used to verify that the resulting file using that indata can be played so the indata is correct and not corupted.

    ChrissyBoy : Nope, the resulting mpeg file still wont play in Media Player. gah!

    Could anyone please try the files posted above and report back (maybe even post the resulting file) so I can see if the problem is my system, ffmpeg or the streams?
    Quote Quote  
  7. Member
    Join Date
    Sep 2007
    Location
    Europe
    Search PM
    When I mux your uploaded clips with ffmpeg. MPC plays it.
    mplayer2.exe which is at "C:\program files\Windows Media Player" also plays it
    so it looks like a specific WMP 9.0 problem. Haven't have WMP 9.0 installed to test.

    EDIT: In my case both players use FFdshow as mpeg2 decoder.

    On the other hand, FFmpeg reports as source properties:

    Input #0, mpegvideo, from 'G:/VirtualDub Capture1/temp.m2v':
    Duration: 00:00:01.43, bitrate: 14999 kb/s
    Stream #0.0: Video: mpeg2video, yuv420p, 720x576 [PAR 16:15 DAR 4:3],
    15000 kb/s, 25.00 tb(r)

    This would mean that your source is not DVD compliant which could be the cause
    of stuttering on your standalone dvd player.
    Quote Quote  
  8. Member
    Join Date
    Jul 2007
    Location
    Denmark
    Search Comp PM
    Originally Posted by Chris K
    Input #0, mpegvideo, from 'G:/VirtualDub Capture1/temp.m2v':
    Duration: 00:00:01.43, bitrate: 14999 kb/s
    Stream #0.0: Video: mpeg2video, yuv420p, 720x576 [PAR 16:15 DAR 4:3],
    15000 kb/s, 25.00 tb(r)

    This would mean that your source is not DVD compliant which could be the cause
    of stuttering on your standalone dvd player.
    In fact the bitrate isnīt that high, but anyway it can cause trouble for some DVD players. Try to patch the header to say 9000 kb/s with DVDPatcher. That should solve the stuttering problem.
    Quote Quote  
  9. Member
    Join Date
    Apr 2008
    Location
    Sweden
    Search Comp PM
    Hmmmm, I will look into the use of FFdshow as decoder. The system I'm running now is using Ligos...

    The bitrate is an error in the stream that the swedish tv network send out cause in reality it's something like 4500 kbits.

    But I put the file through gspot (the mpeg built by ffmpeg) and it reported a system bitrate of about 440000kbits... a bit high

    Hmmmm. Well, I know it should work now anyways so I can continue to work towards a solution. Thanks!
    Quote Quote  
  10. Member
    Join Date
    Sep 2007
    Location
    Europe
    Search PM
    Originally Posted by juhani
    But I put the file through gspot (the mpeg built by ffmpeg) and it reported a system bitrate of about 440000kbits... a bit high
    Probably the version you use. Try one of the latest win32 builds: http://tripp.arrozcru.com

    EDIT: You're right about gspot. Mediainfo gives a more realistic bitrate.
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!