Re: [FFmpeg-user] Trying to extract video stream but output only has 30 frames
On Sun, Apr 11, 2021 at 12:51:47AM +0200, Carl Eugen Hoyos wrote: > Am Sa., 10. Apr. 2021 um 14:43 Uhr schrieb William Breathitt Gray > : > > > $ ffmpeg -hide_banner -i VID_20210401_150222.mp4 -c:v copy -an onlyvideo.mp4 > > Work-around is to use -ignore_editlist 1 > > For future questions: Please remember not to sue -hide_banner and do > not cut the console output. > > Carl Eugen Thank you, I was able to use this option to produce the output I wanted. William Breathitt Gray signature.asc Description: PGP signature ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-user] Trying to extract video stream but output only has 30 frames
Am Sa., 10. Apr. 2021 um 14:43 Uhr schrieb William Breathitt Gray : > $ ffmpeg -hide_banner -i VID_20210401_150222.mp4 -c:v copy -an onlyvideo.mp4 Work-around is to use -ignore_editlist 1 For future questions: Please remember not to sue -hide_banner and do not cut the console output. Carl Eugen ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-user] Trying to extract video stream but output only has 30 frames
On Sat, Apr 10, 2021 at 04:52:22PM +0200, Carl Eugen Hoyos wrote: > Am Sa., 10. Apr. 2021 um 16:20 Uhr schrieb William Breathitt Gray > : > > > > I can play the video file correctly on my phone and > > desktop (albeit with some minor corrupted video frames and perhaps an > > audio skip here or there), but when I try to convert the video file > > using ffmpeg, I am unable to generate a useful output. > > Please provide the sample file. > > Carl Eugen The input video file here is available here: https://0x0.st/-TmH.mp4 $ sha256sum VID_20210401_150222.mp4 091f3cf8b1e23c32920c7a65293bf85d94219ebc6125e619f2a661215e03d4ae VID_20210401_150222.mp4 William Breathitt Gray signature.asc Description: PGP signature ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-user] Trying to extract video stream but output only has 30 frames
Am Sa., 10. Apr. 2021 um 16:20 Uhr schrieb William Breathitt Gray : > > I can play the video file correctly on my phone and > desktop (albeit with some minor corrupted video frames and perhaps an > audio skip here or there), but when I try to convert the video file > using ffmpeg, I am unable to generate a useful output. Please provide the sample file. Carl Eugen ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-user] Trying to extract video stream but output only has 30 frames
On Sat, Apr 10, 2021 at 01:54:45PM +0100, Rob Hallam wrote: > On Sat, 10 Apr 2021 at 13:43, William Breathitt Gray > wrote: > > > $ ffprobe VID_20210401_150222.mp4 -hide_banner > > ... > > com.android.version: 11 > > This looks like it's been created on a mobile device. I have had > experience of a phone creating a 'truncated' file which cut off > before the actual due to a corrupt MOOV atom / extraneous 'ftyp' > atoms. > > The video file played correctly on the phone and on online viewers (eg > YT) but not with either VLC, ffplay, etc. Yes, that essentially my situation (recorded video on phone, but file seems to have been generated with a fault -- perhaps due to truncation as your mention), I can play the video file correctly on my phone and desktop (albeit with some minor corrupted video frames and perhaps an audio skip here or there), but when I try to convert the video file using ffmpeg, I am unable to generate a useful output. I could perhaps use another tool, but I'd like to understand where I'm going wrong with ffmpeg because I do believe it is capable of doing what I want if I learn how it works. > > I could salvage the file by uploading to eg GDocs / YouTube and > re-downloading. You may also wish to have a look at the fork of > untrunc. Others here can advise if ffmpeg can do something useful > with your video file. > > > $ ffmpeg -hide_banner -i VID_20210401_150222.mp4 -c:v copy -an onlyvideo.mp4 > > Separately, I have seen others advise not to use -hide_banner when > preparing output for questions asked of this list. It is germane to know > what version a querent is using and with which options. > > Cheers, > Rob Ah yes that makes sense, I'll make sure to include the banner in my future responses then. Thank you, William Breathitt Gray signature.asc Description: PGP signature ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-user] Trying to extract video stream but output only has 30 frames
On Sat, 10 Apr 2021 at 13:43, William Breathitt Gray wrote: > $ ffprobe VID_20210401_150222.mp4 -hide_banner > ... > com.android.version: 11 This looks like it's been created on a mobile device. I have had experience of a phone creating a 'truncated' file which cut off before the actual due to a corrupt MOOV atom / extraneous 'ftyp' atoms. The video file played correctly on the phone and on online viewers (eg YT) but not with either VLC, ffplay, etc. I could salvage the file by uploading to eg GDocs / YouTube and re-downloading. You may also wish to have a look at the fork of untrunc. Others here can advise if ffmpeg can do something useful with your video file. > $ ffmpeg -hide_banner -i VID_20210401_150222.mp4 -c:v copy -an onlyvideo.mp4 Separately, I have seen others advise not to use -hide_banner when preparing output for questions asked of this list. It is germane to know what version a querent is using and with which options. Cheers, Rob ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-user] Trying to extract video stream but output only has 30 frames
Hello, I have the following MP4 file: $ ffprobe VID_20210401_150222.mp4 -hide_banner [mov,mp4,m4a,3gp,3g2,mj2 @ 0x557a40053c00] st: 0 edit list: 1 Missing key frame while searching for timestamp: 17999835 [mov,mp4,m4a,3gp,3g2,mj2 @ 0x557a40053c00] st: 0 edit list 1 Cannot find an index entry before timestamp: 17999835. [mov,mp4,m4a,3gp,3g2,mj2 @ 0x557a40053c00] decoding for stream 0 failed Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'VID_20210401_150222.mp4': Metadata: major_brand : mp42 minor_version : 0 compatible_brands: isommp42 creation_time : 2021-04-01T06:02:45.00Z com.android.version: 11 Duration: 00:00:20.65, start: 0.00, bitrate: 42883 kb/s Stream #0:0(eng): Video: h264 (Baseline) (avc1 / 0x31637661), yuvj420p(pc, smpte170m/bt470bg/smpte170m), 3840x2160, 42828 kb/s, SAR 1:1 DAR 16:9, 29.97 fps, 30 tbr, 90k tbn, 180k tbc (default) Metadata: creation_time : 2021-04-01T06:02:45.00Z handler_name: VideoHandle Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, mono, fltp, 96 kb/s (default) Metadata: creation_time : 2021-04-01T06:02:45.00Z handler_name: SoundHandle I believe the timestamps are corrupted for this file so I would like to salvage what I can separate the video stream from the audio. Using ffprobe, it looks like there is an expected 616 frames: $ ffprobe VID_20210401_150222.mp4 -hide_banner -show_streams -select_streams v:0 -count_frames 2>&1 | grep nb_ nb_frames=616 nb_read_frames=N/A nb_read_packets=N/A So I try to isolate the video with the following ffmpeg command: $ ffmpeg -hide_banner -i VID_20210401_150222.mp4 -c:v copy -an onlyvideo.mp4 [mov,mp4,m4a,3gp,3g2,mj2 @ 0x562c10dfa440] st: 0 edit list: 1 Missing key frame while searching for timestamp: 17999835 [mov,mp4,m4a,3gp,3g2,mj2 @ 0x562c10dfa440] st: 0 edit list 1 Cannot find an index entry before timestamp: 17999835. [mov,mp4,m4a,3gp,3g2,mj2 @ 0x562c10dfa440] decoding for stream 0 failed Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'VID_20210401_150222.mp4': Metadata: major_brand : mp42 minor_version : 0 compatible_brands: isommp42 creation_time : 2021-04-01T06:02:45.00Z com.android.version: 11 Duration: 00:00:20.65, start: 0.00, bitrate: 42883 kb/s Stream #0:0(eng): Video: h264 (Baseline) (avc1 / 0x31637661), yuvj420p(pc, smpte170m/bt470bg/smpte170m), 3840x2160, 42828 kb/s, SAR 1:1 DAR 16:9, 29.97 fps, 30 tbr, 90k tbn, 180k tbc (default) Metadata: creation_time : 2021-04-01T06:02:45.00Z handler_name: VideoHandle Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, mono, fltp, 96 kb/s (default) Metadata: creation_time : 2021-04-01T06:02:45.00Z handler_name: SoundHandle File 'onlyvideo.mp4' already exists. Overwrite? [y/N] y Output #0, mp4, to 'onlyvideo.mp4': Metadata: major_brand : mp42 minor_version : 0 compatible_brands: isommp42 com.android.version: 11 encoder : Lavf58.45.100 Stream #0:0(eng): Video: h264 (Baseline) (avc1 / 0x31637661), yuvj420p(pc, smpte170m/bt470bg/smpte170m), 3840x2160 [SAR 1:1 DAR 16:9], q=2-31, 42828 kb/s, 29.97 fps, 30 tbr, 90k tbn, 90k tbc (default) Metadata: creation_time : 2021-04-01T06:02:45.00Z handler_name: VideoHandle Stream mapping: Stream #0:0 -> #0:0 (copy) Press [q] to stop, [?] for help [mp4 @ 0x562c10e0ce00] Non-monotonous DTS in output stream 0:0; previous: 0, current: 0; changing to 1. This may result in incorrect timestamps in the output file. [mp4 @ 0x562c10e0ce00] Non-monotonous DTS in output stream 0:0; previous: 1, current: 0; changing to 2. This may result in incorrect timestamps in the output file. [mp4 @ 0x562c10e0ce00] Non-monotonous DTS in output stream 0:0; previous: 2, current: 0; changing to 3. This may result in incorrect timestamps in the output file. [mp4 @ 0x562c10e0ce00] Non-monotonous DTS in output stream 0:0; previous: 3, current: 0; changing to 4. This may result in incorrect timestamps in the output file. [mp4 @ 0x562c10e0ce00] Non-monotonous DTS in output stream 0:0; previous: 4, current: 0; changing to 5. This may result in incorrect timestamps