Avidemux Forum

Avidemux => Main version 2.6 => Topic started by: Avi2DVD on May 07, 2015, 05:55:23 PM

Title: Producing avi-files playable on a stand-alone DVD player
Post by: Avi2DVD on May 07, 2015, 05:55:23 PM
Hi,
I try to generate a DVD (or CD for short recordings) playable on my Panasonic DVD-HDD-recorder-player. The source are Video-ts-files. They stem from DVB-T recordings by VLC-Player software on my PC. The DVD or CD shall not contain a directory with VOB-files, just files like avi. I do not need an intro menu like commercial DVDs.

The Panasonic handbook tells me under 'Playing DivX discs': 'You can play DVD-R discs which contain DivX video contents that have been recorded on a computer.' and - regarding DivX discs - it says: 'File format is DivX, the files must have the extension DIVX, divx, AVI, or avi'. May be this ist relevant for my question.

My idea is to cut the ts-files on Avidemux 2.6.1, set Video Decoder: Lavodec, Video (and Audio) Output:Copy, and Output Format: AVIMuxer. Saving with the typed-in filename extension avi then results in the target avi-file which I burn with Windows (7) Explorer. However such a DVD or CD is commented by the Panasonic player with "unknown format".

What can I do better in this case? I asses my problem as elementary but all recherches and downloaded (eight) software tools led to nothing than a bunch of (no more) blank DVDs and CDs.

Kind regards
Avi2DVD
Title: Re: Producing avi-files playable on a stand-alone DVD player
Post by: zakk on May 07, 2015, 06:25:58 PM
Your .ts files probably contains MPEG-2 video, so you have to reencode using a DivX codec. Just changing the extension is not enough.
Title: Re: Producing avi-files playable on a stand-alone DVD player
Post by: Avi2DVD on May 07, 2015, 06:58:32 PM
Does that mean changing the Video Output attribute to Mpeg2(ff) and then save as *.avi?
Or is another software necessary like VLC-Player which contains conversion options?
And:
Has Auto in the top bar to be set on  dvd first?
Title: Re: Producing avi-files playable on a stand-alone DVD player
Post by: zakk on May 07, 2015, 07:04:22 PM
no you need to change the video AND audio output AND container to .avi
See if your hardware plays xvid or try a sample.

you can also do copy/copy with mpeg video container with Avidemux 2.5
Title: Re: Producing avi-files playable on a stand-alone DVD player
Post by: Avi2DVD on May 07, 2015, 07:55:08 PM
My Avidemux 2.6.1 allows eleven options for Video Output from Copy ... null. The Audio Option allows ten options from Copy ... Vobis, and the Output Format has nine options from AVI Muxer ... Video only. I guess  AVI Muxer is the Output Format to choose. But what are the avi-options for Video Output and Audio Output?
Title: Re: Producing avi-files playable on a stand-alone DVD player
Post by: zakafreakarama on May 08, 2015, 06:25:27 AM
You need to encode the video with any DivX-compatible codec. DivX is the commercial brand of a codec that implements the MPEG-4 ASP standard, AKA MPEG-4 Part 2 and MPEG-4 Visual. In Avidemux you have either Xvid or Libavcodec (MPEG-4 ff). Both are good, but Xvid is generally better AND faster. The audio in your files is probably AC-3 (Dolby Digital) or MP2. You can probably keep it as is. But the video must be re-encoded. For maximum compatibility with DivX, don't use Qpel or Global Motion compensation, and use no more than 2 consecutive B-frames. Plus, some old standalone players only support H.263 quantization.

These are 2 very useful reads:

http://www.avidemux.org/admWiki/doku.php?id=tutorial:dvd_to_avi

http://www.avidemux.org/admWiki/doku.php?id=tutorial:standalone_mpeg-4_players

Title: Re: Producing avi-files playable on a stand-alone DVD player
Post by: Avi2DVD on May 08, 2015, 12:58:32 PM
Thanks for all advices!

