Avidemux Forum

Avidemux => Main version 2.6 => Topic started by: SueEllen on May 10, 2011, 10:30:13 AM

Title: HD .ts files won't convert to working MPG
Post by: SueEllen on May 10, 2011, 10:30:13 AM
I am able to load an .ts file that was recorded from a HD TV channel and save it as an Mpeg TS muxer (ff). But when I try to stream the file to Xbox 360, the Xbox 360 media center says, "Format not supported..unable to play video".

In Avidemux 2.5 I can save it as Mpeg PS format and it then actually streams to Xbox 360, but the Mpg plays OUT OF SYNC on the Xbox 360 when streaming. 

So that's why I wanted to try this experimental version 2.6, but when I try to save the file as "Mpeg-PS muxer (ff), I get this error message:

[MISMATCH] bad width/height for DVD. MUXER cannot open. Failed to save file.....

What can I do?
Title: Re: HD .ts files won't convert to working MPG
Post by: Agent_007 on May 10, 2011, 10:52:40 AM
Press configure under Output format, and select Muxing Format: Free.
Title: Re: HD .ts files won't convert to working MPG
Post by: SueEllen on May 10, 2011, 11:40:41 AM
I use NextPVR to record a few HD TV channels and I have been looking for a program to convert my HD TS files into MPG files for weeks, and all of them were streaming the MPG files OUT OF SYNC to the Xbox 360 and MOST programs could not handle HD ts files to begin with.  Even the Avidemux 2.5 creates OUT OF SYNC MPG files for me.

But Avidemux 2.6 seems to work well for a few seconds, but it then starts to get jerky and the video slowly dies.

The recording starts fine, but after short while into playing the MPG, the sound still works fine, but the video begins getting really choppy and slow frame rate and the video goes out of sync.  Why does this happen and is there a solution?
Title: Re: HD .ts files won't convert to working MPG
Post by: mean on May 11, 2011, 06:18:07 AM
Does it play well on the PC with vlc for example ?
Title: Re: HD .ts files won't convert to working MPG
Post by: SueEllen on May 11, 2011, 10:30:17 PM
No it won't play on VLC either. It starts out OK, but after a short time, the sound is still playing normally, but the video stalls and stops and freezes.

Avidemux 2.6 works great on all my SD ts channel recordings, but it cannot handle the HD ts channel recordings it seems.
Title: Re: HD .ts files won't convert to working MPG
Post by: mean on May 12, 2011, 04:52:14 AM
i would need a sample of the captured file so that i can reproduce the problem
Title: Re: HD .ts files won't convert to working MPG
Post by: SueEllen on May 12, 2011, 06:06:32 AM
I am on wireless broadband with monthly quota and unable to send a large HD ts file.

But all you need to do is download NextPVR and record a HD channel and then run it through Avidemux and you will see it starts off OK but slowly the video dies and freezes up.
Title: Re: HD .ts files won't convert to working MPG
Post by: mean on May 12, 2011, 06:22:49 AM
my HD channels are H264+EAC3
I believe yours are mpeg 2 ?
Title: Re: HD .ts files won't convert to working MPG
Post by: SueEllen on May 12, 2011, 09:33:42 PM
I live in Sydney Australia and the 2 channels are ONE and GEM and when if I run them through ProjectX, it outputs an .AC3 audio file, so I assume the channels are the same as yours.

I did another test last night.  I recorded a HD channel using NextPRV, saves it as .ts.

I then ran it through Avidemux 2.6 and the output MPG file plays perfectly and in sync for about 2-3 minutes, and then all of a sudden the video frame rate begins to drop dramatically and eventually freeze, but the sound keeps going.

What do you think is causing that to happen?
Title: Re: HD .ts files won't convert to working MPG
Post by: mean on May 13, 2011, 05:55:26 AM
Could be a muxing issue
It if plays ok with vlc, that would confirm
Title: Re: HD .ts files won't convert to working MPG
Post by: SueEllen on May 13, 2011, 06:53:53 AM
It doesn't play properly in VLC either.  It begins OK and then slowly the frame rates gets slower and slower and the video just dies.

It happens in Media Player and VLC.
Title: Re: HD .ts files won't convert to working MPG
Post by: mean on May 13, 2011, 11:53:10 AM
I would need the stdout.txt created when you generate the file
Title: Re: HD .ts files won't convert to working MPG
Post by: SueEllen on May 14, 2011, 12:55:09 AM
I cannot attach the "stdout.txt" file to this message.  I zipped it and it's 720KB in size, but your forum says this:

Your file is too large. The maximum attachment size allowed is 192 KB.

Where can I send it?
Title: Re: HD .ts files won't convert to working MPG
Post by: Agent_007 on May 14, 2011, 10:36:01 AM
Pastebins are good options for large log files. If you want to share the zip file, then use megaupload or similar service.
Title: Re: HD .ts files won't convert to working MPG
Post by: SueEllen on May 14, 2011, 09:10:36 PM
Here is the stdout as requested.

http://www.megaupload.com/?d=R2UBVEMQ

Reminder:  I used NextPVR to record a HD TV channel which saves is as .ts. I then imported the .ts into Avidemux and chose Mpeg-PS muxer (ff) - FREE, and the file saved as an .MPG

I then played the MPG in Media Centre and VLC and the MPG plays fine and normal for around 1 minute, but then the video dies, becomes jerky and laggy and frame rates drop and drop and eventually the video on screen freezes, but the sound keeps playing normal.

NOTE: This only happens with 2 HD channels...all the other SD channel .ts files convert fine in Avidemux.
Title: Re: HD .ts files won't convert to working MPG
Post by: mean on May 15, 2011, 05:55:29 AM
Please try that
* Load your file
* select Mpeg -PS as output format
* Click configure
* Select Free as muxing format
* Total muxrate : 30 000
* video muxrate : 25 000
* VBV size : 1024
Title: Re: HD .ts files won't convert to working MPG
Post by: SueEllen on May 15, 2011, 08:45:54 AM
Avidemux won't allow me to do:

VBV size : 1024

The max size seems to be : 500

So what do I do?
Title: Re: HD .ts files won't convert to working MPG
Post by: mean on May 15, 2011, 10:14:32 AM
try with the max i.e. 500
Title: Re: HD .ts files won't convert to working MPG
Post by: SueEllen on May 15, 2011, 08:59:53 PM
Update:

Thank you very much to all the Avidemux developers.  FINALLY, I found something that works throughout the WHOLE video.

Last night I recorded a 1 hour HD .ts file and imported it into Avidemux 2.6 and chose the following settings:

* Loaded the HD ts file
* select Mpeg -PS as output format
* Click configure
* Select Free as muxing format
* Total muxrate : 30 000
* video muxrate : 25 000
* VBV size : 500

Result:  Version 2.6 plays the MPG IN SYNC (Avidemux 2.5 does not), and the 2.6 MPG result played properly throughout the entire 1 hour, on PC and it also worked streaming to the Xbox 360 and in SYNC ;)

So keep up the great work, this is awesome as not even VideoRedo would create a proper working MPG from my HD ts files, but Avidemux 2.6 does  ;D

I will do another test later today on a 2 hour movie and report back how it goes and plays.

Question: How can I get Avidemux to keep the settings above?  Everytime I load Avidemux I need to keep re-entering the settings which can be a pain and tedious work.
Title: Re: HD .ts files won't convert to working MPG
Post by: mean on May 16, 2011, 05:22:57 AM
Do it manually
Save a py project file (i.e. foo.py)
copy foo.py into settings/custom/py
edit foo.py and remove everything but
adm.setContainer(xxxxx)

start avidemux, you will have foobar in the custom/py menu that will apply your settings
Title: Re: HD .ts files won't convert to working MPG
Post by: SueEllen on May 16, 2011, 05:48:19 AM
I did as you suggested.

I saved py project file, foo.py
I created py folder in custom
I copied foo.py into settings/custom/py
I  remove everything except for adm.setContainer(xxxxx)

So the foo.py looks like this:

adm.setContainer("ffPS","muxingType=3","acceptNonCompliant=False","muxRatekBits=30000","videoRatekBits=25000","bufferSizekBytes=500")


But when I start avidemux, and select Custom/Tinypython and foo, nothing happens and the settings do not change.

What am I doing wrong?
Title: Re: HD .ts files won't convert to working MPG
Post by: mean on May 16, 2011, 07:55:16 AM
My bad, please add
adm=Avidemux()           
as the first line of foobar.py
It should look like this :

adm=Avidemux()           
adm.setContainer("ffPS","muxingType=3","acceptNonCompliant=False","muxRatekBits=30000","videoRatekBits=25000","bufferSizekBytes=500")               

Title: Re: HD .ts files won't convert to working MPG
Post by: SueEllen on May 16, 2011, 09:32:16 PM
Yes, that works perfect, cheers ;)

By the way, I recorded 2 more 1 hour HD ts files last night and ran them through Avidemux 2.6 and the end MPG WORKS PERFECTLY and in SYNC, even when streaming to Xbox 360.

In all honesty, I had spend weeks testing over 15 different programs to change my HD ts files into proper working MPG files and NOT A SINGLE program would successfully allow me to stream the MPG file to the Xbox 360 in sync...they were ALL OUT OF SYNC when streaming.

