What settings to use for .ts files - they are a bit 'stretched'

Started by avw62, April 19, 2014, 01:07:45 PM

Previous topic - Next topic

avw62


In my earlier post, I already wrote I am a newbie.

Have another question.  I have some TV-video recordings from broadcast.
Recorded using my HDR recorder.

When I import those into Avidemux the scene is vertically a little stretched.

Have been messing around a bit and THINK(!) I may come close with the solution.

Went into Video->Filters->swsResize->16:9 source, destination 1:1
Resize method Lanzcos3 (whatever..?)

It looks fine that way - in the preview.

Now.. from this point on, it gets a bit vague for me.

a. am I supposed to save this? If so, what is the file-extension that I should use?
(offered save box shows *.*, so what to use)

b. how am I to 'set' this for the video I am playing?
when I close, without saving, the video is back as 'stretched',  i.e. the setting is not saved/used.

Thanks!
=

AQUAR

When you click OK in the filter dialog it adds that filter to the active filters.
These active filters are then used during recoding of your media.

So set the video output to recode, select/setup filters, and save video.
The recoded video will have the filter actions incorporated.

Using the resize filter filter for anamorphic video like yours is a good approach.


avw62

Thanks a lot!

To be honest, this is my *first* try on a .ts file, so sorry for being a bit unsure sofar.

I have 'set' things as follows now:
Video Output: Mpeg Encoder (3rd item)
(there is also a Mpeg2 (ff), etc.   The nfo button shows Codec 4CC : MPEG, so I guess I should muse Mpeg Encoder, not one of the others?)

Mpeg Configuration: Quantizer 2, Color space YUV420 (default)

Output Format: Mpeg TS Muxer (ff)

TS Muser: tagged VBR muxing (default)

Active Filters is the one in my previous post
tagged: Lock Aspect Ratio
Source 16:9 Destination: 1:1
100%
Method: Lanzcos3

=

=

later: got a "Muxer cannot open"-error. I changed now to 'Video only'- the white popup window says: "avidemux not responding ..."

AQUAR

If you want to stick with the 'mpeg transport stream' container (.ts file) then,
recode the video using the Mpeg2(ff) encoder (under video output).

Mjpeg video streams are muxed into the .avi output format but its not an effective choice for this kind of operation.

You can get even better results (compatibility, compression level etc) by transcoding with more modern options.
Try xvid4 for encoding (video ouput) and MKV for muxing (output format).
With these two options give the ouput file the extension .mk (ie videoname.mkv).

avw62

Thanks for your support sofar.

How would -you- set this up, let's say if you would like to have the best possible quality .mp4 or .mkv

I have tried a few options but get either not responding or some other errors.





Otherwise, I guess, I'll give up on this .ts files  - although it would be pity as they are by far the majority of the files
I would like to edit (cutting away all the leading and trailing crap, which often is about 1/4 of the entire tv-recording)
Usually these recordings are roughly 4.5GB.

Sorry for keeping on asking, I do want to get this going, but sofar all attempts, well, they remained in vain as far as these .ts files are concerned.

=

Jan Gruuthuse

Load mpeg-ts video. Now with these settings
Video Output: Copy
Audio Output: Copy
Output Format: Mkv Muxer
Select start and end of clip to save only with up or down keyboard arrows
now save the marked videoclip with 1st floppy icon on the left.



Jan Gruuthuse

next step (still beginner user): going from mpeg-ts to dvd
load mpeg-ts video (16x9)
in avidemux menu textual menu select: Auto: DVD
popup window auto DVD set
Source Aspect Ratio: 16:9
Destination Aspect Ratio: 16:9.
and save again your marked video.

Testing avidemux is best done with marking around 1 to 2 minutes video. Check result against the used video (computer) / media (blu-ray/dvd/dlna/flatscreen/standalone/...) player you use.
What works best for me is not necessarily working the best for you.

AQUAR

I note that the avidemux screen captures say "Encoding.. reageerd niet" .
That's Dutch for "encoding.. not responding".

Recoding mpeg2 is heavy duty work and so it needs a decently fast PC.
Avidemux may look like its not responding because the hardware is locked up with being too busy recoding.

