0

I used the Android SDK to record some steps for a tutorial video and am having some difficulty working with the footage. First of all, it's of a variable framerate and secondly it's in 1080:1920 - vertical 1080p.

I had hoped to use ffmpeg to transcode to DNxHD but I can't find the right video filter (scale? hflip?) to squeeze it into a resolution that DNxHD supports while retaining the aspect ratio.

I've tried:

ffmpeg -i "recording6.mp4" -vf "scale=-1:1080" -vcodec dnxhd -r 60 -b:v 36M "recording6_DNxHD.mov"

ffmpeg -i "recording6.mp4" -vf "scale=1920:1080" -vcodec dnxhd -r 60 -b:v 36M "recording6_DNxHD.mov"

ffmpeg -i "recording6.mp4" -vf hflip -vcodec dnxhd -r 60 -b:v 36M "recording6_DNxHD.mov"

ffmpeg -i "recording6.mp4" -vf vflip -vcodec dnxhd -r 60 -b:v 36M "recording6_DNxHD.mov"

The first fails because of an unsupported resolution, the second works but changes the aspect ratio, and the third and fourth also fail due to unsupported resolutions.

I realize there are other codecs which are more forgiving than dnxhd in terms of resolution, but I really don't want to lose any detail at this step. So if anyone knows of one which is similarly visually-lossless I'm open to trying it.

Any help you can offer would be much appreciated.

1 Answer 1

1

Assuming your editor can rotate videos, use

ffmpeg -i "recording6.mp4" -vf "transpose=1" -vcodec dnxhd -r 60 -b:v 36M "recording6.mov"

This will rotate the video, so the 1080x1920 video becomes 1920x1080.

5
  • Hey thanks for your suggestion. Ffmpeg was quite happy to do that conversion, but both Premiere and After Effects (CC with all updates installed) failed to import the newly created file. They both work with other DNxHD files in a quicktime container, so it's probably not a codec issue
    – setagana
    Commented May 3, 2016 at 8:59
  • What does ffprobe say for the created file?
    – Gyan
    Commented May 3, 2016 at 10:02
  • Not used ffprobe before, so hopefully this is the output you need: Metadata: major_brand: qt minor_version: 512 compatible_brands: qt encoder: Lavf57.34.103 Duration: 00:00:25.48, start: 0.000000, bitrate: 90437 kb/s Stream #0:0(eng): Video: dnxhd (AVdn / 0x6E645641), yuv422p(tv, bt709/unkown/unknown), 1920x1080, 90439 kb/s, 60 fps, 60tbr, 15360 tbp (default) Metadata: handler_name: DataHandler encoder : Lavc57.38.100 dnxhd
    – setagana
    Commented May 3, 2016 at 10:46
  • I just ran my command on a rotated MP4 I had, and the MOV opened fine in Premiere CC 2015.2 - 9.2.0 (41) and AE CC 2015.2 13.7.0 124 - does your converted file play ok in VLC or QT?
    – Gyan
    Commented May 3, 2016 at 11:53
  • I am an idiot, I was trying to import one of the failed files from Friday in Premiere. The new file created with the transpose filter works perfectly!
    – setagana
    Commented May 3, 2016 at 12:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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