Re: [vdr] merging correctly several .ts files to a single ts file or better mkv

2010-04-01 Thread Lucian Muresan
On 28.03.2010 18:12, Eric Valette wrote:
> On 28/03/2010 17:45, Eric Valette wrote:
>> On 28/03/2010 17:23, Lars Bläser wrote:
> 
>> Granted. However, merging with cat *.ts > complete.ts + trying a single
>> pass mkv conversion fails miserably (allhough I have very up to date
>> ffmpeg version).
>>
>> See fourth message in this threads ffmpeg complain with non monotone
>> timestamps and simply hang the computer.
> 
> I just tryed remuxing the .ts (and removing unneeded languages and
> subtitles) file to another .ts before converting to matroska and it works!
> 
> cat 1.ts  2.ts > merged.ts
> ffmpeg -y -ss 00:01:06 -map 0.0 -map 0.1 -i merged.ts -vcodec copy
> -sameq -acodec copy simplified1.ts
> ffmpeg -y -i simplified1.ts  -vcodec copy -sameq -acodec copy -async 2
> -f matroska 1.mkv
> 
> Much simpler indeed and no risk to have a small glitch in the meddle of
> the cut.

Where do you take that time offset value from? I'm also working on such
kind of scripts right now, because I want to remux especially HD
recordings to MKV. In the case of movies broadcasted by ARD HD or ZDF HD
(7...@50hz), they are full of so-called filler-NALUs, which can be
removed just by muxing into MKV not directly by ffmpeg, but by mkvmerge,
which shrinks a 10GB movie to about 3GB. My problem is still A/V sync,
all the original TS chunks (I also record into 200MB pieces, because of
fast editing in VDR) show video delays for each audio track of over 1
second, which is also very noticeable ion the final converted MKV. The
delays are reported both by tsMuxeR and mediainfo see for example the
"Video delay" value below:

mediainfo 1.ts
General
ID   : 8008
Complete name: 1.ts
Format   : MPEG-TS
File size: 200 MiB
Duration : 2mn 6s
Overall bit rate : 13.3 Mbps

Video
ID   : 6010 (0x177A)
Menu ID  : 132 (0x84)
Format   : AVC
Format/Info  : Advanced Video Codec
Format profile   : h...@l4.0
Format settings, CABAC   : Yes
Format settings, ReFrames: 5 frames
Duration : 2mn 5s
Bit rate : 11.5 Mbps
Width: 1 280 pixels
Height   : 720 pixels
Display aspect ratio : 16:9
Frame rate   : 50.000 fps
Resolution   : 8 bits
Colorimetry  : 4:2:0
Scan type: Progressive
Bits/(Pixel*Frame)   : 0.249
Stream size  : 172 MiB (86%)
Color primaries  : BT.709-5, BT.1361, IEC 61966-2-4,
SMPTE RP177
Transfer characteristics : BT.709-5, BT.1361
Matrix coefficients  : BT.709-5, BT.1361, IEC 61966-2-4 709,
SMPTE RP177

Audio #1
ID   : 6020 (0x1784)
Menu ID  : 132 (0x84)
Format   : MPEG Audio
Format version   : Version 1
Format profile   : Layer 2
Duration : 2mn 5s
Bit rate mode: Constant
Bit rate : 256 Kbps
Channel(s)   : 2 channels
Sampling rate: 48.0 KHz
Video delay  : -1s 340ms
Stream size  : 3.84 MiB (2%)
Language : German
Language, more info  : Clean effects

Audio #2
ID   : 6021 (0x1785)
Menu ID  : 132 (0x84)
Format   : MPEG Audio
Format version   : Version 1
Format profile   : Layer 2
Duration : 2mn 5s
Bit rate mode: Constant
Bit rate : 256 Kbps
Channel(s)   : 2 channels
Sampling rate: 48.0 KHz
Video delay  : -1s 344ms
Stream size  : 3.84 MiB (2%)
Language : German
Language, more info  : Clean effects

Audio #3
ID   : 6022 (0x1786)
Menu ID  : 132 (0x84)
Format   : AC-3
Format/Info  : Audio Coding 3
Duration : 2mn 5s
Bit rate mode: Constant
Bit rate : 448 Kbps
Channel(s)   : 2 channels
Channel positions: Front: L R
Sampling rate: 48.0 KHz
Video delay  : -1s 486ms
Stream size  : 6.73 MiB (3%)
Language : German
Language, more info  : Clean effects


___
vdr mailing list
vdr@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/lis

Re: [vdr] merging correctly several .ts files to a single ts file or better mkv

2010-04-01 Thread Eric Valette



