Recherche avancée

Médias (0)

Mot : - Tags -/auteurs

Aucun média correspondant à vos critères n’est disponible sur le site.

Autres articles (65)

Sur d’autres sites (12251)

  • FFMPEG and libx264, WMP and QT playback at different res/aspect than specified

    10 septembre 2013, par Foltz

    So, for a little context. I'm trying to convert a JPEG2000 in .mxf video to an h264 in .mp4, maintaining its resolution/frame-size/aspect ratio. I'll say up front I'm not 100% sure on how all these ratios tie together.

    So, my input file is 720x486. I have a sample h264 file with specs I'm trying to emulate (from an OpenCube video ingest machine) with ffmpeg. The OpenCube file plays back at 720x486 in both Quick Time 7 and Windows Media Player 12. It reports a PAR of 9:10 and DAR of 4:3 (Using VideoSpec to see these values).

    When I make my derivative h264 using ffmpeg I can run the command :

    ffmpeg -i lac-test.mxf -vcodec libx264 -s 720x486 -aspect 4:3 -b:v 2500000 -pix_fmt yuv420p -coder 0 -acodec libfaac -b:a 256000 lac-test.mp4

    The output file reports the correct values in VideoSpec (720x486, DAR 4:3, PAR 9:10), but plays back in QT at 648x486. Weirder, the video plays back at the proper resolution (that is, same size as the sample OpenCube file).

    Now, an alternative command creates yet another predicament :

    ffmpeg -i lac-test.mxf -vcodec libx264 -s 720x486 -b:v 2500000 -pix_fmt yuv420p -coder 0 -acodec libfaac -b:a 256000 lac-test.mp4

    So omitting the aspect ratio gives me an output file that plays at 720x486 in QT7 (good !) but reports a DAR of 1.481 and an Undefine PAR. Unfortunately, THIS file plays back slightly too wide in WMP12.

    I've tried a slew of different strings to try and get something that plays back correctly. I've tried using various filters with the -fv flag such as :

    ffmpeg -i lac-test.mxf -vcodec libx264 -vf "scale=720x486,setsar=9:10,setdar=4:3" -b:v 2500000 -pix_fmt yuv420p -coder 0 -acodec libfaac -b:a 256000 lac-test.mp4

    This results in a video that shows all the correct specs in VideoSpec, and plays back correctly in WMP12 (same size as OpenCube file), but still plays back at 648x486 in QT7.

    What gives ?

  • Révision 19767 : Suite a r19759 $title peut valoir false : le remplacer par une chaine vide avant...

    27 juillet 2012, par cedric -
  • Révision 22398 : Tester la valeur du needle pour qu’il ne soit pas vide dans strpos, sinon SPIP hu...

    29 août 2015, par gilles.vincent@gmail.com