The copy into MKV (Jan's suggestion ) plus setting the display aspect in its configuration, might be the quickest ticket here.
Press "I" (next to the floppy) and show us a screen capture of the information dialog that pops up.


avw62

Quote from: Jan Gruuthuse on April 20, 2014, 12:22:48 PM
Load mpeg-ts video. Now with these settings
Video Output: Copy
Audio Output: Copy
Output Format: Mkv Muxer
Select start and end of clip to save only with up or down keyboard arrows
now save the marked videoclip with 1st floppy icon on the left.


Thanks a lot.

I was working the other way round: deleting stuff I did not need.

When using Video Output->Copy the output (and preview) is horizontally stretched. Details of the recording ("I") see my earlier post.

I have changed to mpeg2 (ff) - based on advise from AQUAR
Configure: no changes
Filters: swsResize - settings
tagged: Lock Aspect Ratio
Source 16:9 Destination: 1:1
100%
Method: Lanzcos3





Sourcefile: 4.598.845.824 bytes
resulting file:1.811.281.608 bytes

All in all it looks quite okay.

If I were to select .mp4 (output format), assume the rest remains unchanged?

Thanks to all!
=



avw62

Quote from: AQUAR on April 20, 2014, 02:10:28 PM
I note that the avidemux screen captures say "Encoding.. reageerd niet" .
That's Dutch for "encoding.. not responding".

Recoding mpeg2 is heavy duty work and so it needs a decently fast PC.
Avidemux may look like its not responding because the hardware is locked up with being too busy recoding.

The copy into MKV (Jan's suggestion ) plus setting the display aspect in its configuration, might be the quickest ticket here.
Press "I" (next to the floppy) and show us a screen capture of the information dialog that pops up.

Okay, thanks.
As for the details "I" (see earlier post).

I have a 5 year old pc with 8MB RAM.

Will give it another try later to see if a .ts file is generated, but meanwhile I am already happy with at least a .mkv output...  ;)

=

AQUAR

@ avw62 - good to know you got a useable output with the correct aspect, using the resize filter.

The resize filter method is a fine option, but really intended to be used when changing video codecs and to match playback hardware.
Recoding to suit hardware etc is a little more involved hence the alternative approaches offered by Jan.

Steps Involved:

From the video information screen you provided we get,
The video has a stored aspect of "720 : 576" and is for a pixel aspect of "64 : 45".
So the display aspect (how you see it) of the video is 16 : 9 as defined by a simple equation.
That is - display aspect is (720 X 64) : (576 X 45) = 16 : 9 = 1.777.
PC monitors have square pixels (aspect is "1:1")
For these monitors, if you keep the height at 576 units, then the width has to be 1024 units 1024 : 576 = 1.777 = 16 : 9

Now set the input to copy and output to MKV
In the MKV configuration, tick the display width box and set the value to 1024.
And save.

Why do it this way?
Copying is much faster.
No quality loss (as we are keeping the same video and audio).
The MKV file is set up with extra information for media players to provide the correct aspect.
Hopefully you get a media file that plays without being stretched.



avw62


Thank you all for your patience !  ;)

So I went on as follows

Opened ts file in avidemux  (whilst doing so for the first time, it creates an .idx of 2,5mb)
Video Output  : Copy (no  changes)
Audio Output  : Copy (no  changes)
Output format: select MKV Muxer,
Configure      : tag Force display with - use 1024 +OK

Select edit start marker A
select edit end marker B
(selecting what needs to be be saved)
click on first 'save'(disk) button

add: namefile + mkv

Source .ts: 4.598.845.824 bytes
Dest. mkv: 3.267.190.131 bytes

=

Playback is fine indeed, .mkv file created successfully.
Pheww ..

Now, I am crossing my fingers that this is indeed the right procedure as per your expert opinion...
The results are okay, so was my earlier attempt, but that one wasn't entirely correct.
Wouldn't have figured this myself.



Have three additional questions (simple ones, I hope)
1. let's say it has been a tv broadcast with 2 commercials somewhere in between.
I would cut off the excessive recording in the beginning (usually the last part of the preceding recording + a lot of commercials) and the stuff at the end.

delete--save--delete----save----delete---save----delete
-------[A-1-B]----------[A-2-B]-----------[A-3-B]---------

