Page 1 of 1

getting anamorph 720x576 avi video to display at 16:9?

PostPosted: Wed Apr 13, 2011 11:32 am
by n3mmr
I have a video that ffmpeg thinks as follows of:

FFmpeg version UNKNOWN, Copyright (c) 2000-2011 the FFmpeg developers
built on Feb 22 2011 07:45:57 with gcc 4.3.3
configuration:
libavutil 50.36. 0 / 50.36. 0
libavcore 0.16. 0 / 0.16. 0
libavcodec 52.108. 0 / 52.108. 0
libavformat 52.92. 0 / 52.92. 0
libavdevice 52. 2. 3 / 52. 2. 3
libavfilter 1.72. 0 / 1.72. 0
libswscale 0.12. 0 / 0.12. 0
Input #0, avi, from 'Black and Blue.avi':
Duration: 01:38:23.60, start: 0.000000, bitrate: 1172 kb/s
Stream #0.0: Video: mpeg4, yuv420p, 720x576 [PAR 1:1 DAR 5:4], 25 tbr, 25 tbn, 25 tbc
Stream #0.1: Audio: mp3, 48000 Hz, 2 channels, s16, 160 kb/s


It should ideally display at 1024x576 (or scaled to 1280x720) with no cropping, just stretching.

I have tried multiple tools in multiple ways, but nothing seems to work.

So, how should one invoke, say ffmpeg, to produce a video file that after being sent by serviio to a Sony BDP-S370 will be displayed at the proper display aspect ratio with no pixel loss or cropping?

Re: getting anamorph 720x576 avi video to display at 16:9?

