zzuser
5th November 2006, 13:41
Hi all!
I've been recording some free to air DVB-T TS streams to disk in order to transcode them to Xvid and/or x264. I am however having a hard time preserving aspect ratio on the streams.
Typically the aspect ratio in a given stream will change from 4:3 (commercials) to 16:9 (TV content) mutiple times. The problem is that the whole output clip will be transcoded at whatever aspect ratio was found first. Thus I usually end up with 4:3 output files, as most programs start with commercials, regardless of the fact that most of the content should be at 16:9.
I've tried different tricks with mencoder in order to maintain proper aspect ratio to no avail. The manual has a chapter, 13.10. Preserving aspect ratio, with autoaspect modifiers, but this does not seem to help either.
"13.10. Preserving aspect ratio
mencoder sample-svcd.mpg -ovc lavc -lavcopts vcodec=mpeg4:mbd=2:trell:autoaspect -vf crop=714:548:0:14 -oac copy -o output.avi"
http://www.mplayerhq.hu/DOCS/HTML/en/aspect.html
I've tried different versions of mencoder on different platforms, but the problem persists. I've even tried the newest subversion SVN r20607, but this only fixes the bug with resolution changes in TS streams, not the aspect ratio problem.
I suppose I could split the TS stream into separate parts with different aspect ratios, encode them separately and merge the result. This does however require a new set of tools as well as player support for the resulting output file.
The other option if mencoder can't deal with aspect ratio changes is to force a certain aspect ratio for the whole file. This would mangle the aspect ratio of the commercials, but that I can live with. Anybody know of a way to read the aspect ratio data from a TS stream with a Linux CLI tool? I suppose I could sum up the occurences of different aspect rations and force the most prevalent.
Or is the problem simply that I'm using the wrong tool (mencoder) for the job?
I've put up a small sample clip (1.2Mb, 2 sec.) that demonstrates a typical aspect ratio change in a TS stream if somebody wants to have a go at encoding.
http://zzuser.tripod.com/aspect.ts
I need to be able to play back the resultant file with VLC, which I use for the original TS streams.
- Zed
I've been recording some free to air DVB-T TS streams to disk in order to transcode them to Xvid and/or x264. I am however having a hard time preserving aspect ratio on the streams.
Typically the aspect ratio in a given stream will change from 4:3 (commercials) to 16:9 (TV content) mutiple times. The problem is that the whole output clip will be transcoded at whatever aspect ratio was found first. Thus I usually end up with 4:3 output files, as most programs start with commercials, regardless of the fact that most of the content should be at 16:9.
I've tried different tricks with mencoder in order to maintain proper aspect ratio to no avail. The manual has a chapter, 13.10. Preserving aspect ratio, with autoaspect modifiers, but this does not seem to help either.
"13.10. Preserving aspect ratio
mencoder sample-svcd.mpg -ovc lavc -lavcopts vcodec=mpeg4:mbd=2:trell:autoaspect -vf crop=714:548:0:14 -oac copy -o output.avi"
http://www.mplayerhq.hu/DOCS/HTML/en/aspect.html
I've tried different versions of mencoder on different platforms, but the problem persists. I've even tried the newest subversion SVN r20607, but this only fixes the bug with resolution changes in TS streams, not the aspect ratio problem.
I suppose I could split the TS stream into separate parts with different aspect ratios, encode them separately and merge the result. This does however require a new set of tools as well as player support for the resulting output file.
The other option if mencoder can't deal with aspect ratio changes is to force a certain aspect ratio for the whole file. This would mangle the aspect ratio of the commercials, but that I can live with. Anybody know of a way to read the aspect ratio data from a TS stream with a Linux CLI tool? I suppose I could sum up the occurences of different aspect rations and force the most prevalent.
Or is the problem simply that I'm using the wrong tool (mencoder) for the job?
I've put up a small sample clip (1.2Mb, 2 sec.) that demonstrates a typical aspect ratio change in a TS stream if somebody wants to have a go at encoding.
http://zzuser.tripod.com/aspect.ts
I need to be able to play back the resultant file with VLC, which I use for the original TS streams.
- Zed