So, 1+2+3 are 'glued' together as 1 ?

Or .. my guess is: I would select the parts/commercials to be deleted (using A+B-markers)
delete them and thén save the recording.


2. If I were to save the example .ts file to MP4, I am to select MP4 muxer, but also tag force display width 1024?

3. what does this mean?
'The video is in copy mode but the cut points are not on keyframes.
The video will be saved but there will corruption at cut point(s).'

How to correct those, if at all possible?

Questions... questions ..







Jan Gruuthuse

#12
Answer to your question 3) you can only select a cutting point with up or down keyboard arrow, other points are not valid.

Fast editing: Load video
Clean begin of video: don't use here marker [A ]: important!
1] goto where you want the beginning of the video start, select cutting point with up/down cursor (keyboard arrow). Mark with [ B]
2] now press simultaneous these 2 keyboard keys [Ctrl][x]
You should now have a clean video start.

Clean commercial breaks
1] goto 1st commercial break, select cutting point [A ] only with up/down cursor (keyboard arrow).
2] goto end of 1st commercial break, select cutting point [ B] with up/down cursor (keyboard arrow).
3] now press simultaneous these 2 keyboard keys [Ctrl][x], commercial break is now cut out of loaded video.
Repeat  above 3 steps for 2nd commercial break and any other commercial breaks in the loaded video.

When finished, goto where your new video should stop and mark this cut with [ B]
If you don't need to join anything beyond this end you can use all 4 cursor keys to mark this point.
If you need to join additional video beyond this point, you can only use up/down cursor (keyboard arrow).

Now save the complete video. The saved video should now run completely without any issues.

avw62

Quote from: Jan Gruuthuse on April 21, 2014, 01:39:51 PM
Answer to your question 3) you can only select a cutting point with up or down keyboard arrow, other points are not valid.

Fast editing: Load video
Clean begin of video: don't use here marker [A ]: important!
1] goto where you want the beginning of the video start, select cutting point with up/down cursor (keyboard arrow). Mark with [ B]
2] now press simultaneous these 2 keyboard keys [Ctrl]


  • You should now have a clean video start.
Ah!
Only when editing your text (between quote-unquote) I  saw it was a 'X'  Ctrl-X
It was displayed as a small block  ;)

Quote
Clean commercial breaks
1] goto 1st commercial break, select cutting point [A ] only with up/down cursor (keyboard arrow).
2] goto end of 1st commercial break, select cutting point [ B] with up/down cursor (keyboard arrow).
3] now press simultaneous these 2 keyboard keys [Ctrl]
  • , commercial break is now cut out of loaded video.
    Repeat  above 3 steps for 2nd commercial break and any other commercial breaks in the loaded video.

    When finished, goto where your new video should stop and mark this cut with [ B]
    If you don't need to join anything beyond this end you can use all 4 cursor keys to mark this point.
    If you need to join additional video beyond this point, you can only use up/down cursor (keyboard arrow).

    Now save the complete video. The saved video should now run completely without any issues.
Thank you!

By the way, Jan, please donot get me wrong okay, although I do wish to follow your
'up/down arrow'-advice..., sofar, I went on as follows
- use the block on the timeline to get close to where I should be for marking
- then use shift -> (keyboard arrow) to go fast forward (in case of need)
- then as a final step just the -> arrow for slow frame by frame steps (steps of .040 in the time counter at the bottom)

This seems to work.
Now I wonder if there is a difference between selecting your way or my way.

The up/down arrow make larger 'skips'
up-arrow: 00.000 00.360 00.840 01.320 01.800 2.280
versus
normal -> keyboard arrow:  .000 .040 .080 .120 .160 .200

Again, no offense meant, okay.

=

Jan Gruuthuse

#14
If you did use left or right arrows to select cutting point or from the menu or then most likely you get some protesting message from avidemux:
Quote'The video is in copy mode but the cut points are not on keyframes.
The video will be saved but there will corruption at cut point(s).'
If you used up/down cursor key or / then the video should be cut fine.
It all depends on what type of video you do edit. mpeg-ts HD could have more issues with this then mpeg-ts SD
source: Avidemux wiki documentation