Thu Jan 03, 2013 7:53 pm by tombert
With DAR=16:9 setting:ffmpeg line:
- Code:
ffmpeg -threads auto -i /../mnt/raid5/media/Videos/test.avi -y -copyts -c:v mpeg2video -b:v 17000k -maxrate:v 17000k -bufsize:v 17000k -vf pad=854:480:107:0:black,setdar=4:3 -r 25 -g 15 -c:a ac3 -b:a 192k -ac 2 -map 0:0 -map 0:1 -sn -f mpegts /tmp/Serviio/transcoding-temp-1651-sony2010-ORIGINAL.stf
transcoded file:
- Code:
Input #0, mpegts, from '/tmp/Serviio/transcoding-temp-1651-sony2010-ORIGINAL.stf':
Duration: 00:02:30.04, start: 1.400000, bitrate: 4144 kb/s
Program 1
Metadata:
service_name : Service01
service_provider: FFmpeg
Stream #0:0[0x100]: Video: mpeg2video (Main) ([2][0][0][0] / 0x0002), yuv420p, 854x480 [SAR 320:427 DAR 4:3], 17000 kb/s, 25 fps, 25 tbr, 90k tbn, 50 tbc
Stream #0:1[0x101]: Audio: ac3 ([129][0][0][0] / 0x0081), 48000 Hz, stereo, s16, 192 kb/s
Without DAR:ffmpeg line:
- Code:
ffmpeg -threads auto -i /../mnt/raid5/media/Videos/test.avi -y -copyts -c:v mpeg2video -b:v 17000k -maxrate:v 17000k -bufsize:v 17000k -r 25 -g 15 -c:a ac3 -b:a 192k -ac 2 -map 0:0 -map 0:1 -sn -f mpegts /tmp/Serviio/transcoding-temp-1651-sony2010-ORIGINAL.stf
transcoded file:
- Code:
Input #0, mpegts, from '/tmp/Serviio/transcoding-temp-1651-sony2010-ORIGINAL.stf':
Duration: 00:12:57.20, start: 1.400000, bitrate: 3786 kb/s
Program 1
Metadata:
service_name : Service01
service_provider: FFmpeg
Stream #0:0[0x100]: Video: mpeg2video (Main) ([2][0][0][0] / 0x0002), yuv420p, 640x480 [SAR 1:1 DAR 4:3], 17000 kb/s, 25 fps, 25 tbr, 90k tbn, 50 tbc
Stream #0:1[0x101]: Audio: ac3 ([129][0][0][0] / 0x0081), 48000 Hz, stereo, s16, 192 kb/s
So in real it changes the SAR value, not the DAR ... (is this intended?)
-----------------------------------------------
I got another video with the following parameters:
- Code:
Stream #0:0[0x100]: Video: mpeg2video (Main) ([2][0][0][0] / 0x0002), yuv420p, 1920x1072 [SAR 1:1 DAR 120:67]
Which gets transcoded to (DAR=16:9):
- Code:
... -vf pad=1920:1080:0:4:black,setdar=4:3 -r 30000/1001 -g 15 ...
- Code:
Stream #0:0[0x100]: Video: mpeg2video (Main) ([2][0][0][0] / 0x0002), yuv420p, 1920x1080 [SAR 3:4 DAR 4:3]
The transcoded video gets displayed correctly on my TV.
Another source:
- Code:
Stream #0:1[0x101]: Video: mpeg2video (Main) ([2][0][0][0] / 0x0002), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9]
The transcoded file has the same SAR/DAR values.
The file gets horizontally stretched on my TV (bars on top and bottom).
------------------------------------------------
It looks to me that DAR is doing what I was looking for, only that it does not do it for already 16:9 files ...
Any ideas?
thx