#5198 closed defect (invalid)
FFmpeg flips rawvideo vertically with -vcodec copy
Reported by: | JasonC | Owned by: | |
---|---|---|---|
Priority: | normal | Component: | undetermined |
Version: | unspecified | Keywords: | |
Cc: | Blocked By: | ||
Blocking: | Reproduced by developer: | no | |
Analyzed by developer: | no |
Description
Log file attached.
When attempting to trim a video (rawvideo, avi) to a certain length of time using -vcodec copy, the output video is vertically flipped (verified with mplayer, VLC, Windows Media Player, and the Quicktime player):
ffmpeg -i input.avi -t 120 -vcodec copy -f avi output.avi
A workaround is to use -vcodec rawvideo instead of copy to re-encode the video. Doing this, the output is not flipped:
ffmpeg -i input.avi -t 120 -vcodec rawvideo -f avi output.avi
Note that running the flipped video through one more time with -vcodec copy does not continue flipping it, the video remains upside down (I make this comment because I read https://ffmpeg.org/pipermail/ffmpeg-devel/2007-July/029690.html):
ffmpeg -i input.avi -t 120 -vcodec copy -f avi output.avi ffmpeg -i output.avi -vcodec copy -f avi output-still-flipped.avi
Attachments (2)
Change History (16)
by , 9 years ago
Attachment: | ffmpeg-20160126-214715.log added |
---|
comment:1 by , 9 years ago
Component: | undetermined → ffmpeg |
---|
comment:3 by , 9 years ago
Component: | ffmpeg → undetermined |
---|
comment:4 by , 9 years ago
Replying to cehoyos:
Please provide cuatro.avi - how was it created?
It was created through the Windows' VFW API. I cannot provide that video, but will prepare another short sample as soon as I can, which may be a day or two.
by , 9 years ago
Attachment: | testvideos.zip added |
---|
Contains an example input video, and example output videos after both -vcodec copy (problem) and -vcodec rawvideo (workaround).
comment:5 by , 9 years ago
Replying to cehoyos:
Please provide cuatro.avi - how was it created?
I had some time. I've added an attachment:
test.avi - A test input video.
test-vcodec-copy.avi - Result of "-i test.avi -vcodec copy"; this video is flipped.
test-vcodec-rawvideo.avi - Result of "-i test.avi -vcodec rawvideo"; this is the workaround.
comment:6 by , 9 years ago
In a hex editor, the output of "-vcodec copy" contains the string "BottomUp" (no question mark; trac is making that a wiki link and I don't know how to stop it) in the header, while neither the original video nor the output of "-vcodec rawvideo" contain this string.
follow-up: 8 comment:7 by , 9 years ago
Resolution: | → invalid |
---|---|
Status: | new → closed |
ffmpeg version N-60106-ge6d1c66 Copyright (c) 2000-2014 the FFmpeg developers
Please test current FFmpeg git head before reporting issues here.
follow-up: 9 comment:8 by , 9 years ago
Replying to cehoyos:
ffmpeg version N-60106-ge6d1c66 Copyright (c) 2000-2014 the FFmpeg developersPlease test current FFmpeg git head before reporting issues here.
Are you saying that the issue has been resolved in the current version?
Why did you ask me to go to the trouble of generating test videos in the first place?
follow-up: 10 comment:9 by , 9 years ago
Replying to JasonC:
Why did you ask me to go to the trouble of generating test videos in the first place?
Several reasons: I couldn't guess that you chose to ignore the first paragraph of https://ffmpeg.org/bugreports.html and since you reported the bug including a command line I was under the impression that uploading the sample would be no effort.
In any case I reserve the right to not see every bug in a bug report immediately, I only reported the (at the time) most obvious one.
follow-up: 11 comment:10 by , 9 years ago
Replying to cehoyos:
Replying to JasonC:
Why did you ask me to go to the trouble of generating test videos in the first place?
Several reasons: I couldn't guess that you chose to ignore the first paragraph of https://ffmpeg.org/bugreports.html and since you reported the bug including a command line I was under the impression that uploading the sample would be no effort.
I did choose to ignore it, but only because I don't know how to do what you request. I don't know how to build the latest head revision on Windows, sorry.
follow-up: 12 comment:11 by , 9 years ago
Replying to JasonC:
I don't know how to build the latest head revision on Windows, sorry.
Getting a build from Zeranoe will generally suffice:
http://ffmpeg.zeranoe.com/builds/
comment:12 by , 9 years ago
Replying to llogan:
Replying to JasonC:
I don't know how to build the latest head revision on Windows, sorry.
Getting a build from Zeranoe will generally suffice:
http://ffmpeg.zeranoe.com/builds/
Oh great!
I've downloaded the latest build from there:
ffmpeg version N-78067-g9079e99 Copyright (c) 2000-2016 the FFmpeg developers built with gcc 5.2.0 (GCC) configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --en able-libdcadec --enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3 lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --enab le-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enabl e-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable- libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzimg --enable-lzma --enable-decklink --enable-zli b libavutil 55. 15.100 / 55. 15.100 libavcodec 57. 22.102 / 57. 22.102 libavformat 57. 23.100 / 57. 23.100 libavdevice 57. 0.100 / 57. 0.100 libavfilter 6. 27.100 / 6. 27.100 libswscale 4. 0.100 / 4. 0.100 libswresample 2. 0.101 / 2. 0.101 libpostproc 54. 0.100 / 54. 0.100
And tested it with my test videos and the problem is indeed resolved in this version. Everything is working properly now.
Thanks!!
comment:13 by , 9 years ago
Resolution: | invalid → fixed |
---|
comment:14 by , 9 years ago
Resolution: | fixed → invalid |
---|
Output of -report