A Sky, cable and digital tv forum. Digital TV Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Digital TV Banter forum » Digital TV Newsgroups » uk.tech.digital-tv (Digital TV - General)
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

uk.tech.digital-tv (Digital TV - General) (uk.tech.digital-tv) Discussion of all matters technical in origin related to the reception of digital television transmissions, be they via satellite, terrestrial or cable. Advertising is forbidden, with no exceptions.

snipping ts files neatly



 
 
Thread Tools Display Modes
  #21  
Old December 19th 14, 12:51 PM posted to uk.tech.digital-tv,uk.comp.os.linux
Johny B Good[_2_]
external usenet poster
 
Posts: 853
Default snipping ts files neatly

On Fri, 19 Dec 2014 11:33:43 +0000 (GMT), Jim Lesurf
wrote:

On 18 Dec, wrote:

So far only tried a short HTDV recording from BBC 1 HD Scot this
morning. I'll try a larger file and generate a set of 'snippets'. Then
see if my TV plays them OK. If so. Robert seems to now be my avuncular
relative. :-)


Yes, the files snipped using ffmpeg play fine on my TV. The result isn't
'gapless' as the TV still has to start the vision, then the sound comes on
a second or so later. So this is only useful for musical items like those
where a conductor, orchestra, etc, are standing silently for a few sec
before they begin to play. But nevetheless, useful as a quick way of
snipping concerts into 'one work per file' for easy access via the TV.

Out of curiosity I installed my distro's version of libav-tools so I could
compare using that version of avconv with the 'locally hand built' version
of ffmpeg I normally use. Relieved to see that the command syntax is the
same. :-)

I then did some snips of the same source ts file with the same specified
start times and durations. These also seem fine when tested with VLC (not
confirmed with the TV as yet but will do soon.)

I think the contained AV data is the same, but the two results do differ.

This is snipping a source file that is about 1800 MB into three sections.

Using ffmpeg the three resulting files add up to being about 78500k bigger
than the source. Using avconv they are about 78200k bigger than the source.

I'm not sure if this is because fmpeg tends to include a bit more at start
and end, or if it adds some metadata which avconv omits, or what.

But if the avconv produced results play OK on my TV it means I can write a
simple 'AVChopper' app to use as a front end for either. Then I can just
give the app a list of snip times for a file and it will issue the series
of relevant avconv/ffmpeg commands. Once that works I can record ts files
of arbitrary length in the first place, then snip down later as convenient
for media player use.

That said, I've not yet checked if VLC is happy with files bigger than 4GB.
I assume it is, but am I wrong?


Don't worry, you're right. I've got a 10.9GB HD movie file that VLC
1.1.9 plays just fine. :-)
--
J B Good
  #22  
Old December 19th 14, 01:42 PM posted to uk.tech.digital-tv,uk.comp.os.linux
Jim Lesurf[_2_]
external usenet poster
 
Posts: 4,191
Default snipping ts files neatly

In article , Johny B Good
wrote:

That said, I've not yet checked if VLC is happy with files bigger than
4GB. I assume it is, but am I wrong?


Don't worry, you're right. I've got a 10.9GB HD movie file that VLC
1.1.9 plays just fine. :-)


Excellent. Should be various items to record in the next couple of weeks.
This may make the process a lot nicer. :-)

Once that's done I may also finally get around to comparing Freeview HD
with iplayer HD!

Oh, and just to confirm: Yes, the files 'snipped' using avconv play just
fine on my TV. So the choice between avconv and ffmpeg for this seems a
matter of personal preference. Although I'm intrigued by the differences
I reported earlier, the results look fine either way.

Jim

--
Please use the address on the audiomisc page if you wish to email me.
Electronics http://www.st-and.ac.uk/~www_pa/Scot...o/electron.htm
Armstrong Audio http://www.audiomisc.co.uk/Armstrong/armstrong.html
Audio Misc http://www.audiomisc.co.uk/index.html

  #23  
Old December 19th 14, 08:18 PM posted to uk.tech.digital-tv,uk.comp.os.linux
Andy Furniss[_3_]
external usenet poster
 
Posts: 130
Default snipping ts files neatly

Jim Lesurf wrote:

Don't worry, you're right. I've got a 10.9GB HD movie file that
VLC 1.1.9 plays just fine. :-)


Excellent. Should be various items to record in the next couple of
weeks. This may make the process a lot nicer. :-)