PostPosted: Wed Apr 13, 2011 11:45 am
by Illico
I made ​​this suggestion to Zip: https://bitbucket.org/xnejp03/serviio/i ... n-renderer
Using FFmpeg option:
`-s size' : Set frame size. The format is `wxh' (ffserver default = 160x128, ffmpeg default = same as source).
`-aspect aspect' :Set aspect ratio (4:3, 16:9 or 1.3333, 1.7777).

Re: getting anamorph 720x576 avi video to display at 16:9?

PostPosted: Wed Apr 13, 2011 12:18 pm
by n3mmr
Illico wrote:I made ​​this suggestion to Zip: https://bitbucket.org/xnejp03/serviio/i ... n-renderer
Using FFmpeg option:
`-s size' : Set frame size. The format is `wxh' (ffserver default = 160x128, ffmpeg default = same as source).
`-aspect aspect' :Set aspect ratio (4:3, 16:9 or 1.3333, 1.7777).



I tried

ffmpeg -i BandB.avi -sameq -aspect 16:9 -s 1024x576 -f avi bandb2.avi

But that file wouldn't play on the Sony from serviio, the BD player claimed the file format was unsupported.

It would play properly in vlc

trying -s 1280x720 instead (the rest the same) simply played back at 5:4, and the resulting file seems not to have heeded the aspect command.

Re: getting anamorph 720x576 avi video to display at 16:9?

PostPosted: Wed Apr 13, 2011 12:20 pm
by n3mmr
n3mmr wrote:
Illico wrote:I made ​​this suggestion to Zip: https://bitbucket.org/xnejp03/serviio/i ... n-renderer
Using FFmpeg option:
`-s size' : Set frame size. The format is `wxh' (ffserver default = 160x128, ffmpeg default = same as source).
`-aspect aspect' :Set aspect ratio (4:3, 16:9 or 1.3333, 1.7777).



I tried

ffmpeg -i BandB.avi -sameq -aspect 16:9 -s 1024x576 -f avi bandb2.avi

But that file wouldn't play on the Sony from serviio, the BD player claimed the file format was unsupported.

It would play properly in vlc

trying -s 1280x720 instead (the rest the same) simply played back at 5:4, and the resulting file seems not to have heeded the aspect command.


Basically the problerm is probably too many ways to do it and too many knobs to twiddle.

Re: getting anamorph 720x576 avi video to display at 16:9?

PostPosted: Thu Apr 14, 2011 2:24 pm
by n3mmr
I actually got it running OK.
A matter of not understanding ffmpeg well enough, probably.

ffmpeg -i Black\ and\ Blue.avi -sameq -s 720x576 -aspect 16:9 -acodec copy -scodec copy -f mp4 Black\ and\ Blue2.mp4

did the trick. -sameq -s 720x576 makes the output bits identical to the originals, but allows the stream to be modified by the -aspect option,. -vcodec copy, which I tried before, silently prevents the DAR flag from written to the stream
It seems.
I think.
I believe.

But, I may be wrong, and I am not terribly fond of ffmpeg. Confusing p o s for a UI, methinks. But also an indispensible tool.

Re: getting anamorph 720x576 avi video to display at 16:9?

PostPosted: Thu Apr 14, 2011 3:25 pm
by Illico
I try to understand:

Your original movie 'Black and Blue.avi' did not display with correct aspect ratio, right?
Input #0, avi, from 'Black and Blue.avi':
Duration: 01:38:23.60, start: 0.000000, bitrate: 1172 kb/s
Stream #0.0: Video: mpeg4, yuv420p, 720x576 [PAR 1:1 DAR 5:4], 25 tbr, 25 tbn, 25 tbc
Stream #0.1: Audio: mp3, 48000 Hz, 2 channels, s16, 160 kb/s


You create another copy "Black and Blue2.mp4" with this command line:
ffmpeg -i "Black and Blue.avi" -sameq -s 720x576 -acodec copy -scodec copy -f mp4 "Black and Blue2.mp4"
and you said that this video displayed with correct aspect ratio, right?
Could you provide "ffmpeg -i" of this copy?

Then, did serviio provide these two files in native format to the S370?

Re: getting anamorph 720x576 avi video to display at 16:9?

PostPosted: Thu Apr 14, 2011 3:34 pm
by zip
If you don't provide -vcodec copy then it'll transcode the file, not just remux. is that what you're after?

Re: getting anamorph 720x576 avi video to display at 16:9?

PostPosted: Fri Apr 15, 2011 7:32 am
by n3mmr
I see what you're writing, guys, and I will get back with ffmpeg analysis data, but yesterday I had a major computer problem after doing all the conversions, so I've had to revert to an earlier boot environment, and that didn't contain the proper ffmpeg image.

So I must recompile that and many other things.

(Boot environments is a Solaris thing, neat and fast, but occasionally inviting sloppy behavior.)

Basically:

ffmpeg -i original-5:4-DAR-viedo-avi -aspect 16:9 -vcodec copy ..... outfile.mp4

just produced a recontainered copy of the video file with the old aspect unchanged. Moving the "-aspect 16:9" option around made no difference.

-sameq -s 720x576 -aspect 16:9 .... left me with a file with the new, changed aspect. This was presented properly as 16:9

serviio served all files as mpeg: I'm using the default serviio EU BD370 transcoding settings.

Looking at my video files, I find a myriad of different DARs and image sizes: I know 720x576 DAR=16:9 is the standard way wide screen DVD video is stored in the DVD. But 512x336 [PAR 1:1 DAR 32:21]????? What on earth could that be intended for?

Is there some kind of info for the different ways other media stores its video files?

1280x720 seems to be what DVB-T2 HD transmits as.

I'd really like to find a database of all the different HorizontalxVertical, PAR, DAR combinations one should expect to find!

Re: getting anamorph 720x576 avi video to display at 16:9?

PostPosted: Fri Apr 15, 2011 9:40 am
by Illico
n3mmr wrote:I'd really like to find a database of all the different HorizontalxVertical, PAR, DAR combinations one should expect to find!

Read that, sorry is in french...
http://fr.wikipedia.org/w/index.php?tit ... _actuelles

Re: getting anamorph 720x576 avi video to display at 16:9?

PostPosted: Fri Apr 15, 2011 9:45 am
by Illico

Re: getting anamorph 720x576 avi video to display at 16:9?

PostPosted: Sun Apr 17, 2011 7:48 am
by n3mmr
Thanks.

I have no problem reading technical french, so it's all right

(My active french is rapidly deteriorating... )