The solution I needed is:
1. Use Avidemux only for removing unwanted parts of the *.ts. Convert *.ts to *.avi by saving without any parameter changes.
2. Use VLC-Player for converting from *.avi to *.avi. Set Profile on Video for DixX compatible players using MPEG-4 codec.
3. Burn the new *.avi by Windows explorer under the option For CD/DVD-Player (Mastered).

This results in a DVD playable on my standalone player.
Title: Re: Producing avi-files playable on a stand-alone DVD player
Post by: zakafreakarama on May 08, 2015, 04:02:32 PM
Glad that you found something that works, but you'll sooner or later find that this method is far from optimal. VLC is great for streaming and fast conversions, but is not intended for high quality encodes nor for archiving. It encodes at a fixed bitrate, with a single pass, and with that preset it uses "DIV3" as the video codec, which is actually Microsoft's MPEG-4(v3), the same as the old DivX3 codec. The audio gets converted to MP3, also at a fixed bitrate.

With Avidemux you can use the much better Xvid, encode in two-pass mode, have better control over quality, file size and settings, plus you can use variable bitrate for the audio. And you don't need to use any other software.
Title: Re: Producing avi-files playable on a stand-alone DVD player
Post by: Avi2DVD on May 08, 2015, 05:24:18 PM
I would love to use more of Avidemux' competence if anyone would be so kind to show me the click and edit path through it. There is much to adjust but a layman can't gues what and how. Trial and error only results in a heap of wasted DVD's.
Given ts files, the target remains to burn avi files on a DVD that plays on a standalone DVD player.
Title: Re: Producing avi-files playable on a stand-alone DVD player
Post by: zakafreakarama on May 08, 2015, 08:06:59 PM
I could do it if you have the patience to wait and read through the documentation (with screen caps) that I could send to you.
It's not that hard when you understand the encoding parameters.

It'd be worth it, since you'd get files with the approppriate quality level and mostly without compression artifacts. The problem with the method you chose is that the video bit rate remains constant. Quiet scenes will look great, but when the action starts (if it ever does) you'll see a lot of blocks on screen. You might have seen this in some DVB sports broadcasts, especially when there is rain involved. That's because there is no smart bit rate decision involved (i.e., 2-pass encoding), and the bit rate remains constant, wether it is enough for effective compression or not.

First of all, we should know what audio and video standards do your .TS files use. I suggest you download MediaInfo and analyse your .TS files with it.

https://mediaarea.net/en/MediaInfo

Do it and then post the output here. Choose the "Text" option (View>>Text), then copy the output and paste it here. I bet they're MPEG-2 video (interlaced) and MP2 audio if you're in Europe, and AC-3 audio if you're in the Americas...
Title: Re: Producing avi-files playable on a stand-alone DVD player
Post by: Avi2DVD on May 08, 2015, 10:21:28 PM
Your cooperation is highly appreciated.
Here is the media info:

General
ID                                       : 61943 (0xF1F7)
Complete name                            : E:\VLC-Stream-Recording\24_hours.ts
Format                                   : MPEG-TS
File size                                : 28.3 GiB
Overall bit rate mode                    : Variable

Video
ID                                       : 69 (0x45)
Menu ID                                  : 1 (0x1)
Format                                   : MPEG Video
Format version                           : Version 2
Format profile                           : Main@Main
Format settings, BVOP                    : Yes
Format settings, Matrix                  : Custom
Format settings, GOP                     : Variable
Codec ID                                 : 2
Bit rate mode                            : Variable
Maximum bit rate                         : 15.0 Mbps
Width                                    : 704 pixels
Height                                   : 576 pixels
Display aspect ratio                     : 16:9
Active Format Description                : Letterbox 16:9 image
Frame rate                               : 25.000 fps
Standard                                 : PAL
Color space                              : YUV
Chroma subsampling                       : 4:2:0
Bit depth                                : 8 bits
Scan type                                : Interlaced
Scan order                               : Top Field First
Compression mode                         : Lossy