Where do you take that time offset value from?
I play the simplified ts file using smplayer -ss is the start in the ts 
file, -t is the duration to add
to the -ss value (I would have prefered the absolute end avoiding a 
substract...).

I'm also working on such
kind of scripts right now, because I want to remux especially HD
recordings to MKV. In the case of movies broadcasted by ARD HD or ZDF HD
(7...@50hz), they are full of so-called filler-NALUs, which can be
removed just by muxing into MKV not directly by ffmpeg, but by mkvmerge,
which shrinks a 10GB movie to about 3GB.
You mean you extract the various component (audio, video) into separate 
files

and then reassemble them using mkvmerge?

My problem is still A/V sync,
all the original TS chunks (I also record into 200MB pieces, because of
fast editing in VDR) show video delays for each audio track of over 1
second, which is also very noticeable ion the final converted MKV. The
delays are reported both by tsMuxeR and mediainfo see for example the
"Video delay" value below:
   
Yes I know this is why the "async 2, (+ vsync 2 for récent ffmpeg 
version)" is there. Without them I have the audio and the video out of 
sync just like you.


ffmpeg -y -i simplified1.ts  -vcodec copy -sameq -acodec copy -vsync 2 -async 2 
 -f matroska 1.mkv

I'll post the mediainfo on the ts and mkv when back at home.

-- eric





___
vdr mailing list
vdr@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr


Re: [vdr] merging correctly several .ts files to a single ts file or better mkv

2010-04-01 Thread Lucian Muresan
On 01.04.2010 13:23, Eric Valette wrote:
> 
>> Where do you take that time offset value from? 
> I play the simplified ts file using smplayer -ss is the start in the ts
> file, -t is the duration to add
> to the -ss value (I would have prefered the absolute end avoiding a
> substract...).

So for now you're determining that value sort of experimentally?

>> I'm also working on such
>> kind of scripts right now, because I want to remux especially HD
>> recordings to MKV. In the case of movies broadcasted by ARD HD or ZDF HD
>> (7...@50hz), they are full of so-called filler-NALUs, which can be
>> removed just by muxing into MKV not directly by ffmpeg, but by mkvmerge,
>> which shrinks a 10GB movie to about 3GB. 
> You mean you extract the various component (audio, video) into separate
> files
> and then reassemble them using mkvmerge?

Yes, I'm demuxing all the 000xy.ts files in all their component streams
with ffmpeg for now first, then multiplex the ones I want with mkvmerge.
I might switch to tsMuxeR, maybe also convert back to cleaned-up TS from
MKV also with tsMuxeR to make the smaller recording again playable by
VDR (I've read in the vdr-portal.de forum some users already
experimented with this).

>> My problem is still A/V sync,
>> all the original TS chunks (I also record into 200MB pieces, because of
>> fast editing in VDR) show video delays for each audio track of over 1
>> second, which is also very noticeable ion the final converted MKV. The
>> delays are reported both by tsMuxeR and mediainfo see for example the
>> "Video delay" value below:
>>   
> Yes I know this is why the "async 2, (+ vsync 2 for récent ffmpeg
> version)" is there. Without them I have the audio and the video out of
> sync just like you.
> 
> ffmpeg -y -i simplified1.ts  -vcodec copy -sameq -acodec copy -vsync 2 -async 
> 2 -f matroska 1.mkv
> 
> I'll post the mediainfo on the ts and mkv when back at home.

By "simplified" you mean the merged ts?

Lucian

___
vdr mailing list
vdr@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr


Re: [vdr] merging correctly several .ts files to a single ts file or better mkv

2010-04-01 Thread Eric Valette

On 04/01/2010 02:24 PM, Lucian Muresan wrote:

On 01.04.2010 13:23, Eric Valette wrote:
So for now you're determining that value sort of experimentally?
   
No. This is not the lag beween audio and video this is the timestamp 
displayed by smplayer when the video really starts (you have 2 min 
before and 10 min after by default with vdr that I want to cut).

Yes, I'm demuxing all the 000xy.ts files in all their component streams
with ffmpeg for now first, then multiplex the ones I want with mkvmerge.
I might switch to tsMuxeR, maybe also convert back to cleaned-up TS from
MKV also with tsMuxeR to make the smaller recording again playable by
VDR (I've read in the vdr-portal.de forum some users already
experimented with this).
   
I'm not a codec format spécialist but do individual codec have their own 
absolute time stamp? so that you can sync them when multiplexing them 
later on? The lag in the TS stream is not constant by any mean at least 
on french HD stream, I keeps getting higher and highger if I do not 
force to sync them (up to a point it crash the player)


By "simplified" you mean the merged ts?
   
