Unix & Linux Stack Exchange
Q&A for users of Linux, FreeBSD and other Unix-like operating systems
Latest Questions
36
votes
7
answers
35710
views
How to get near-perfect screen recording quality?
Someone suggested I direct a copy of the unmodified X display to a file and afterwards convert that file to a general purpose video file. What commands would I use to do this on a Kubuntu system? (Edit: He said something about attaching a display port to a file.) If not possible, what is my best opt...
Someone suggested I direct a copy of the unmodified X display to a file and afterwards convert that file to a general purpose video file. What commands would I use to do this on a Kubuntu system? (Edit: He said something about attaching a display port to a file.) If not possible, what is my best option for an excellent quality screen recording that does not depend on fast hardware?
*Background:* I tried using avconv with -f x11grab and some GUI programs. However, no matter what I try, the resulting video either has artifacts/ blurriness or is choppy (missing frames). This is probably due to CPU/ memory constraints.
*Goals:*
- Video quality must not be noticeably different from seeing the session directly on a screen, because the purpose is to demonstrate an animated application.
- The final video must be in a common format that can be sent to Windows users and used on the web. I think H.264 MP4 should work.
- The solution should not presume much prior knowledge. I am familiar with the command line and basic Linux commands, but I am still learning Linux and do not know much about video codecs.
*What I already tried:*
- Best command so far:
ffmpeg -f x11grab -s xga -r 30 -i :0.0 -qscale 0.1 -vcodec huffyuv grab.avi
, then convert to mp4 with ffmpeg -i grab.avi -sameq -vcodec mpeg4 grab.mp4
.
- The picture quality is great, but on my test sytem it lags the computer. On a faster target system it does not lag, but frames are obviously skipped, making the video not very *smooth*.
- I am still trying to figure out how to save the grab.avi file to SHM to see if that helps.
- Using Istanbul and RecordMyDesktop GUI recorders
- Simple command: avconv -f x11grab -s xga -r 25 -i :0.0 simple.mpg
using avconv version 0.8.3-4:0.8.3-0ubuntu0.12.04.1
- Adding -codec:copy
(fails with: Requested output format 'x11grab' is not a suitable output format
)
- Adding -same_quant
(results in great quality, but is very choppy/ missing many frames)
- Adding -vpre lossless_ultrafast
(fails with: Unrecognized option 'vpre'
, Failed to set value 'lossless_ultrafast' for option 'vpre'
)
- Adding various values of -qscale
- Adding various values of -b
- Adding -vcodec h264
(outputs repeatedly: Error while decoding stream #0:0
, [h264 @ 0x8300980] no frame!
)
- Note: h264 is listed in avconv -formats
output as DE h264 raw H.264 video format
Oleg Pryadko
(2500 rep)
Apr 25, 2013, 04:04 AM
• Last activity: Aug 4, 2025, 10:02 AM
4
votes
1
answers
5264
views
How to record v4l webcam with ffmpeg? Cannot find a proper format for codec 'none'
Goal is to capture video from my old usb webcam (device 0733:0430). Trying to save video gives this error. (I've tried both ffmpeg and avconv.) Command `ffmpeg -f v4l2 -i /dev/video2 -s 160x120 tmp.mkv` [video4linux2,v4l2 @ 0x815280] Time per frame unknown [video4linux2,v4l2 @ 0x815280] Cannot find...
Goal is to capture video from my old usb webcam (device 0733:0430). Trying to save video gives this error. (I've tried both ffmpeg and avconv.)
Command
ffmpeg -f v4l2 -i /dev/video2 -s 160x120 tmp.mkv
[video4linux2,v4l2 @ 0x815280] Time per frame unknown
[video4linux2,v4l2 @ 0x815280] Cannot find a proper format for codec 'none' (id 0), pixel format 'none' (id -1)
Assertion *codec_id != AV_CODEC_ID_NONE failed at /build/buildd/ffmpeg-2.3/libavdevice/v4l2.c:802
I know it can work on Linux, because I had it running a few years ago. How to get it to work now?
----
**Below is information about the device.**
Device dmesg output
[53008.270283] usb 2-1.2: new full-speed USB device number 4 using ehci-pci
[53008.363405] usb 2-1.2: New USB device found, idVendor=0733, idProduct=0430
[53008.363416] usb 2-1.2: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[53008.779745] gspca_main: v2.14.0 registered
[53008.809496] gspca_main: spca505-2.14.0 probing 0733:0430
[53008.812508] usbcore: registered new interface driver spca505
ffmpeg -list_formats 1 -f v4l2 -i /dev/video2
[video4linux2,v4l2 @ 0xbed5e0] Raw : Unsupported : S505 : 160x120 176x144 320x240 352x288
v4l-info /dev/video2
### v4l2 device info [/dev/video2] ###
general info
VIDIOC_QUERYCAP
driver : "spca505"
card : "USB Camera (0733:0430)"
bus_info : "usb-0000:00:1d.0-1.2"
version : 3.13.11
capabilities : 0x85000001 [VIDEO_CAPTURE,READWRITE,STREAMING,(null)]
standards
inputs
VIDIOC_ENUMINPUT(0)
index : 0
name : "spca505"
type : CAMERA
audioset : 0
tuner : 0
std : 0x0 []
status : 0x0 []
video capture
VIDIOC_ENUM_FMT(0,VIDEO_CAPTURE)
index : 0
type : VIDEO_CAPTURE
flags : 0
description : "S505"
pixelformat : 0x35303553 [S505]
VIDIOC_G_FMT(VIDEO_CAPTURE)
type : VIDEO_CAPTURE
fmt.pix.width : 160
fmt.pix.height : 120
fmt.pix.pixelformat : 0x35303553 [S505]
fmt.pix.field : NONE
fmt.pix.bytesperline : 160
fmt.pix.sizeimage : 28800
fmt.pix.colorspace : SRGB
fmt.pix.priv : 0
controls
VIDIOC_QUERYCTRL(BASE+0)
id : 9963776
type : INTEGER
name : "Brightness"
minimum : 0
maximum : 255
step : 1
default_value : 127
flags : 32
Rucent88
(1910 rep)
Aug 9, 2014, 12:02 PM
• Last activity: Aug 3, 2025, 10:10 PM
3
votes
1
answers
2630
views
Convert .264 to .mp4 using avconv
I have a video file (with no audio stream) taken from a Lorex CCTV DVR. The video file has a suffix of ".264" which I assume means its format is raw h264. I cannot play this video on certain media players including the default player on an Apple tablet. I would like to convert the file to another fo...
I have a video file (with no audio stream) taken from a Lorex CCTV DVR. The video file has a suffix of ".264" which I assume means its format is raw h264. I cannot play this video on certain media players including the default player on an Apple tablet. I would like to convert the file to another format that is more universally useable, for example mp4. I tried the following command at Linux terminal:
> avconv -i ~/somePath/foo.264 -vcodec libx264 -f mp4 ~/somePath/foo.mp4
but the output mp4 file was basically empty, with a total size of 285 bytes. Furthermore, when I tried to play it using the Ubuntu Videos application the application returned a widow containing the error message: "An error occurred This file contains no playable streams."
file --mime-type ~/somePath/foo.264
~/somePath/foo.264: application/octet-stream
mediainfo ~/somePath/foo.264
...
Format:AVC; Format profile:Baseline@L2; Width:352 pixels; Height:240 pixels
...
Would somebody instruct me how to convert the .264 file to a .mp4?
EricVonB
(131 rep)
May 17, 2016, 01:06 AM
• Last activity: Jun 7, 2025, 01:05 PM
8
votes
3
answers
3353
views
Convert video to exactly the same format as another video
Suppose I have two video files A and B. Now I want to convert A to the same format (i.e. same container, same audio and video codec), same bitrate, size etc. as B. Is there a way to do this automatically (i.e. without extracting the information manually and giving it manually as input parameters) us...
Suppose I have two video files A and B.
Now I want to convert A to the same format (i.e. same container, same audio and video codec), same bitrate, size etc. as B.
Is there a way to do this automatically (i.e. without extracting the information manually and giving it manually as input parameters) using a command line tool (or even a GUI tool)?
student
(18865 rep)
Nov 26, 2014, 07:12 PM
• Last activity: Apr 28, 2025, 07:08 AM
4
votes
3
answers
6756
views
Slow down mp3 audio
I love VLC's option of slowing down audio playback. Now I want to take my mp3-files to a portable player and play them there. Unfortunately the player does not have a slow down option. How can I convert mp3s so they sound like being played slowly using VLC? I will prefer a command line tool, but wil...
I love VLC's option of slowing down audio playback.
Now I want to take my mp3-files to a portable player and play them there. Unfortunately the player does not have a slow down option.
How can I convert mp3s so they sound like being played slowly using VLC?
I will prefer a command line tool, but will accept other free software tools for GNU/Linux.
Ole Tange
(37348 rep)
Jul 22, 2014, 09:03 AM
• Last activity: Apr 16, 2023, 11:21 AM
5
votes
1
answers
1637
views
Don't wait for audio stream with ffmpeg/avconv using named pipes
I have two named pipes, `audio_conv` and `video`, for `s16le` and `h264` streams, respectively. I want to convert them to `webm` format on fly. Data to these pipes proceeds from my application, that parses proprietary format and converts audio. But sometimes there is no audio in incoming stream, and...
I have two named pipes,
audio_conv
and video
, for s16le
and h264
streams, respectively. I want to convert them to webm
format on fly. Data to these pipes proceeds from my application, that parses proprietary format and converts audio. But sometimes there is no audio in incoming stream, and I can't easily determine it on initialization stage.
When I pass both audio and video, it is OK, but when there is no audio, corresponding pipe is empty and, as I understand, ffmpeg stops converting video and awaits for some audio data.
Command I use:
ffmpeg -v debug -probesize 10000 -r 12 -analyzeduration 0 -vsync 0 -async 0 -i video -f s16le -ar 8000 -analyzeduration 0 -channel_layout mono -i audio_conv -f webm - | ffplay -
From ffmpeg log:
Successfully parsed a group of options.
Opening an input file: video.
[h264 @ 0x23bf460] Format h264 probed with size=2048 and score=51
[h264 @ 0x23bf460] Before avformat_find_stream_info() pos: 0 bytes read:2910 seeks:0
[h264 @ 0x23bf460] Probe buffer size limit of 10000 bytes reached
[h264 @ 0x23bf460] Stream #0: not enough frames to estimate rate; consider increasing probesize
[h264 @ 0x23bf460] decoding for stream 0 failed
[h264 @ 0x23bf460] After avformat_find_stream_info() pos: 15805 bytes read:17153 seeks:0 frames:1
Input #0, h264, from 'video':
Duration: N/A, bitrate: N/A
Stream #0:0, 1, 1/1200000: Video: h264 (Baseline), 1 reference frame, yuv420p(left), 704x576, 1/50, 25 tbr, 1200k tbn, 50 tbc
Successfully opened the file.
Parsing a group of options: input file audio_conv.
Applying option f (force format) with argument s16le.
Applying option ar (set audio sampling rate (in Hz)) with argument 8000.
Applying option channel_layout (set channel layout) with argument mono.
Successfully parsed a group of options.
Opening an input file: audio_conv.
After that I can see that video stream is passed to ffmpeg, but after some time it accidentally stops. And then, after kill
'ing ffmpeg process, it outputs:
[s16le @ 0x16a8060] Before avformat_find_stream_info() pos: 0 bytes read:0 seeks:0
[s16le @ 0x16a8060] After avformat_find_stream_info() pos: 0 bytes read:0 seeks:0 frames:0
Input #1, s16le, from 'audio_conv':
Duration: N/A, bitrate: 128 kb/s
Stream #1:0, 0, 1/8000: Audio: pcm_s16le, 8000 Hz, mono, s16, 128 kb/s
Successfully opened the file.
Parsing a group of options: output file -.
Applying option f (force format) with argument webm.
Successfully parsed a group of options.
Opening an output file: -.
Successfully opened the file.
detected 4 logical cores 0 aq= 0KB vq= 0KB sq= 0B f=0/0
[graph 0 input from stream 0:0 @ 0x16cf220] Setting 'video_size' to value '704x576'
[graph 0 input from stream 0:0 @ 0x16cf220] Setting 'pix_fmt' to value '0'
[graph 0 input from stream 0:0 @ 0x16cf220] Setting 'time_base' to value '1/12'
[graph 0 input from stream 0:0 @ 0x16cf220] Setting 'pixel_aspect' to value '0/1'
[graph 0 input from stream 0:0 @ 0x16cf220] Setting 'sws_param' to value 'flags=2'
[graph 0 input from stream 0:0 @ 0x16cf220] Setting 'frame_rate' to value '12/1'
[graph 0 input from stream 0:0 @ 0x16cf220] w:704 h:576 pixfmt:yuv420p tb:1/12 fr:12/1 sar:0/1 sws_param:flags=2
[force CFR for input from stream 0:0 @ 0x16a95a0] Setting 'expr' to value 'N'
[format @ 0x16a6160] compat: called with args=[yuv420p|yuv422p|yuv440p|yuv444p]
[format @ 0x16a6160] Setting 'pix_fmts' to value 'yuv420p|yuv422p|yuv440p|yuv444p'
[AVFilterGraph @ 0x16cc400] query_formats: 5 queried, 4 merged, 0 already done, 0 delayed
[graph 0 input from stream 0:0 @ 0x16cf220] TB:0.083333 FRAME_RATE:12.000000 SAMPLE_RATE:nan
[graph 1 input from stream 1:0 @ 0x16aa8c0] Setting 'time_base' to value '1/8000'
[graph 1 input from stream 1:0 @ 0x16aa8c0] Setting 'sample_rate' to value '8000'
[graph 1 input from stream 1:0 @ 0x16aa8c0] Setting 'sample_fmt' to value 's16'
[graph 1 input from stream 1:0 @ 0x16aa8c0] Setting 'channel_layout' to value '0x4'
[graph 1 input from stream 1:0 @ 0x16aa8c0] tb:1/8000 samplefmt:s16 samplerate:8000 chlayout:0x4
[audio format for output stream 0:1 @ 0x16aa760] Setting 'sample_fmts' to value 's16|flt'
[audio format for output stream 0:1 @ 0x16aa760] Setting 'sample_rates' to value '48000|24000|16000|12000|8000'
[audio format for output stream 0:1 @ 0x16aa760] Setting 'channel_layouts' to value '0x4|0x3|0x7|0x33|0x37|0x3f|0x70f|0x63f'
[AVFilterGraph @ 0x16ab920] query_formats: 4 queried, 9 merged, 0 already done, 0 delayed
[libvpx-vp9 @ 0x16ce760] v1.5.0
[libvpx-vp9 @ 0x16ce760] --prefix=/usr --enable-pic --enable-shared --disable-install-bins --disable-install-srcs --size-limit=16384x16384 --enable-postproc --enable-multi-res-encoding --enable-temporal-denoising --enable-vp9-temporal-denoising --enable-vp9-postproc --target=x86_64-linux-gcc
[libvpx-vp9 @ 0x16ce760] vpx_codec_enc_cfg
[libvpx-vp9 @ 0x16ce760] generic settings
g_usage: 0
g_threads: 8
g_profile: 0
g_w: 320
g_h: 240
g_bit_depth: 8
g_input_bit_depth: 8
g_timebase: {1/30}
g_error_resilient: 0
g_pass: 0
g_lag_in_frames: 25
[libvpx-vp9 @ 0x16ce760] rate control settings
rc_dropframe_thresh: 0
rc_resize_allowed: 0
rc_resize_up_thresh: 60
rc_resize_down_thresh: 30
rc_end_usage: 0
rc_twopass_stats_in: (nil)(0)
rc_target_bitrate: 256
[libvpx-vp9 @ 0x16ce760] quantizer settings
rc_min_quantizer: 0
rc_max_quantizer: 63
[libvpx-vp9 @ 0x16ce760] bitrate tolerance
rc_undershoot_pct: 25
rc_overshoot_pct: 25
[libvpx-vp9 @ 0x16ce760] decoder buffer model
rc_buf_sz: 6000
rc_buf_initial_sz: 4000
rc_buf_optimal_sz: 5000
[libvpx-vp9 @ 0x16ce760] 2 pass rate control settings
rc_2pass_vbr_bias_pct: 50
rc_2pass_vbr_minsection_pct: 0
rc_2pass_vbr_maxsection_pct: 2000
[libvpx-vp9 @ 0x16ce760] keyframing settings
kf_mode: 1
kf_min_dist: 0
kf_max_dist: 9999
[libvpx-vp9 @ 0x16ce760]
[libvpx-vp9 @ 0x16ce760] vpx_codec_enc_cfg
[libvpx-vp9 @ 0x16ce760] generic settings
g_usage: 0
g_threads: 0
g_profile: 0
g_w: 704
g_h: 576
g_bit_depth: 8
g_input_bit_depth: 8
g_timebase: {1/12}
g_error_resilient: 0
g_pass: 0
g_lag_in_frames: 25
[libvpx-vp9 @ 0x16ce760] rate control settings
rc_dropframe_thresh: 0
rc_resize_allowed: 0
rc_resize_up_thresh: 60
rc_resize_down_thresh: 30
rc_end_usage: 0
rc_twopass_stats_in: (nil)(0)
rc_target_bitrate: 200
[libvpx-vp9 @ 0x16ce760] quantizer settings
rc_min_quantizer: 0
rc_max_quantizer: 63
[libvpx-vp9 @ 0x16ce760] bitrate tolerance
rc_undershoot_pct: 25
rc_overshoot_pct: 25
[libvpx-vp9 @ 0x16ce760] decoder buffer model
rc_buf_sz: 6000
rc_buf_initial_sz: 4000
rc_buf_optimal_sz: 5000
[libvpx-vp9 @ 0x16ce760] 2 pass rate control settings
rc_2pass_vbr_bias_pct: 50
rc_2pass_vbr_minsection_pct: 0
rc_2pass_vbr_maxsection_pct: 2000
[libvpx-vp9 @ 0x16ce760] keyframing settings
kf_mode: 1
kf_min_dist: 0
kf_max_dist: 9999
[libvpx-vp9 @ 0x16ce760]
[libvpx-vp9 @ 0x16ce760] vpx_codec_control
[libvpx-vp9 @ 0x16ce760] VP8E_SET_CPUUSED: 1
[libvpx-vp9 @ 0x16ce760] VP8E_SET_ARNR_MAXFRAMES: 0
[libvpx-vp9 @ 0x16ce760] VP8E_SET_ARNR_STRENGTH: 3
[libvpx-vp9 @ 0x16ce760] VP8E_SET_ARNR_TYPE: 3
[libvpx-vp9 @ 0x16ce760] VP8E_SET_STATIC_THRESHOLD: 0
[libvpx-vp9 @ 0x16ce760] VP9E_SET_COLOR_SPACE: 0
[libvpx-vp9 @ 0x16ce760] Using deadline: 1000000
[libopus @ 0x16cfda0] No bit rate set. Defaulting to 64000 bps.
Is there is a way to tell ffmpeg to skip audio if there is no input data?
FunkyCat
(171 rep)
Dec 12, 2016, 06:32 AM
• Last activity: Jul 20, 2022, 06:38 AM
2
votes
0
answers
243
views
Jitter while screen recording with avconv
I've figured out how to record decent quality with `avconv` now, the problem that remains which I also have experienced with `ffmpeg` and `recordmydesktop` is that my desktop background keeps flickering through. I've disabled the desktop effects in Linux Mint 16 Petra, running Cinnamon. This is how...
I've figured out how to record decent quality with
How can I avoid this? Should I use another Desktop Environment like XFCE?
The command I am using:
$ avconv -f alsa -ac 2 -i plughw:2,0 -f x11grab -s 1920x1080 \
-r 30 -i :0.0 -acodec libvorbis -ar 44100 -vcodec huffyuv grab.avi
avconv
now, the problem that remains which I also have experienced with ffmpeg
and recordmydesktop
is that my desktop background keeps flickering through. I've disabled the desktop effects in Linux Mint 16 Petra, running Cinnamon.
This is how it looks:

Jonathan M. Hethey
(173 rep)
Apr 21, 2014, 12:38 PM
• Last activity: May 15, 2022, 11:09 PM
13
votes
7
answers
41743
views
FFMPEG - Interpolate frames or add motion blur
I just watched the [trailer for the hobbit][1], and [a trailer for the avengers][2] which both feature an increased framerate. A lot of the comments state that this isn't "true" 60fps since it was not shot at 60fps, but actually a lower frame-rate that has been interpolated. 
Programster
(2289 rep)
Jan 10, 2015, 08:58 PM
• Last activity: Jun 17, 2021, 07:18 AM
3
votes
1
answers
11809
views
How to download the highest quality .mp3 with youtube-dl on Sierra?
I'm trying to use youtube-dl to download the highest quality .mp3 files from youtube videos. I've installed youtube-dl and ffmpeg and downloaded libav. I found this command: youtube-dl -f bestaudio --audio-quality 0 --audio-format mp3 https://www.youtube.com/watch?v=3zy1SNH-VqE posted elsewhere, whi...
I'm trying to use youtube-dl to download the highest quality .mp3 files from youtube videos. I've installed youtube-dl and ffmpeg and downloaded libav.
I found this command:
youtube-dl -f bestaudio --audio-quality 0 --audio-format mp3 https://www.youtube.com/watch?v=3zy1SNH-VqE
posted elsewhere, which is supposed to get an .mp3 of the highest quality, but it only downloads a .webm, and the filesize appears to be around the 128 kbps range.
I used to get an error that said I needed to download ffprobe or avprobe, so I'm not sure I have the ffmpeg and libav installed properly.
Also, I saw some discussion elsewhere, is ffprobe or avprobe better?
Harrison
(31 rep)
Sep 27, 2017, 09:15 AM
• Last activity: Apr 30, 2021, 01:10 AM
5
votes
2
answers
2856
views
trim and fade in/out video and audio with avconv (or different tool)
I'm using `avconv` for trimming and converting videos. Let's say I want to drop the first 7 and last 2.5 seconds of the video stream and one audio stream of an one-hour `mts` file: avconv -i input.mts -map 0:0 -map 0:3 -ss 0:0:07 -t 0:59:50.5 out.mov This works so far, but now I want to add two seco...
I'm using
avconv
for trimming and converting videos. Let's say I want to drop the first 7 and last 2.5 seconds of the video stream and one audio stream of an one-hour mts
file:
avconv -i input.mts -map 0:0 -map 0:3 -ss 0:0:07 -t 0:59:50.5 out.mov
This works so far, but now I want to add two seconds of fading in and out at the beginning and the end by adding:
-vf fade=type=in:start_frame=350:nb_frames=100 -vf fade=type=out:start_frame=178750:nb_frames=100
Those frames are calculated with the 50 fps that avconv
reports for the video source. But there is neither fading in nor out.
1) What goes wrong with the video fading and how to do it right?
2) How to add audio fading. There seems to be an -afade
option. but I don't find it documented.
Alternatively, you can propose a different tool for this goal (trim and fade video and audio), preferrably available as package for Debian 8.
Philippos
(13680 rep)
May 18, 2017, 08:42 AM
• Last activity: Apr 4, 2021, 05:12 AM
0
votes
1
answers
23
views
Why does avconv bit rate lowering take ages, and cause fan to work overtime?
**Summary:** 1. I've read that the way to reduce the size of mp4 files is by lowering the video bit rate. So I'm using avconv to do this. The following is the command I'm using: avconv -i input-file.mp4 -b:v 300k output-file.mp4 So in the above example, say input-file.mp4 has a video bit rate of 160...
**Summary:**
1. I've read that the way to reduce the size of mp4 files is by lowering the
video bit rate. So I'm using avconv to do this. The following is the command I'm
using:
avconv -i input-file.mp4 -b:v 300k output-file.mp4
So in the above example, say input-file.mp4 has a video bit rate of 1600 kb/s,
then the command should produce output-file.mp4 with a video bit rate of 300
kb/s.
2. Well, the command runs, but with the following effects:
a) input-file.mp4 is 500 MB in size, but after 8 minutes, output-file.mp4 had
reached only 45 MB in size. At that rate, it would take 1 hour 30 minutes to
complete! So I aborted the run.
b) The laptop fan ran noticeably louder, and was blowing air out that was much
hotter than normal.
c) There is a cpu usage monitor on the status bar at the bottom of the screen.
In normal use, this shows a moving green waveform that takes up only a slight to
moderate amount of the black background. Whereas when running the said avconv
command, the entire black background was obliterated with solid green!
3. **My Questions:**
a) Is there a faster way to do the bit rate lowering?
b) Why is the fan working so hard; why is the air that's being blown out so hot;
and how do I stop it happening?
c) Do the same things happen on your computer when you run this avconv command?
**Full Details:**
1. My laptop is an Acer Aspire 5755G, i5, with 8 GB of RAM, running Knoppix
7.7.1 from a memory stick (which works fine for all my other uses).
2. The following shows parts of the output from the following command that I
think might be relevant. The "ME:" entries are my own notes. (SORRY, THE QUESTION SUBMISSION THING WOULDN'T LET ME FORMAT IT AS A CODE SAMPLE.) :
$ time avconv -i input-file.mp4 -b:v 300k output-file.mp4
...
Input #0 ...
...
network : BBC One
Duration: 00:44:13.04, start: 0.000000, bitrate: 1699 kb/s
Stream #0:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p(tv,
bt470bg), 960x540 [SAR 1:1 DAR 16:9], 1599 kb/s, 25 fps, 25 tbr, 90k tbn, 50 tbc
(default)
[ME: I think the "1599 kb/s" above is the bitrate (of input-file.mp4).]
...
Stream #0:2: Video: mjpeg, yuvj420p(pc, bt470bg/unknown/unknown), 192x108
[SAR 72:72 DAR 16:9], 90k tbr, 90k tbn, 90k tbc
[libx264 @ 0x8192320] using SAR=1/1
[libx264 @ 0x8192320] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX
[ME: The "cpu capabilities" just above might mean something.]
...
Output #0, mp4, to 'output-file.mp4':
...
network : BBC One
encoder : Lavf57.41.100
Stream #0:0(und): Video: h264 (libx264) ( / 0x0021), yuv420p,
960x540 [SAR 1:1 DAR 16:9], q=-1--1, 300 kb/s, 25 fps, 12800 tbn, 25 tbc
(default)
[ME: I think the "300 kb/s" just above shows that it IS converting it to 300
kb/s bitrate.]
...
ME: I aborted the run after about 8m30s (CTRL+C). The following is the output
just before, and during the abort. I think the messg "Exiting normally, received
signal 2." is in response to the CTRL+C:
...
frame=14350 fps= 43 q=39.0 size= 30338kB time=00:09:34.12 bitrate=
432.9kbits/s dup=1 drop=0 speed= 1.7x frame=14377 fps= 43 q=38.0 size= 30376kB
time=00:09:35.18 bitrate= 432.6kbits/s dup=1 drop=0 speed=1.71x frame=20872
fps= 40 q=-1.0 Lsize= 45648kB time=00:13:55.02 bitrate= 447.8kbits/s dup=1
drop=0 speed=1.62x
video:31838kB audio:13194kB subtitle:0kB other streams:0kB global headers:0kB
muxing overhead: 1.367074%
[libx264 @ 0x8192320] frame I:378 Avg QP:30.76 size: 9510
[libx264 @ 0x8192320] frame P:6226 Avg QP:35.29 size: 2581
[libx264 @ 0x8192320] frame B:14268 Avg QP:37.13 size: 907
[libx264 @ 0x8192320] consecutive B-frames: 6.7% 4.4% 5.9% 83.0%
[libx264 @ 0x8192320] mb I I16..4: 33.2% 60.3% 6.5%
[libx264 @ 0x8192320] mb P I16..4: 9.1% 16.7% 0.3% P16..4: 23.7% 2.1% 0.7%
0.0% 0.0% skip:47.5%
[libx264 @ 0x8192320] mb B I16..4: 0.7% 0.8% 0.0% B16..8: 24.9% 0.8% 0.0%
direct: 0.2% skip:72.5% L0:42.8% L1:56.4% BI: 0.8%
[libx264 @ 0x8192320] final ratefactor: 34.50
[libx264 @ 0x8192320] 8x8 transform intra:62.5% inter:93.0%
[libx264 @ 0x8192320] coded y,uvDC,uvAC intra: 15.2% 32.0% 1.7% inter: 2.2% 2.5%
0.0%
[libx264 @ 0x8192320] i16 v,h,dc,p: 35% 29% 8% 29%
[libx264 @ 0x8192320] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 22% 10% 51% 3% 3% 3% 3%
3% 2%
[libx264 @ 0x8192320] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 31% 20% 16% 5% 7% 7% 6%
5% 3%
[libx264 @ 0x8192320] i8c dc,h,v,p: 78% 9% 11% 2%
[libx264 @ 0x8192320] Weighted P-Frames: Y:2.7% UV:1.9%
[libx264 @ 0x8192320] ref P L0: 64.6% 13.5% 15.9% 5.8% 0.1%
[libx264 @ 0x8192320] ref B L0: 91.8% 6.5% 1.7%
[libx264 @ 0x8192320] ref B L1: 97.5% 2.5%
[libx264 @ 0x8192320] kb/s:312.40
[aac @ 0x8193840] Qavg: 645.192
Exiting normally, received signal 2.
real 8m36.597s
user 25m19.497s
sys 0m6.527s
$
^C
$
dave99
(1 rep)
Dec 29, 2020, 10:49 PM
• Last activity: Dec 30, 2020, 05:54 AM
1
votes
0
answers
62
views
Automating finding optimal parameters for re-encoding random video files with ffmpeg / avcov
I've done a bit of re-encoding of video with ffmpeg, mainly aimed at recompressing videos from assorted sources (youtube, twitch, tiktok, etc) to reduce file size with acceptable (subjective) amounts of loss in quality. Given that I know little about the quality setting of the original files (and th...
I've done a bit of re-encoding of video with ffmpeg, mainly aimed at recompressing videos from assorted sources (youtube, twitch, tiktok, etc) to reduce file size with acceptable (subjective) amounts of loss in quality. Given that I know little about the quality setting of the original files (and these vary over time anyway), the process for any one file is very time consuming. Every time, the process is something like this:
1. Compress a chunk of video
2. Compare the compressed chunk against the original
3. Bump the crf up or down based on how bad the re-encode looks.
4. Repeat until the ideal crf value for a given file is found, or I get tired and give up.
This is essentially the "trial and error" approach that comes up as the only answer every time somebody asks how to find optimal settings. Trial and error works, of course, but it requires interaction after every loop. Given that ffmpeg can also calculate the loss for a given encode (PSNR or VMAF), are there any frontends or wrapper scripts implementing an automated process?
A different approach would be a script or frontend that generates a 'contact sheet' of re-encodes, basically re-encoding a small chunk of the original file repeatedly over a range of CRF values. Does such a thing exist already? Research how to generate previews of videos has yielded a lot of approaches to creating youtube-like preview snippets, not quality test snippets.
GDorn
(111 rep)
Dec 15, 2020, 10:27 PM
64
votes
3
answers
154689
views
Re-encoding video library in x265 (HEVC) with no quality loss
I am trying to convert my video library to HEVC format to gain space. I ran the following command on all of the video files in my library: #!/bin/bash for i in *.mp4; do #Output new files by prepending "X265" to the names avconv -i "$i" -c:v libx265 -c:a copy X265_"$i" done Now, most videos convert...
I am trying to convert my video library to HEVC format to gain space. I ran the following command on all of the video files in my library:
#!/bin/bash
for i in *.mp4;
do
#Output new files by prepending "X265" to the names
avconv -i "$i" -c:v libx265 -c:a copy X265_"$i"
done
Now, most videos convert fine and the quality is the same as before. However, a few videos which are of very high quality (e.g. one movie print which is of 5GB) loses quality -- the video is all pixelated.
I am not sure what to do in this case. Do I need to modify the
crf
parameter in my command line? Or something else?
The thing is, I am doing a bulk conversion. So, I need a method where avconv
automatically adjusts whatever parameter needs adjustment, for each video.
### UPDATE-1
I found that crf
is the knob I need to adjust. The default CRF is 28. For better quality, I could use something less than 28. For example:
avconv -i input.mp4 -c:v libx265 -x265-params crf=23 -c:a copy output.mp4
However, the problem is that for some videos CRF value of 28 is good enough, while for some videos, lower CRF is required. This is something which I have to check manually by converting small sections of the big videos. But in bulk conversion, how would I check each video manually? Is their some way that avconv
can adjust CRF according to the input video intelligently?
### UPDATE-2
I found that there is a --lossless
option in x265: http://x265.readthedocs.org/en/default/lossless.html .
However, I don't know how to use it correctly. I tried using it in the following manner but it yielded opposite results (the video was even more pixelated):
avconv -i input.mp4 -c:v libx265 -x265-params lossless -c:a copy output.mp4
shivams
(4685 rep)
Sep 20, 2015, 02:26 AM
• Last activity: Oct 22, 2020, 01:26 PM
0
votes
1
answers
331
views
How to convert PPM to MP4 with avconv
I'm trying to convert a PPM video file to an MP4 video file using `avconv`. I tried this: avconv -r 1 -i Hole0.0001.mp4.ppm -r 24 Hole.mp4 avconv version 12.3, Copyright (c) 2000-2018 the Libav developers built on Oct 2 2019 11:39:18 with gcc 8 (GCC) Input #0, image2, from 'Hole0.0001.mp4.ppm': Dura...
I'm trying to convert a PPM video file to an MP4 video file using
As you can see I have 150 frames in the input file:
(base) alexandre@alexandre-Latitude-E7270:~/Documents$ ffprobe Hole0.0001.mp4.ppm
ffprobe version 3.4.8-0ubuntu0.2 Copyright (c) 2007-2020 the FFmpeg developers
built with gcc 7 (Ubuntu 7.5.0-3ubuntu1~18.04)
configuration: --prefix=/usr --extra-version=0ubuntu0.2 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-librsvg --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared
libavutil 55. 78.100 / 55. 78.100
libavcodec 57.107.100 / 57.107.100
libavformat 57. 83.100 / 57. 83.100
libavdevice 57. 10.100 / 57. 10.100
libavfilter 6.107.100 / 6.107.100
libavresample 3. 7. 0 / 3. 7. 0
libswscale 4. 8.100 / 4. 8.100
libswresample 2. 9.100 / 2. 9.100
libpostproc 54. 7.100 / 54. 7.100
Hole0.0001.mp4.ppm: Invalid data found when processing input
(base) alexandre@alexandre-Latitude-E7270:~/Documents$ ffplay Hole0.0001.mp4.ppm
ffplay version 3.4.8-0ubuntu0.2 Copyright (c) 2003-2020 the FFmpeg developers
built with gcc 7 (Ubuntu 7.5.0-3ubuntu1~18.04)
configuration: --prefix=/usr --extra-version=0ubuntu0.2 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-librsvg --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared
libavutil 55. 78.100 / 55. 78.100
libavcodec 57.107.100 / 57.107.100
libavformat 57. 83.100 / 57. 83.100
libavdevice 57. 10.100 / 57. 10.100
libavfilter 6.107.100 / 6.107.100
libavresample 3. 7. 0 / 3. 7. 0
libswscale 4. 8.100 / 4. 8.100
libswresample 2. 9.100 / 2. 9.100
libpostproc 54. 7.100 / 54. 7.100
Hole0.0001.mp4.ppm: Invalid data found when processing inputf=0/0
When I use this command I get:
(base) alexandre@alexandre-Latitude-E7270:~/Documents$ display -verbose Hole0.0001.mp4.ppm
Hole0.0001.mp4.ppm PPM 1310x560 1310x560+0+0 8-bit sRGB 330.1MB 0.690u 0:00.699
Hole0.0001.mp4.ppm
PPM 1310x560 1310x560+0+0 8-bit sRGB 330.1MB 0.680u 0:00.690
Hole0.0001.mp4.ppm PPM 1310x560 1310x560+0+0 8-bit sRGB 330.1MB 0.680u 0:00.690
Hole0.0001.mp4.ppm PPM 1310x560 1310x560+0+0 8-bit sRGB 330.1MB 0.670u 0:00.679
Hole0.0001.mp4.ppm PPM 1310x560 1310x560+0+0 8-bit sRGB 330.1MB 0.670u 0:00.679
Hole0.0001.mp4.ppm PPM 1310x560 1310x560+0+0 8-bit sRGB 330.1MB 0.670u 0:00.670
Hole0.0001.mp4.ppm PPM 1310x560 1310x560+0+0 8-bit sRGB 330.1MB 0.660u 0:00.670
Hole0.0001.mp4.ppm PPM 1310x560 1310x560+0+0 8-bit sRGB 330.1MB 0.650u 0:00.670
Hole0.0001.mp4.ppm PPM 1310x560 1310x560+0+0 8-bit sRGB 330.1MB 0.650u 0:00.660
Hole0.0001.mp4.ppm PPM 1310x560 1310x560+0+0 8-bit sRGB 330.1MB 0.650u 0:00.660
Hole0.0001.mp4.ppm PPM 1310x560 1310x560+0+0 8-bit sRGB 330.1MB 0.650u 0:00.650
Hole0.0001.mp4.ppm PPM 1310x560 1310x560+0+0 8-bit sRGB 330.1MB 0.640u 0:00.650
Hole0.0001.mp4.ppm PPM 1310x560 1310x560+0+0 8-bit sRGB 330.1MB 0.640u 0:00.650
Hole0.0001.mp4.ppm PPM 1310x560 1310x560+0+0 8-bit sRGB 330.1MB 0.630u 0:00.640
Hole0.0001.mp4.ppm PPM 1310x560 1310x560+0+0 8-bit sRGB 330.1MB 0.630u 0:00.640
What am I doing wrong?
How can I fix this?
avconv
. I tried this:
avconv -r 1 -i Hole0.0001.mp4.ppm -r 24 Hole.mp4
avconv version 12.3, Copyright (c) 2000-2018 the Libav developers
built on Oct 2 2019 11:39:18 with gcc 8 (GCC)
Input #0, image2, from 'Hole0.0001.mp4.ppm':
Duration: 00:00:00.04, start: 0.000000, bitrate: N/A
Stream #0:0: Video: ppm
rgb24, 1310x560
25 tbn
Stream mapping:
Stream #0:0 -> #0:0 (ppm (native) -> mpeg4 (native))
Press ctrl-c to stop encoding
Output #0, mp4, to 'Hole.mp4':
Metadata:
encoder : Lavf57.7.2
Stream #0:0: Video: mpeg4 [ / 0x0020]
yuv420p, 1310x560, q=2-31, 200 kb/s
24 fps, 24 tbn
Metadata:
encoder : Lavc57.25.0 mpeg4
Side data:
cpb: bitrate max/min/avg: 0/0/200000 buffer size: 0 vbv_delay: -1
frame= 1 fps= 0 q=3.2 Lsize= 16kB time=10000000000.00 bitrate= 0.0kbits/s
video:15kB audio:0kB other streams:0kB global headers:0kB muxing overhead: 5.397969%
Then, when I check the MP4 video file that is created, Hole.mp4
,
it doesn't work. I mean the video starts and stops immediately.
272M Hole0.0001.mp4.ppm
16K Hole.mp4
The output of display Hole0.0001.mp4.ppm
(the input file) gives me this:


Suntory
(101 rep)
Aug 17, 2020, 04:47 PM
• Last activity: Aug 17, 2020, 10:22 PM
7
votes
2
answers
13278
views
Downsampling a video with avconv / ffmpeg
I know really little about encoding and using avconv / ffmpeg. I am trying to downsample a video as follows: avconv -i blah_in.avi -s 640x360 -pass 1 blah.avi avconv -i blah_in.avi -s 640x360 -pass 2 blah.avi I am aware that this is very simplistic, yet I can't figure out what the problem is. Here i...
I know really little about encoding and using avconv / ffmpeg. I am trying to downsample a video as follows:
avconv -i blah_in.avi -s 640x360 -pass 1 blah.avi
avconv -i blah_in.avi -s 640x360 -pass 2 blah.avi
I am aware that this is very simplistic, yet I can't figure out what the problem is. Here is the error message from pass 1:
avconv version 0.8.3-4:0.8.3-0ubuntu0.12.04.1, Copyright (c) 2000-2012 the Libav developers
built on Jun 12 2012 16:37:58 with gcc 4.6.3
[avi @ 0x9fdd240] non-interleaved AVI
Input #0, avi, from 'blah_in.avi':
Metadata:
encoder : MEncoder svn r34540 (Ubuntu), built with gcc-4.6
Duration: 01:21:59.24, start: 0.000000, bitrate: 8996 kb/s
Stream #0.0: Video: mpeg4 (Advanced Simple Profile), yuv420p, 1920x1080 [PAR 1:1 DAR 16:9], 23.98 tbr, 23.98 tbn, 23.98 tbc
Stream #0.1: Audio: mp3, 44100 Hz, stereo, s16, 128 kb/s
File 'blah.avi' already exists. Overwrite ? [y/N] y
[buffer @ 0x9fe1e00] w:1920 h:1080 pixfmt:yuv420p
[scale @ 0x9fdcfa0] w:1920 h:1080 fmt:yuv420p -> w:640 h:360 fmt:yuv420p flags:0x4
Incompatible sample format 's16' for codec 'ac3', auto-selecting format 'flt'
[ac3 @ 0x9fdc740] invalid bit rate
Output #0, avi, to 'blah.avi':
Metadata:
encoder : MEncoder svn r34540 (Ubuntu), built with gcc-4.6
Stream #0.0: Video: mpeg4, yuv420p, 640x360 [PAR 1:1 DAR 16:9], q=2-31, pass 1, 200 kb/s, 90k tbn, 23.98 tbc
Stream #0.1: Audio: ac3, 44100 Hz, stereo, flt, 200 kb/s
Stream mapping:
Stream #0:0 -> #0:0 (mpeg4 -> mpeg4)
Stream #0:1 -> #0:1 (mp3 -> ac3)
Error while opening encoder for output stream #0:1 - maybe incorrect parameters such as bit_rate, rate, width or height
I have tried a number of things, but either they end up with a similar error message, or the quality is extremely poor; not so much due to low resolution, but full of compression artifacts.
Now, what I would like to achieve is the same resolution / encoding as the following avi file, which plays fine on my kids video device:
Stream #0.0: Video: mpeg4 (Advanced Simple Profile), yuv420p, 624x352 [PAR 1:1 DAR 39:22], 25 fps, 25 tbr, 25 tbn, 25 tbc
Stream #0.1: Audio: mp3, 48000 Hz, stereo, s16, 128 kb/s
January
(1947 rep)
Dec 1, 2012, 04:57 PM
• Last activity: Mar 31, 2020, 11:32 PM
6
votes
3
answers
7961
views
How to splice sections of a video with avconv?
I have figured out so far that you can cut a section from a video with avconv with a command like this (cuts from 1:00-3:00): avconv -ss 00:01:00 -i "input.avi" -t 00:02:00 -c:v libx264 -crf 23 "output.mp4" But how would I cut two (or more) sections from the video and combine them into one video? Fo...
I have figured out so far that you can cut a section from a video with avconv with a command like this (cuts from 1:00-3:00):
avconv -ss 00:01:00 -i "input.avi" -t 00:02:00 -c:v libx264 -crf 23 "output.mp4"
But how would I cut two (or more) sections from the video and combine them into one video? For example, taking 1:00-3:00 as above, plus 8:00-10:00, making a final 4 minute video.
I guess I can do them separately *then* concatenate them, but is there a simpler way?
DisgruntledGoat
(822 rep)
Oct 31, 2012, 12:46 AM
• Last activity: Mar 8, 2020, 07:01 AM
0
votes
1
answers
39
views
Avconv only converts 3 seconds of audio instead of the entire 30 minutes
this is my code dir=Desktop/mp3convert #I left out the whole t find "${dir:-.}" -name "*.mp3" -exec avconv -i {} -b 64k -ar 44100 -ac 1 {} \;
this is my code
dir=Desktop/mp3convert #I left out the whole t
find "${dir:-.}" -name "*.mp3" -exec avconv -i {} -b 64k -ar 44100 -ac 1 {} \;
Tim Sutyak
(1 rep)
Jan 9, 2020, 04:28 PM
• Last activity: Jan 10, 2020, 04:04 PM
3
votes
2
answers
1444
views
How to transition smoothly and repeatedly between two videos using command line tools?
I want to output a video using two videos as input, where these two videos fade (or dissolve) into each other in a smooth and repetitive manner, every second or so. I'm assuming a combination of `ffmpeg` with `melt`, `mkvmerge`, or another similar tool might produce the effect I'm after. Basically,...
I want to output a video using two videos as input, where these two videos fade (or dissolve) into each other in a smooth and repetitive manner, every second or so. I'm assuming a combination of
ffmpeg
with melt
, mkvmerge
, or another similar tool might produce the effect I'm after. Basically, I want to use ffmpeg
to cut up video A according to a specific interval, discarding every second cut up (automatically). Likewise for video B, but in this case inverting the process to retain the discarded parts. I wish to then interweave these parts.
The file names should be correctly formatted so that I can then concatenate the result using a wild card command argument or batch processing list, as per one of the aforementioned tools. The transition effect (e.g. a "lapse dissolve") isn't absolutely necessary, but it would be great if there were a filter to achieve that too. Lastly, it would also be great if this process could be done *with little to no re-encoding*, to preserve the video quality.
I've read through this thread and the Melt Framework documentation , in addition to the ffmpeg manual.
Lichtung
(53 rep)
Feb 8, 2019, 10:19 PM
• Last activity: Feb 12, 2019, 12:21 PM
0
votes
0
answers
825
views
using ffmpeg instead of avconv
i have 2 bash scripts wich i am trying to use which require avconv when i run the scripts i get the error bash: avconv: command not found but since i dont know where to find avconv in either pacman or cower i was wandering if i could change the scripts to use ffmpeg instead here are my scripts strea...
i have 2 bash scripts wich i am trying to use which require avconv
when i run the scripts i get the error
bash: avconv: command not found
but since i dont know where to find avconv in either pacman or cower i was wandering if i could change the scripts to use ffmpeg instead
here are my scripts
stream.sh
#!/bin/bash
avconv -re -v error -fflags +genpts -i "$1" -c copy -f mpegts pipe:1
livestreamer.sh
#!/bin/bash
livestreamer -O "$1" best | avconv -re -v error -fflags +genpts -i pipe:0 -bsf h264_mp4toannexb -vcodec libx264 -acodec ac3 -f mpegts pipe:1
harry mckay
(9 rep)
Jan 4, 2019, 04:02 PM
• Last activity: Jan 4, 2019, 06:02 PM
1
votes
0
answers
774
views
how to fix or change a mp4 video timestamps (frame rate) based on available frames?
I have a video file that was created as x264, 26 fps, 20MB. command used to convert `avconv -i infile.mp4 -c:v libx265 -c:a libmp3lame outfile.mp4` After converting it to x265 HEVC it gets wrong timestamps and so frame rate 1 fps, it has 1MB and the frames looks ok, just the time is messed. sample w...
I have a video file that was created as x264, 26 fps, 20MB.
command used to convert
avconv -i infile.mp4 -c:v libx265 -c:a libmp3lame outfile.mp4
After converting it to x265 HEVC it gets wrong timestamps and so frame rate 1 fps, it has 1MB and the frames looks ok, just the time is messed.
sample warning messages:
mp4 @ 0x10e8660] Non-monotonous DTS in output stream 0:0;
previous: 114400515, current: 454496; changing to 114400516.
This may result in incorrect timestamps in the output file.
Past duration 0.644524 too large
the x264 file reports 23s duration, the new one x265 is 11 minutes 46 seconds...
this wont fix it: avconv -i infile.mp4 -c:v copy -c:a copy -r 26 outfile.mp4
Obs.: the mp4 was created using "DU Recorder" on android, capturing the screen.
Aquarius Power
(4537 rep)
Jan 1, 2019, 10:51 PM
• Last activity: Jan 1, 2019, 10:57 PM
Showing page 1 of 20 total questions