Remember you will get very different results with VLC depending on
whether it's using faad or ffmpeg to decode aac.

The former possibly still buggy (haven't looked) the latter full dynamic
range with mixdown meta not parsed. For prom the dynamic range control
is quite light anyway, but I don't think it will be nice for a film if
you are mixing down to 2 big speakers. Even 5.1 setups are supposed to
default to full DRC - it's mandated for a mixdown, which I suppose sort
of expands dynamic range by its self. Thinking of mixdowns I saw "the
future" mpeg-h summary recently, 3D audio , HOA, binaural and it has the
concept of active mixdown to overcome what it says is an issue with
mixing down partially correlated feeds.

Once that's done I may also finally get around to comparing Freeview
HD with iplayer HD!


For visual film judder! well assuming it was interlaced to start with.

I guess you may mean R3 in which case I noticed that the live R3 feed
wasn't filtered at 18k, but iplayer was, I don't know if it's always
like that - just noticed on a couple of this seasons proms that I got.
I wonder if the iplayer versions also get remixed compared to the live feed.

Oh, and just to confirm: Yes, the files 'snipped' using avconv play
just fine on my TV. So the choice between avconv and ffmpeg for this
seems a matter of personal preference. Although I'm intrigued by the
differences I reported earlier, the results look fine either way.


Just tried and using my old and probably buggy code can see that the
only difference WRT size between avconv and ffmpeg is a few extra PAT
packets. The increase in size over original also seems to be PAT/PMT -
both roughly produce 10x more than the master then apparently duplicate
the PAT on another pid - not sure why, it could be ATSC compat or
something like that for the dup. The size may be because of timing eg,
spec says PAT every Xms so on a 40mbit mux there are less than your new
low mbit mux you created.

FWIW FreeviewHD is AAC LC not HE-AAC - audio description is HE.

  #24  
Old December 19th 14, 11:37 PM posted to uk.tech.digital-tv,uk.comp.os.linux
Mike[_19_]
external usenet poster
 
Posts: 109
Default snipping ts files neatly

In article ,
Jim Lesurf wrote:

Except that I'm not sure where I even have a copy of Windows of any kind.
No doubt I have some CDRs somewhere. But then I have hundreds of CDs and
DVDs all over the place. Needle in a haystack.


Another vote for VideoRedo, and I don't use Windows either (it runs
ok, minor GUI glitches, in WINE on Slackware) ...

--
--------------------------------------+------------------------------------
Mike Brown: mjb[-at-]signal11.org.uk | http://www.signal11.org.uk

--- news://freenews.netfront.net/ - complaints: ---
  #25  
Old December 20th 14, 09:45 AM posted to uk.tech.digital-tv,uk.comp.os.linux
Jim Lesurf[_2_]
external usenet poster
 
Posts: 4,191
Default snipping ts files neatly

In article , Andy
Furniss [email protected] wrote:
Jim Lesurf wrote:


Don't worry, you're right. I've got a 10.9GB HD movie file that VLC
1.1.9 plays just fine. :-)


Excellent. Should be various items to record in the next couple of
weeks. This may make the process a lot nicer. :-)


Remember you will get very different results with VLC depending on
whether it's using faad or ffmpeg to decode aac.


Ah! That's interesting. How do I check and ensure use of ffmpeg by VLC?

As things stand ffmpeg isn't installed on any of my systems. Although
I do keep and use a 'usespace' version of ffmpeg. I had been dithering
because the distro (Xfce Mint LTS) offers libav instead. That also
wasn't installed until yesterday when I decided to compare it with
using the 'local' version of ffmpeg I'd built.

Does your comment apply to libav, and is that also preferred to faad
here? I've not checked recently but it may explain why in the past
some HDTV recordings gave 'jumpy' sound levels with VLC. That was
with a previous distro, though. Not checked recently.

That said, at present the plan is just to use VLC to let me decide the
timings of 'chop' points when breaking a large ts file into sensible
segments. However I plan at a later stage to have a computer connected to
the system and use VLC or similar to play files. (Which will raise again an
earlier issue wrt rendering quality.)


The former possibly still buggy (haven't looked) the latter full dynamic
range with mixdown meta not parsed. For prom the dynamic range control
is quite light anyway, but I don't think it will be nice for a film if
you are mixing down to 2 big speakers. Even 5.1 setups are supposed to
default to full DRC - it's mandated for a mixdown, which I suppose sort
of expands dynamic range by its self. Thinking of mixdowns I saw "the
future" mpeg-h summary recently, 3D audio , HOA, binaural and it has the
concept of active mixdown to overcome what it says is an issue with
mixing down partially correlated feeds.


Once that's done I may also finally get around to comparing Freeview
HD with iplayer HD!


For visual film judder! well assuming it was interlaced to start with.


I guess you may mean R3 in which case I noticed that the live R3 feed
wasn't filtered at 18k, but iplayer was, I don't know if it's always
like that - just noticed on a couple of this seasons proms that I got. I
wonder if the iplayer versions also get remixed compared to the live
feed.


Interesting. I noticed the filtering ages ago and I thought the BBC had
removed it. The argument was to get the bits devoted to more detail at
lower freqencies as it was judged to give audibly better results that way.

That said, my plan is to focus on the HDTV channel audio comparisons as
audio is of more interest to me in general. But I am also interested in
video differences. The snag being how to quantify them even when I can see
them!

Oh, and just to confirm: Yes, the files 'snipped' using avconv play
just fine on my TV. So the choice between avconv and ffmpeg for this
seems a matter of personal preference. Although I'm intrigued by the
differences I reported earlier, the results look fine either way.


Just tried and using my old and probably buggy code can see that the
only difference WRT size between avconv and ffmpeg is a few extra PAT
packets. The increase in size over original also seems to be PAT/PMT -
both roughly produce 10x more than the master then apparently duplicate
the PAT on another pid - not sure why, it could be ATSC compat or
something like that for the dup. The size may be because of timing eg,
spec says PAT every Xms so on a 40mbit mux there are less than your new
low mbit mux you created.


Maybe it is assumed to aid the ability of players to pick up and synch or
something?

However using avconv / ffmpeg to do the snipping seems to ensure chopped
files that play OK.

FWIW I've now almost finished writing a simple ROX app (called with
startling originality 'AVChopper') that can use either of them. Given a
list of times it will generate snipped files starting and ending at (about)
the specified times. There may be some slight adjustments as I guess
avconv/ffmpeg choose what they find as 'appropriate' places near to the
specified times.

FWIW FreeviewHD is AAC LC not HE-AAC - audio description is HE.


OK. Afraid I keep getting confused by the differences in these in terms of
how they are labelled. This area is a bewildering array of filetypes,
labels, containers, etc. Too much for my small head to juggle!

Jim

--
Please use the address on the audiomisc page if you wish to email me.
Electronics http://www.st-and.ac.uk/~www_pa/Scot...o/electron.htm
Armstrong Audio http://www.audiomisc.co.uk/Armstrong/armstrong.html
Audio Misc http://www.audiomisc.co.uk/index.html

  #26  
Old December 20th 14, 09:48 AM posted to uk.tech.digital-tv,uk.comp.os.linux
Jim Lesurf[_2_]
external usenet poster
 
Posts: 4,191
Default snipping ts files neatly

In article , Mike
wrote:
In article , Jim Lesurf
wrote:


Except that I'm not sure where I even have a copy of Windows of any
kind. No doubt I have some CDRs somewhere. But then I have hundreds of
CDs and DVDs all over the place. Needle in a haystack.


Another vote for VideoRedo, and I don't use Windows either (it runs ok,
minor GUI glitches, in WINE on Slackware) ...


Thanks. Noted. Must confess I've never used WINE! ...Although I may
consume some PORT and/or FIZZ over the next week or two. :-)

Jim

--
Please use the address on the audiomisc page if you wish to email me.
Electronics http://www.st-and.ac.uk/~www_pa/Scot...o/electron.htm
Armstrong Audio http://www.audiomisc.co.uk/Armstrong/armstrong.html
Audio Misc http://www.audiomisc.co.uk/index.html

  #27  
Old December 20th 14, 04:37 PM posted to uk.tech.digital-tv,uk.comp.os.linux
Jim Lesurf[_2_]
external usenet poster
 
Posts: 4,191
Default snipping ts files neatly

On 20 Dec, wrote:

FWIW FreeviewHD is AAC LC not HE-AAC - audio description is HE.


OK. Afraid I keep getting confused by the differences in these in terms
of how they are labelled. This area is a bewildering array of filetypes,
labels, containers, etc. Too much for my small head to juggle!


Worth pointing out what's been confusing me.