No the one where I removed anything not needed (subtitles, foreign 
language, ...). I have 6 stream when I actually only need two.

So I strip down the ts stream first and then remux.

-- eric

___
vdr mailing list
vdr@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr


[vdr] update-xxv: Ask for password only once

2010-04-01 Thread Matthias Wächter

Hi!

I found the three available options for specifying a password in the course of running update-xxv a 
little bit cumbersome, so I want to share the following patch with you.


In addition to the default (no password), -a for being asked for it with _each_ database access 
(wtf) and specifying it on the command line in clear text using -p, I add a new option -A that asks 
for a password only once and supplies it to mysql as if it was given with -p.


This by itself will not raise overall system security as the password is still given to each mysql 
call on the command line (and thus can be seen in the process table), however, it’s better to not 
have it in .bash_history.


– Matthias
--- update-xxv.orig 2010-01-17 21:37:56.0 +0100
+++ update-xxv  2010-04-01 16:05:40.0 +0200
@@ -10,7 +10,8 @@
 #  -d   : XXV database name (default: xxv)
 #  -u   : Username (default: root)
 #  -p   : Password (default: no password)
-#  -a : Ask for password
+#  -a : Ask for password (once every run of mysql)
+#  -A : Ask for password (just once)
 #  -f : Force upgrade, do not check version
 #  -v : Display actual Version
 #  -h : Help
@@ -45,6 +46,8 @@
 echo '-p   : Password (default: no password)'
 echo '-s   : Upgrade sql script (default: upgrade-xxv-db.sql)'
 echo '-a : Ask for password'
+echo '-a : Ask for password (once every run of mysql)'
+echo '-A : Ask for password (just once)'
 echo '-f : Force upgrade, do not check version'
 echo '-v : Display actual version'
 echo '-h : Help'
@@ -251,6 +254,9 @@
-a)
 askPassword='true'
;;
+   -A)
+   read -s -p 'Enter Password (hidden): ' password
+   ;;
 -f)
 isForceUpdate='true'
 ;;
___
vdr mailing list
vdr@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr


Re: [vdr] update-xxv: [PATCH] Ask for password only once

2010-04-01 Thread Matthias Wächter

On 01.04.2010 16:09, Matthias Wächter wrote:

I found the three available options for specifying a password in the course of 
running update-xxv a
little bit cumbersome, so I want to share the following patch with you.

In addition to the default (no password), -a for being asked for it with _each_ 
database access
(wtf) and specifying it on the command line in clear text using -p, I add a new 
option -A that asks
for a password only once and supplies it to mysql as if it was given with -p.

This by itself will not raise overall system security as the password is still 
given to each mysql
call on the command line (and thus can be seen in the process table), however, 
it’s better to not
have it in .bash_history.


Sorry, incomplete patch. Here is the right one (doesn’t give -a twice on the 
help screen).

– Matthias
--- update-xxv.orig 2010-01-17 21:37:56.0 +0100
+++ update-xxv  2010-04-01 16:11:54.0 +0200
@@ -10,7 +10,8 @@
 #  -d   : XXV database name (default: xxv)
 #  -u   : Username (default: root)
 #  -p   : Password (default: no password)
-#  -a : Ask for password
+#  -a : Ask for password (once every run of mysql)
+#  -A : Ask for password (just once)
 #  -f : Force upgrade, do not check version
 #  -v : Display actual Version
 #  -h : Help
@@ -44,7 +45,8 @@
 echo '-u   : Username (default: root)'
 echo '-p   : Password (default: no password)'
 echo '-s   : Upgrade sql script (default: upgrade-xxv-db.sql)'
-echo '-a : Ask for password'
+echo '-a : Ask for password (once every run of mysql)'
+echo '-A : Ask for password (just once)'
 echo '-f : Force upgrade, do not check version'
 echo '-v : Display actual version'
 echo '-h : Help'
@@ -251,6 +253,9 @@
-a)
 askPassword='true'
;;
+   -A)
+   read -s -p 'Enter Password (hidden): ' password
+   ;;
 -f)
 isForceUpdate='true'
 ;;
___
vdr mailing list
vdr@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr


Re: [vdr] update-xxv: [PATCH] Ask for password only once

2010-04-01 Thread Andreas Brachold
Hello,

Am Donnerstag, den 01.04.2010, 16:14 +0200 schrieb Matthias Wächter:
> I found the three available options for specifying a password in the 
> course of running update-xxv a little bit cumbersome, so I want to 
> share the following patch with you.

Thanks, for your patch. I apply this to our repository (revision 1471)

Andreas


___
vdr mailing list
vdr@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr