Weiwu Zhang wrote:
Original video that I want to fix:
Stream #0:2(und): Video: mpeg4 (mp4v / 0x7634706D), yuv420p, 640x496
[SAR 1:1 DAR 40:31], 1708 kb/s, 25 fps, 25 tbr, 12800 tbn, 30k tbc
What was wrong: DAR should be 4:3, not 40:31.
With various attempts I can only get results like this:
Stream #0:2(und): Video: mpeg4 (mp4v / 0x7634706D), yuv420p, 640x496
[SAR 1:1 DAR 40:31], 1708 kb/s, SAR 4:3 DAR 160:93, 25 fps, 25 tbr,
12800 tbn, 30k tbc
Notice that I can only manipulate the SAR/DAR outside of the brackets,
what's inside the brackets remain the same.
Comare this (original):
[SAR 1:1 DAR 40:31]
With this (touched by avconv):
[SAR 1:1 DAR 40:31] SAR 4:3 DAR 160:93
It seems the parameters in brackets are immutable, why is that?
Thanks a lot!
I've asked many question related to correctly setting SAR + DAR on the ffmpeg
list.
No good answers, so what I do now if forcibly clear it... or better
said remove it from the container, so the video playback code discovers
the true numbers from the actual video stream.
I'm building latest ffmpeg from git every few hours, so you'll have
to determine if this will work with avconv at all + if it will, the
correct command line incantation you require.
I'm guessing you may be having other subtle playback problem (as I was),
so I also force colormatrix values, which are munged (incorrect) in many
video streams... Here's how I do both...
ffmpeg -i in [AAC acodec cruft + H264 vcodec cruft] \
-vf setdar=dar=0,setsar=sar=0 \
-x264opts
colorprim=bt709:transfer=bt709:colormatrix=bt709:fullrange=off
This obscure set of options allows playback on every TIVO + Roku devices
I've tried, along with other settop devices.
Keep in mind for these options to "fire" (take effect), requires a transcode.
Using -c:v copy will cause all transcoding options to be silently ignored.
Do mention if these options resolve your problem. I'd be interesting in hearing.
- David
_______________________________________________
libav-tools mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-tools