When I switch channel my HDTV briefly shows an 'info' box. This displays
'HE-AAC' for the HDTV channels. I'd taken to assuming this was telling me
the format of the audio I was listening to. But is it only referring to the
'audio description' stream?

FWIW a while ago, having encountered the 'low volume' curio, I set the TVs
options to tell it *not* to either 'mix' or play the 'audio description'.
But doing so made no difference to the audio level of what I hear.

OK, back to progress...

I did some more experiments with 'snipping' and got my program working OK
this afternoon. Ecountered various interesting aspects along the way.

One is that if I run a recorded ts file though

avconv -i infile.ts -acodec copy -vcodec copy outfile.ts

the outfile is indeed a bit larger than the infile. It also shows a
different filer icon using xfce/ROX. The originals show a 'data' icon
meaning the filing systems don't know what it contains. The outfile 'copy'
shows a 'reel of film'. I guess this means that running the data though
avconv (or ffmpeg) 'tidies up' the file's contents, etc, making them more
'recognisable'.

Snipping a file with avconv seems to produce results that play happily with
my TV and VLC. Although if I split a source file into such parts I'm
finding that VLC shows the durations as '00:00' for all but the last one.
Yet the TV shows all their durations without a problem.

I've also encountered a few times VLC freezing if I click the position
slider during payback. This leaves the audio output 'captured' and so any
attempt to use VLC (or audiacity for plain audio) throws up an error that
the sound output is 'busy'. I'm sure there's a simpler way to clear this,
but I've just restarted the machine each time until I find out what it is!

(I'm using ALSA.)

In the past I did experiment with a different AV player (not m-player, but
I've forgotten now what it was). I'm wondering if an alternative to VLC
might be worth a go. Basicically I just want something that lets me look
and be able to see the required edit times without crashing when I jump
playback location.

I'm also wondering if it may be 'good practice' to use avconv or ffmpeg
first to create a new version 'tidied up' via the above route before then
snipping it. Comments?

Jim

--
Please use the address on the audiomisc page if you wish to email me.
Electronics
http://www.st-and.ac.uk/~www_pa/Scot...o/electron.htm
Armstrong Audio http://www.audiomisc.co.uk/Armstrong/armstrong.html
Audio Misc http://www.audiomisc.co.uk/index.html

  #28  
Old December 21st 14, 09:48 AM posted to uk.tech.digital-tv,uk.comp.os.linux
Jim Lesurf[_2_]
external usenet poster
 
Posts: 4,191
Default snipping ts files neatly

In article , Jim Lesurf
wrote:
I'm also wondering if it may be 'good practice' to use avconv or ffmpeg
first to create a new version 'tidied up' via the above route before
then snipping it.


This turns out to be a bad idea here at present. The main reason being that
when I play such a 'cleaned' version with VLC the indicators for elapsed
time and duration simply show zeros. Hence making it impossible to use VLC
to find 'snip' times for splitting the file!

I've also now encountered one file which both avconv and ffmpeg can't fully
process because of a duff section in the middle. I can use -ss -t to avoid
that section and they then work. But I can't 'clean' the entire file in one
go. I guess the problem is due to a burst of interference that corrupted
the data during recording.

What is curious is that even with 'copy' for the codec options both
programs fall over when they encounter a long enough 'corrupt' section. Is
there another option to "plug on regardless"? I'll see if I can find one.

Jim

--
Please use the address on the audiomisc page if you wish to email me.
Electronics http://www.st-and.ac.uk/~www_pa/Scot...o/electron.htm
Armstrong Audio http://www.audiomisc.co.uk/Armstrong/armstrong.html
Audio Misc http://www.audiomisc.co.uk/index.html

  #29  
Old December 21st 14, 12:09 PM posted to uk.tech.digital-tv,uk.comp.os.linux
Andy Furniss[_3_]
external usenet poster
 
Posts: 130
Default snipping ts files neatly

Jim Lesurf wrote:
In article , Andy
Furniss [email protected] wrote:
Jim Lesurf wrote:


Don't worry, you're right. I've got a 10.9GB HD movie file that
VLC 1.1.9 plays just fine. :-)

Excellent. Should be various items to record in the next couple
of weeks. This may make the process a lot nicer. :-)


Remember you will get very different results with VLC depending on
whether it's using faad or ffmpeg to decode aac.


Ah! That's interesting. How do I check and ensure use of ffmpeg by
VLC?