But Avidemux works great and IN SYNC!

You guys (The programmers and Developers) are geniuses. ;D

Keep up the great work.

BTW, I am using (r7194).  Should I keep using that, or is there a newer version I should be using? If so, what's the direct link for the Windows Vista 32bit version please?
Title: Re: HD .ts files won't convert to working MPG
Post by: Agent_007 on May 17, 2011, 11:45:02 AM
Latest version can be found from http://www.avidemux.org/nightly/
Title: Re: HD .ts files won't convert to working MPG
Post by: SueEllen on May 17, 2011, 09:10:06 PM
Which one do I choose?

There are 2 different files in /nightly/win32/

http://www.avidemux.org/nightly/win32/avidemux_r7210_devel_win32.7z

And

http://www.avidemux.org/nightly/win32/avidemux_r7210_win32.7z

Which one is the proper one I should download?

And one last question about Avidemux.

Some nights I have over 10 ts files to convert to MPG and I need to do every one, one by one and it gets hard work and tedious, and then I need to manually rename the output files to extension .mpg

Is there a batch mode where Avidemux 2.6 can do all the files automatically?

Cheers

Title: Re: HD .ts files won't convert to working MPG
Post by: Agent_007 on May 18, 2011, 11:37:08 AM
avidemux_rxxxx_win32.7z is the one.

You can run scripts and batch processing via GUI or command-line.
Title: Re: HD .ts files won't convert to working MPG
Post by: SueEllen on May 18, 2011, 10:24:42 PM
How do I run scripts and batch via GUI?

What command in GUI do I need to tell Avidemux to convert all .ts files in all sub directories to MPG using:

Total muxrate : 30 000
video muxrate :25 000
VBV size : 500
Title: Re: HD .ts files won't convert to working MPG
Post by: mean on May 19, 2011, 05:52:36 AM
Have a look at that example :
http://svn.berlios.de/wsvn/avidemux/branches/avidemux_2.6_branch_mean/autononreg/py/sample_script/convert_avi_to_x264_mkv.py

If you change it a bit, you can do what you want to do
Title: Re: HD .ts files won't convert to working MPG
Post by: SueEllen on May 19, 2011, 09:15:04 PM
I do not understand that programming language or script, so don't worry about it.

I will just have to do every single individually, one per one, which is tedious and hard work, but I have to learn to live with it I guess.
Title: Re: HD .ts files won't convert to working MPG
Post by: mean on May 20, 2011, 06:22:49 AM
Put that file in settings/custom/py/
http://fixounet.free.fr/2.6/remux_ts_2_ps.py

edit  it to set the right :
* file extension : by default it is .mpg
* the folder where your files are

Run it, it will convert all the file foo.mpg to foo.mpg.conv.ps
Title: Re: HD .ts files won't convert to working MPG
Post by: SueEllen on May 20, 2011, 06:51:13 AM
But my original files are .ts and I want the resulting files to be .mpg.

But you said the original files are .mpg and resulting files are "mpg.conv.ps", whatever that is.

So how do tell the script to change all .ts files into mpg?
Title: Re: HD .ts files won't convert to working MPG
Post by: mean on May 20, 2011, 07:03:59 AM
at the beginning of the file you have
ext="mpg"     
Change it to
ext="ts"
to take the .ts files

The name of the output file is the name of the input file + something
It is done here :
    fileout=filein+".converted.ps"
So if you want .mpg change it to
    fileout=filein+".mpg"

The file foobar.ts will become foobar.ts.mpg



Title: Re: HD .ts files won't convert to working MPG
Post by: myth on May 20, 2011, 08:56:34 PM
edit: moved to http://avidemux.org/smf/index.php?topic=9237.0
Title: Re: HD .ts files won't convert to working MPG
Post by: SueEllen on May 21, 2011, 01:04:11 AM
Quote from: mean on May 20, 2011, 07:03:59 AM
at the beginning of the file you have
ext="mpg"     
Change it to
ext="ts"
to take the .ts files

The name of the output file is the name of the input file + something
It is done here :
    fileout=filein+".converted.ps"
So if you want .mpg change it to
    fileout=filein+".mpg"

The file foobar.ts will become foobar.ts.mpg

Ok I did all that. 

I then load Avidemux and select "Custom/Tinypython" and remux_ts_2_ps from the menu, and it converts all the ts files into mpg :)  So thanks for that.

One last question.  After the mpg files are created, I am stuck with the original .ts file and another file that ends in .idx2.

