Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#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)

ffmpeg-20160126-214715.log (5.5 KB ) - added by JasonC 9 years ago.
Output of -report
testvideos.zip (63.0 KB ) - added by JasonC 9 years ago.
Contains an example input video, and example output videos after both -vcodec copy (problem) and -vcodec rawvideo (workaround).

Download all attachments as: .zip

Change History (16)

by JasonC, 9 years ago

Attachment: ffmpeg-20160126-214715.log added

Output of -report

comment:1 by JasonC, 9 years ago

Component: undeterminedffmpeg

comment:2 by Carl Eugen Hoyos, 9 years ago

Please provide cuatro.avi - how was it created?

comment:3 by Carl Eugen Hoyos, 9 years ago

Component: ffmpegundetermined

in reply to:  2 comment:4 by JasonC, 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 JasonC, 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).

in reply to:  2 comment:5 by JasonC, 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 JasonC, 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.

Last edited 9 years ago by JasonC (previous) (diff)

comment:7 by Carl Eugen Hoyos, 9 years ago

Resolution: invalid
Status: newclosed
ffmpeg version N-60106-ge6d1c66 Copyright (c) 2000-2014 the FFmpeg developers

Please test current FFmpeg git head before reporting issues here.

in reply to:  7 ; comment:8 by JasonC, 9 years ago

Replying to cehoyos:

ffmpeg version N-60106-ge6d1c66 Copyright (c) 2000-2014 the FFmpeg developers

Please test current FFmpeg git head before reporting issues here.

Are you saying that the issue has been resolved in the current version?

Or are you saying that I somehow need to set up my own complete development environment and build the latest version, on windows, to prove that this is an issue despite having all of the test files and steps to reproduce attached for somebody who already has all this set up to run a quick test on to verify?

Why did you ask me to go to the trouble of generating test videos in the first place?

Version 0, edited 9 years ago by JasonC (next)

in reply to:  8 ; comment:9 by Carl Eugen Hoyos, 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.

in reply to:  9 ; comment:10 by JasonC, 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. I'm not even sure where the version I have right now came from.

I reserve the right to not know how to do everything and to sometimes file a less-than-ideal bug report.

Last edited 9 years ago by JasonC (previous) (diff)

in reply to:  10 ; comment:11 by llogan, 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/

in reply to:  11 comment:12 by JasonC, 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 JasonC, 9 years ago

Resolution: invalidfixed

comment:14 by Carl Eugen Hoyos, 9 years ago

Resolution: fixedinvalid
Note: See TracTickets for help on using tickets.