I don't use vlc, but I expect there is a way.

It may not even use it anymore - I assume your distro installed a load
of dependencies for it so you could just search for faad or ldd the vlc
binary and see if it's there.

As things stand ffmpeg isn't installed on any of my systems.
Although I do keep and use a 'usespace' version of ffmpeg. I had been
dithering because the distro (Xfce Mint LTS) offers libav instead.
That also wasn't installed until yesterday when I decided to compare
it with using the 'local' version of ffmpeg I'd built.

Does your comment apply to libav, and is that also preferred to faad


Maybe the vlc install did whatever libs it wanted anyway.
I don't think there will be much difference between the aac decoder
between the two.

here? I've not checked recently but it may explain why in the past
some HDTV recordings gave 'jumpy' sound levels with VLC. That was
with a previous distro, though. Not checked recently.


FAAD was the reason for the jumps as shown in old threads - I don't know
what the situation is now.

  #30  
Old December 21st 14, 12:33 PM posted to uk.tech.digital-tv,uk.comp.os.linux
Andy Furniss[_3_]
external usenet poster
 
Posts: 130
Default snipping ts files neatly

Jim Lesurf wrote:
On 20 Dec, wrote:

FWIW FreeviewHD is AAC LC not HE-AAC - audio description is HE.


OK. Afraid I keep getting confused by the differences in these in
terms of how they are labelled. This area is a bewildering array of
filetypes, labels, containers, etc. Too much for my small head to
juggle!


Worth pointing out what's been confusing me.

When I switch channel my HDTV briefly shows an 'info' box. This
displays 'HE-AAC' for the HDTV channels. I'd taken to assuming this
was telling me the format of the audio I was listening to. But is it
only referring to the 'audio description' stream?


I guess so, both ffmpeg and mediainfo call the main track LC and (if
they manage to find it with the default low amount of parsing) the AD
HE-AAC.


FWIW a while ago, having encountered the 'low volume' curio, I set
the TVs options to tell it *not* to either 'mix' or play the 'audio
description'. But doing so made no difference to the audio level of
what I hear.

OK, back to progress...

I did some more experiments with 'snipping' and got my program
working OK this afternoon. Ecountered various interesting aspects
along the way.

One is that if I run a recorded ts file though

avconv -i infile.ts -acodec copy -vcodec copy outfile.ts

the outfile is indeed a bit larger than the infile. It also shows a
different filer icon using xfce/ROX. The originals show a 'data'
icon meaning the filing systems don't know what it contains. The
outfile 'copy' shows a 'reel of film'. I guess this means that
running the data though avconv (or ffmpeg) 'tidies up' the file's
contents, etc, making them more 'recognisable'.


Maybe the vid stream gets a cleaner start so is easily detected.

Snipping a file with avconv seems to produce results that play
happily with my TV and VLC. Although if I split a source file into
such parts I'm finding that VLC shows the durations as '00:00' for
all but the last one. Yet the TV shows all their durations without a
problem.


Hmm, I did notice that ffmpeg and avconv reduced the number of packets
containing a clock ref - ffmpeg less so than avconv, maybe vlc isn't
seeing enough of these - though when it comes to variable rate transport
streams you may find that things that call a duration are just guessing!

I've also encountered a few times VLC freezing if I click the
position slider during payback. This leaves the audio output
'captured' and so any attempt to use VLC (or audiacity for plain
audio) throws up an error that the sound output is 'busy'. I'm sure
there's a simpler way to clear this, but I've just restarted the
machine each time until I find out what it is!

(I'm using ALSA.)


I don't know how to clear that, it's strange that VLC errs, though I
don't use it on Linux. SWMBO has used it for years for watching TV live
and recorded (so skipping ads) on Windows without issue. These are
always unprocessed .ts of course.


In the past I did experiment with a different AV player (not
m-player, but I've forgotten now what it was). I'm wondering if an
alternative to VLC might be worth a go. Basicically I just want
something that lets me look and be able to see the required edit
times without crashing when I jump playback location.

I'm also wondering if it may be 'good practice' to use avconv or
ffmpeg first to create a new version 'tidied up' via the above route
before then snipping it. Comments?


Personally I would keep unadulterated - it seems there are issues with
ffmpeg/avconv - you may find more.


 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT. The time now is 05:29 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.SEO by vBSEO 2.4.0
Copyright 2004-2017 Digital TV Banter.
The comments are property of their posters.