Audio
ID                                       : 68 (0x44)
Menu ID                                  : 1 (0x1)
Format                                   : MPEG Audio
Format version                           : Version 1
Format profile                           : Layer 2
Codec ID                                 : 3
Bit rate mode                            : Constant
Bit rate                                 : 192 Kbps
Channel(s)                               : 2 channels
Sampling rate                            : 48.0 KHz
Compression mode                         : Lossy
Delay relative to video                  : -970ms

It is a rather long file. So I split it into approx. 1 hour portions by Avidemux.

In the meantime I bypass VLC-Player by selecting Mpeg4 ASP(xvid4).

My patience is prepared. So don't hesitate to send relevant material.

Title: Re: Producing avi-files playable on a stand-alone DVD player
Post by: zakafreakarama on May 09, 2015, 01:40:42 PM
Pretty much what I expected. Except that it says "letterbox 16:9". Does that mean that there are black borders up and down the frame?
Title: Re: Producing avi-files playable on a stand-alone DVD player
Post by: Avi2DVD on May 09, 2015, 02:53:47 PM
Quote from: zakafreakarama on May 09, 2015, 01:40:42 PM
Pretty much what I expected. Except that it says "letterbox 16:9". Does that mean that there are black borders up and down the frame?
I can't tell. It is the 24 hours file. I never saw it on TV, only on the PC screen with VLC-Player.

Enclosed is the media information of a DVD-R which contains four avi-files which stem from the 24 hour file. The DVD does not play (unknown format, my problem). I have added a colum giving the media information of a CD-R which does play (only the deviations including the easy to explain). Maybe you can draw conclusions from the comparison.
Title: Re: Producing avi-files playable on a stand-alone DVD player
Post by: zakafreakarama on May 09, 2015, 04:13:25 PM
Do your files look like this:

(https://avidemux.org/smif/proxy.php?request=http%3A%2F%2Fs1.postimg.org%2Ftqixmj2n3%2F16_9.png&hash=f00205c4a4205c2c6c2ef06cc7ef802b2ffa7197)


or like this?:

(https://avidemux.org/smif/proxy.php?request=http%3A%2F%2Fs17.postimg.org%2Fbw51wdbkf%2Fletterbox.png&hash=130d90a2b09885049b2aeca4a80640052fc97187)


Also, are they sports broadcasts that need special extra-fluid motion, or film material?
Title: Re: Producing avi-files playable on a stand-alone DVD player
Post by: Avi2DVD on May 09, 2015, 04:18:47 PM
Clearly two times no!
Title: Re: Producing avi-files playable on a stand-alone DVD player
Post by: zakafreakarama on May 09, 2015, 05:30:06 PM
Okay, but do they look closer to the fitrst image, or to the second one?
Title: Re: Producing avi-files playable on a stand-alone DVD player
Post by: Avi2DVD on May 09, 2015, 09:28:22 PM
I misunderstood your question 04:13:25 PM. What I meant with two times no is: It is very unlikely that I will make recordings of 1. animation films or 2. sport events. :) But the first answer is not on what you asked. New answer: The avi-file whose deviating values I added to the data in the txt-file has a black stripe on top and bottom if I play the CD-R on my Panasonic DVD-recorder-Player DMR-EH65  HDD (bought  new in 2008). Maybe a new player would perform more cooperative with the failing avi-DVDs?

The fabrication of the CD was: Cutting with Avidemux, converting avi -> avi (DivX, MPEG-4) with VLC-Player.


.
Title: Re: Producing avi-files playable on a stand-alone DVD player
Post by: zakafreakarama on May 10, 2015, 07:00:18 AM
I've been looking carefully at your .TXT file and I'm not sure why those files don't play in your standalone player. The one at the right is rather strange (a frame rate of 24.238 is... exotic), but it seems it does play.

I'd say the problem is in the aspect ratio. MPEG-2 for DVD & DVB uses non-square pixels. It doesn't matter if the aspect ratio is 4:3 (old TV standard) or 16:9 (modern standard, widescreen), all DVD video streams are 720x576px because of non-square pixels and metadata in the stream that tell the player how to display the image.

AVI files are not like that, they use square pixels (1:1) and the size of the frame varies depending on the aspect ratio you want to get. I guess the file plays because VLC assumed correctly that it had a 16:9 aspect ratio and resized the frame accordingly. The files that don't play are still the original MPEG-2 size, so the player assumes an aspect ratio of 5:4 (incorrect, probably undisplayable).   

I also noticed that the playable file has a rather high bit rate for MPEG-4. If space is not a problem for you, keep converting them that way. Such a high bit rate will compensate for the lack of a proper and efficient 2-pass encoding.

If, on the other hand, you need to optimize both quality and space, I strongly encourage you to read these 2 articles:

http://www.avidemux.org/admWiki/doku.php?id=tutorial:dvd_to_avi
http://www.avidemux.org/admWiki/doku.php?id=tutorial:standalone_mpeg-4_players

If you have any doubts, feel free to ask.
Title: Re: Producing avi-files playable on a stand-alone DVD player
Post by: Avi2DVD on May 10, 2015, 01:03:57 PM
Thanks for the tutorial links. I have read them and gained some further understanding.
I have done one further 'experiment' which brings me to the conclusion that I do not press the wrong buttons in Avidemux but that my Panasonic player is fobbing me by a defect. In detail:

I have played back the 24 hours ts-file on the VLC-Player for half a minute and at the same time recorded it by the VLC-Player to get a small ts-file.
I opened it with Avidemux and cut away a second at the beginning and the end. The configuration parameters were Lavodec, Mpeg4 ASP (xvid4), Copy, AviMuxer. I burnt the resulting avi first on a CD; it turned out to be playable on my Panasonic. Then I burnt the same avi on a DVD-R; this is NOT playable ('unknown format').
This makes me stop my burning orgie. Tomorrow I will visit an electronic shop and try the DVD in a new player. I'm curious what will happen.
I am aware of your great cooperativeness. Please stay for a further while.

p.s.
The media information read from the two discs is identical (cp. attached txt-file) - naturally, but I wouldn't put it past 'intelligent' IT products (like a burning software) to change things in a willful way. So I checked even that.
Title: Re: Producing avi-files playable on a stand-alone DVD player
Post by: zakafreakarama on May 10, 2015, 01:21:54 PM
Actually, that makes some sense. CDs and DVDs spin at different speeds. Maybe your player can manage MPEG-4 content at CD speed but NOT at DVD speed. It probably expects DVD content in DVD media. Which prompts me to ask: why don't you just author DVDs with your .ts files directly, without reencoding? As far as I can tell, your .ts files are perfectly DVD-compliant. You'd only just have to author a DVD with some app like DVD Styler (google it, it's really worth it). It'd remux the video and audio streams without re-encoding (which always implies quality loss). The only problem is that the transport stream container (.TS) is not suitable for DVD (it is for DVB and Blu-Ray though), but the video and audio streams it contains are generally DVD-compliant. You can set Avidemux to copy both video and audio and choose the MPEG-PS container. The resulting file will be perfectly suitable for a PAL DVD. Then you could use DVD Styler to create your DVD disc and play it in ANY DVD and Blu-Ray player.
Title: Re: Producing avi-files playable on a stand-alone DVD player
Post by: Avi2DVD on May 10, 2015, 03:53:59 PM
 :) Great! The Avidemux-DVDstyler-route functioned straightaway on DVD-R and DVD-RW. Thanks a lot for this advice.
I burned two mpg test files (both together 62 s) and found 63,2 MB on each disc. Does that mean a 4.7 GB disc can store (only) 77 min? The two source mpg's amount to 18.6 MB only. Mediainfo shows 16.1 Mbps for the VOB and in DVDstyler I found the options Auto, 8, 7, ..., 2 MBps for the videobitrate. Is that an resort to longer DVD's? For the burning the videobitrate was set to Auto.

Hoping that I don't bother you too much.
Title: Re: Producing avi-files playable on a stand-alone DVD player
Post by: zakafreakarama on May 10, 2015, 05:33:29 PM
The running time of a DVD depends on the video and audio bit rates. The audio bit rate in your files is rather low, but the video bit rate is very high.  Now that I look at it, the maximum video bit rate in those files is actually beyond the DVD standard, which allows a maximum of 9.5 Mb/s for video. This means that although most of the time the video stream will be perfectly suitable for DVD, occasionally (fast motion scenes, etc.) it can get too high and render the file unsuitable for DVD authoring.

But you can tell DVD Styler to re-compress the video at a lower bit rate, so you get a longer playing time for each disc. I recently made a DVD with the full extended version of Avatar, and it runs for 2 hours and 50 minutes. DVD Styler uses the free libavcodec library to encode DVD video and it is actually very good at giving high quality output at relatively low bit rates. That's what the "Auto" option is for. It'll set the right bit rate for whatever video files you load. If you only load 77 minutes of video, it'll set a relatively high bit rate for the best possible quality. To get very good quality, I wouldn't load more than 2 hours of video per disc, but if the content is not too action-packed you can make longer DVDs that still look great. DVD Styler probably detected by itself that the video files were not 100% DVD-compliant and decided to re-encode at the proper bit rate.

One more thing: tell DVD styler to just copy the audio streams instead of re-encoding them, or you'll lose quality.
Title: Re: Producing avi-files playable on a stand-alone DVD player
Post by: Avi2DVD on May 12, 2015, 06:21:44 PM
Hello zakafreakarama,
DVD styler is really worth it. I burnt two DVDs containing almost 3 hours of music videos each. I left the videobitrate on Auto - and the result is flawless. Anyway sound is more important here than pictures. That takes me to my possibly last question:

You wrote: >> tell DVD styler to just copy the audio streams instead of re-encoding them, or you'll lose quality. <<  There seems to be no audio option named copy, so when I leave all the audio parameters untouched, is that equivalent to 'copy'?
Title: Re: Producing avi-files playable on a stand-alone DVD player
Post by: zakafreakarama on May 13, 2015, 06:53:12 PM
Mine looks like this when I right-click on the loaded file:

(https://avidemux.org/smif/proxy.php?request=http%3A%2F%2Fs1.postimg.org%2Fvmcwfrmhr%2Fstyler_cap.png&hash=27e0a66491f822dd93e9d57a07cd7e8433e448dd)

Since the MPG file that I loaded is DVD compliant, the default option in DVD Styler is just copying the video and audio streams, without reencoding. Did you right-click on the files you loaded, then choose the 'Properties' option?
Title: Re: Producing avi-files playable on a stand-alone DVD player
Post by: Avi2DVD on May 13, 2015, 11:24:09 PM
>>Did you right-click on the files you loaded, then choose the 'Properties' option?<<
No, but from now on I will do. The option is well hidden. It needs an experienced consultant like you to detect it. Thanks a lot. Very good news for someone who emphasizes sound fidelity.
Title: Re: Producing avi-files playable on a stand-alone DVD player
Post by: zakafreakarama on May 14, 2015, 06:09:15 AM
It seems that copying the streams without re-encoding is the default option when they're DVD-compliant. Your videos will have their video encoded at a lower bit rate but the audio should remain unchanged. And that's a good thing, since your files have MP2 audio at a bit rate of 192 kbps, which is 'just enough' (or even 'barely enough', depending on the quality of the encoding) for good audio quality. Re-encoding to another lossy format would probably mean a noticeable loss in sound quality.