1

We have a system that supports streaming video, but we support multiple players. I have multiple systems that I COULD use for this. Currently, I've been using the media server that we use to stream the video, which has ffmpeg on it (running Red Hat 4). On that system, I've used:

 ffmpeg -i INPUT_FILE.mp4 -c:v libx264 -crf 23 -maxrate 3000k -bufsize 30000k -c:a aac -strict experimental -b:a 192k -filter:v "scale=iw*min($width/iw\,$height/ih):ih*min($width/iw\,$height/ih), pad=$width:$height:($width-iw*min($width/iw\,$height/ih))/2:($height-ih*min($width/iw\,$height/ih))/2" -f OUTPUT_FILE.mp4

And I thought that it worked well. On one file I used to test, it seemed to display properly on both player types. On a different file, it did not appear properly. The input files are also in varying formats (mostly mp4, with a few m4g files) and different aspect ratios.

We also have many desktop/laptop machines that are running Ubuntu 13.04 (comes with avconv) that I'd like to be able to use to format video as well. If I can get at least one of these systems to properly format video, that would be great, but ideally I'd like to figure out how to do this with both avconv AND ffmpeg so I can use any system.

The problem that we're trying to solve is that one player is an Android DMP device, which will play a video of varying sizes properly by adding black bars at the sides or top/bottom as needed to keep the video sized properly. The other player is a Samsung Smart TV, which is SO Smart that it can reformat videos to fit the screen. Which sucks horribly, because if they're not sized to exactly the right format, it will stretch them one direction or another to make them be sized right. The resulting video show's people that appear to be 8 feet tall weighing 130 pounds, or 4 feet tall and 3 feet wide.

How to fix it?

migrated from stackoverflow.com Nov 5 '13 at 18:42

This question came from our site for professional and enthusiast programmers.

  • That looks like it very well may be the reference material I used. It was several weeks back when I was trying to find a solution for this, then we got caught up with a bunch of work for an upcoming release. That's behind us now, and I'm trying to get caught up with where I was, what I was doing, and what answers I might be able to find. – mikecole79 Oct 29 '13 at 20:52
  • Can you not simply disable the stretching feature in the Samsung device? – llogan Oct 30 '13 at 19:10
  • I wish. It's a smart TV, and going through both the regular menu and the hospitality menu of the monster to try to find a setting, any setting, that might disable this 'feature' has proven to be a futile task. – mikecole79 Oct 30 '13 at 21:51
  • I'm still looking for the answer to this. If anyone stumbles across it, I'd be very happy to hear from you. If you're an avconv/ffmpeg wizard, you're the person I'm hoping to hear from. Any help I can get is appreciated, even if it's not the right answer. It might lead me to the right answer. – mikecole79 Nov 14 '13 at 19:53
  • 1
    Please include the complete console output. – llogan Nov 18 '13 at 18:31
0

I also have a Samsung Smart TV. The way to adjust video format on my tv is to hit the 'TOOLS' button on the remote once the video is playing. You then have several options to scale the video in the Picture Size option. I hope this helps.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.