Any possibility to get the script to delete and remove the .ts and .idx2 files?
Title: Re: HD .ts files won't convert to working MPG
Post by: SueEllen on May 21, 2011, 01:15:58 AM
Quote from: myth on May 20, 2011, 08:56:34 PM
Hi there, I also have problems with HD recordings!

I can open the files directly in Avidemux but encoding it to any format after 1st pass it crashes after filling up all RAM.

I just recorded an example file which I get from Kaffeine. Could you help me on how to edit it? I would convert it to an XviD or X264 file with reduced bitrate etc...

netload.in (http://netload.in/dateid9WLI9AeXm/arteHD-222016.m2t.htm)

Did you try running changing the settings to 30000, 25000 and 500 like I did?  After I did that, the HD ts files convert to MPG perfectly.
Title: Re: HD .ts files won't convert to working MPG
Post by: mean on May 21, 2011, 08:54:59 AM
@myth : please open a new thread, it is a separate issue
Title: Re: HD .ts files won't convert to working MPG
Post by: myth on May 21, 2011, 12:06:21 PM
Ok, new thread opened, help is appreciated here (http://avidemux.org/smf/index.php?topic=9237.0)
Title: Re: HD .ts files won't convert to working MPG
Post by: SueEllen on May 21, 2011, 09:36:48 PM
Is there a way to get the script to delete and remove the .ts and .idx2 files after the mpg has been created?
Title: Re: HD .ts files won't convert to working MPG
Post by: Agent_007 on May 22, 2011, 01:13:21 PM
AFAIK AVIdemux scripts cannot delete files.
Title: Re: HD .ts files won't convert to working MPG
Post by: xenome on February 06, 2013, 08:34:43 PM
Hey Guys,

I know this is a very old thread but you can imagine the pain that led me to reply to this thread seeking any help !!

It's the year 2013 now  :D and still very painful for people to deal with TS files !!
I have recorded a video using my satellite decoder Truman which resulted in .ts file (598 mb) .. I did everything possible to run this file on my computer running windows 8 (tried all sort of codecs, players ...etc) and eventually thought of converting it to any known format and then i was lost again in all kinds of forums and online threads , tried zillions of apps and all couldn't even open my file or recognize it !!!

Finally i saw ppl talking about avidemuxer and thought of giving it a go, using the 2.61 64 bit version (r8391) now whenever i open my .ts video the application stays at indexing (Not Responding) forever !!!! i can see a .idx2 file generated 97bytes not increasing there but the application is forever Not Responding

Any help, i am really frustrated   >:( :(
Title: Re: HD .ts files won't convert to working MPG
Post by: mean on February 06, 2013, 08:56:01 PM
a sample file would help (one that is causing issue)
You can also try a nightly, no recent change on TS though
Title: Re: HD .ts files won't convert to working MPG
Post by: Jan Gruuthuse on February 07, 2013, 09:06:05 AM
Make a 5 second recording and upload to a service like rapidshare.com (or similar) and provide a download link to it.
Title: Re: HD .ts files won't convert to working MPG
Post by: xenome on February 08, 2013, 03:02:23 PM
Hey mean and Jan,

Many thanks for the prompt reply. Here's a link to my rapidshare upload

https://rapidshare.com/files/3204009518/ALIDVRS2.zip

It's one min / 25mb ... hope this is not big or annoying .
** Tried to open this with avidemuxer and it said " Cannot find a demuxer for my file" followed by cannot open this file !!!  :(
Cheers
Title: Re: HD .ts files won't convert to working MPG
Post by: Jan Gruuthuse on February 08, 2013, 07:18:30 PM
your upload folder is not set to public:
Download not available
Download permission denied by uploader. (0b67c2f5)

You need to create a new folder with privelleges public you can't change a folder on your account.
- users allowed to see content
- users are allowed download from this folder.

ALIDVRS2.zip = that from a ferguson STB, Seen that before?
Title: Re: HD .ts files won't convert to working MPG
Post by: xenome on February 08, 2013, 07:39:02 PM
Oops my bad ... not familiar with rapidshare ... would you please try again and let me know !

Many thanks brother .. Your help on this is really appreciated  :)
Title: Re: HD .ts files won't convert to working MPG
Post by: Jan Gruuthuse on February 09, 2013, 09:41:03 AM
What is happening, correct me if I'm wrong. VH1 is an encrypted channel (smartcard needed to view it) The video clip is only viewable on the SetTopBox where the recording is made. Had the same issue with ariva 250 combo. This only works with FTA channels. When you have the .ts file on you computer it should play in VLC (http://www.videolan.org/vlc/). If it is not playing with that one, that would indicate the recording is encrypted and there is nothing avidemux can do about that. The information in the file is not accessible for avidemux.